Skip to content

Numpy 2 compatibility #1550

@neutrinoceros

Description

@neutrinoceros

I just saw that pyart 1.18.1 still uses oldest-supported-numpy at build time, which indicates that it won't be compatible with the upcoming Numpy 2.0 release. Here's a bit of context:

I know that pyart has a lot of big dependencies so it might still take a while before it can be easily tested against numpy 2, however it should already be possible to build future wheels against numpy 2.0 to allow anyone downstream to test it.
The patch would be as simple as

diff --git a/pyproject.toml b/pyproject.toml
index 2744eb91..9c0a8b5b 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -4,7 +4,7 @@ requires = [
   "setuptools_scm>=6.2",
   "wheel",
   "cython",
-  "oldest-supported-numpy"
+  "numpy>=2.0.0rc1",
 ]

 [tool.black]

Coordination at the ecosystem level is being tracked at numpy/numpy#26191 (comment), so I recommend keeping an eye out to see when your direct dependencies are compatible and start testing against it, preferably before numpy 2.0.0 final is out.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions