Information for maintainers of packages with C extensions

Skip to first unread message

Thomas Robitaille

Apr 5, 2024, 9:47:22 AMApr 5
to astropy-dev mailing list
Hi everyone,

If you maintain Python packages with C extensions that use the Numpy C API, wheels that were built against Numpy 1.x will not work if a user installs your wheels and Numpy 2.0.0 (which will happen by default for new installs after Numpy 2.0.0 is released unless you specifically require numpy<2 as a run-time dependency).

Currently, Numpy 2.0.0 is not released yet, but 2.0.0rc1 is. This release candidate is guaranteed to be ABI-compatible with the final Numpy 2.0.0 which means that if you want to avoid any issues for your packages, you should build new wheels of your packages now with numpy>2.0.0rc1 as a build-time dependency. Wheels built now against 2.0.0rc1 will be compatible with both (recent) Numpy 1.x and 2.x. For more details, you can see this comment:

and for an example of PR done for reproject:

I released reproject v0.13.1 today which uses this and has wheels that were built against numpy 2.0.0rc1.

Please feel free to ask here or on the Slack #infrastructure channel if you have any questions!


Pey Lian Lim

Apr 12, 2024, 9:43:06 AMApr 12
to astropy-dev
Hi Tom,

Thanks for the very useful info. Anything special we need to do for conda-forge recipe? Do we have to force conda-forge to also build with numpy 2.0rc? If so, how?


Clément Robert

Apr 13, 2024, 3:25:52 AMApr 13
to astropy-dev
This is being actively discussed still, see

My understanding is that there's nothing feedstock maintainers should (or can) do at the moment, and compat with numpy 2 on conda-forge with likely happen as an automated migration campaign with bot PRs for each affected recipe.

Pey Lian Lim

Apr 15, 2024, 9:16:49 AMApr 15
to astropy-dev
Good to know. Thanks, Clément!
Reply all
Reply to author
0 new messages