Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NumPy 2.0 development status & announcements #24300

Open
Tracked by #516
rgommers opened this issue Jul 31, 2023 · 57 comments
Open
Tracked by #516

NumPy 2.0 development status & announcements #24300

rgommers opened this issue Jul 31, 2023 · 57 comments
Labels
62 - Python API Changes or additions to the Python API. Mailing list should usually be notified. 63 - C API Changes or additions to the C API. Mailing list should usually be notified. Tracking / planning
Milestone

Comments

@rgommers
Copy link
Member

rgommers commented Jul 31, 2023

The purpose of this issue is to serve as a brief "umbrella issue" which (a) links out to some key design proposals and other places where design changes and guidance for the 2.0 release are described, and (b) everyone who is interested can subscribe to in order to get updates from maintainers around the 2.0 release (not everyone may want to subscribe to the mailing list). This issue will remain pinned for high visibility.

The tentative release date for the first release candidate of NumPy 2.0 is around 1 Mar 2024, and the final release 6-8 weeks later.

EDIT: this issue is for announcements, please do not start technical discussions here

Design changes / proposals

Key guidance for users and downstream package authors

  1. If you rely on the NumPy C API (e.g. via direct use in C/C++, or via Cython code that uses NumPy), please add a numpy<2.0 requirement in your package's dependency metadata (for releases only, not on your main dev branch). Rationale: the NumPy C ABI will change in 2.0, so any compiled extension modules that rely on NumPy are likely to break, they need to be recompiled.
  2. If you rely on a large API surface from NumPy's Python API, also consider adding the same numpy<2.0 requirement to your metadata. Rationale: we will do a significant cleanup (see NEP 52), so unless you only use modern/recommended functions and object, your code is likely to require at least some adjustments.
  3. Consider cleaning up your code. E.g. remove from numpy import *, or importing any private modules like numpy.core. See https://github.com/numpy/numpy/blob/main/numpy/tests/test_public_api.py#L114-L126 for what we consider public/private. If it's not in the NumPy docs or in the list of public modules there, don't use it!
  4. Plan to do a release of your own packages which depend on numpy shortly after the first NumPy 2.0 release candidate is released (probably in Dec 2023). Rationale: at that point, you can release packages that will work with both 2.0 and 1.X, and hence your own end users will not be seeing much/any disruption (you want pip install mypacackage to continue working on the day NumPy 2.0 is released).
  5. Consider testing against NumPy nightlies in your own CI. We publish those at https://anaconda.org/scientific-python-nightly-wheels/numpy, and have documented that as a stable location at https://numpy.org/devdocs/dev/depending_on_numpy.html. Rationale: this will detect potential issues in your code so you can fix them well ahead of the NumPy 2.0 release.
@rgommers rgommers added 62 - Python API Changes or additions to the Python API. Mailing list should usually be notified. 63 - C API Changes or additions to the C API. Mailing list should usually be notified. Tracking / planning labels Jul 31, 2023
@rgommers rgommers added this to the 2.0.0 release milestone Jul 31, 2023
@rgommers rgommers pinned this issue Jul 31, 2023
ErlendHaa added a commit to ErlendHaa/dlisio that referenced this issue Aug 17, 2023
Numpy 2.0 will release in a few months time and we don't know how that
will affect us. Until there is a release candidate for numpy 2.0 we
should set a 1.x.x as an strict requirement. See [1].

[1] numpy/numpy#24300
eivindjahren added a commit to equinor/ert that referenced this issue Aug 17, 2023
eivindjahren added a commit to equinor/resfo that referenced this issue Aug 17, 2023
Following the recommendation from numpy/numpy#24300
eivindjahren added a commit to equinor/roffio that referenced this issue Aug 17, 2023
eivindjahren added a commit to equinor/roffio that referenced this issue Aug 17, 2023
eivindjahren added a commit to equinor/open_petro_elastic that referenced this issue Aug 17, 2023
As recommended in numpy/numpy#24300 it is set
to less than 2 due to upcoming breaking changes.
eivindjahren added a commit to equinor/ert that referenced this issue Aug 17, 2023
eivindjahren added a commit to equinor/open_petro_elastic that referenced this issue Aug 17, 2023
As recommended in numpy/numpy#24300 it is set
to less than 2 due to upcoming breaking changes.
ErlendHaa added a commit to ErlendHaa/dlisio that referenced this issue Aug 17, 2023
Numpy 2.0 will release in a few months time and we don't know how that
will affect us. Until there is a release candidate for numpy 2.0 we
should set a 1.x.x as an strict requirement. See [1].

[1] numpy/numpy#24300
ErlendHaa added a commit to ErlendHaa/dlisio that referenced this issue Aug 17, 2023
Numpy 2.0 will release in a few months time and we don't know how that
will affect us. Until there is a release candidate for numpy 2.0 we
should set a 1.x.x as an strict requirement. See [1].

[1] numpy/numpy#24300
ErlendHaa added a commit to ErlendHaa/dlisio that referenced this issue Aug 18, 2023
Numpy 2.0 will release in a few months time and we don't know how that
will affect us. Until there is a release candidate for numpy 2.0 we
should set a 1.x.x as an strict requirement. See [1].

[1] numpy/numpy#24300
ErlendHaa added a commit to ErlendHaa/dlisio that referenced this issue Aug 18, 2023
Numpy 2.0 will release in a few months time and we don't know how that
will affect us. Until there is a release candidate for numpy 2.0 we
should set a 1.x.x as an strict requirement. See [1].

[1] numpy/numpy#24300
ErlendHaa added a commit to ErlendHaa/dlisio that referenced this issue Aug 18, 2023
Numpy 2.0 will release in a few months time and we don't know how that
will affect us. Until there is a release candidate for numpy 2.0 we
should set a 1.x.x as an strict requirement. See [1].

[1] numpy/numpy#24300
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
62 - Python API Changes or additions to the Python API. Mailing list should usually be notified. 63 - C API Changes or additions to the C API. Mailing list should usually be notified. Tracking / planning
Projects
None yet
Development

No branches or pull requests