wjakob / nanobind

nanobind: tiny and efficient C++/Python bindings
BSD 3-Clause "New" or "Revised" License
2.29k stars 191 forks source link

Compatibility with numpy 2.0 #626

Closed Yikai-Liao closed 3 months ago

Yikai-Liao commented 3 months ago

I noticed that numpy 2.0 has been released and broke some abi compatibility. I don't see any numpy2.0 related topics in nanobind, so I'd ask here if nanobind is now properly compatible with numpy2.0?(I haven't tested it in my own library yet)

https://numpy.org/devdocs/release/2.0.0-notes.html

https://numpy.org/devdocs/numpy_2_0_migration_guide.html

Yikai-Liao commented 3 months ago

All downstream packages that depend on the NumPy ABI are advised to do a new release built against NumPy 2.0 and verify that that release works with both 2.0 and 1.26 - ideally in the period between 2.0.0rc1 (which will be ABI-stable) and the final 2.0.0 release to avoid problems for their users.

wjakob commented 3 months ago

nanobind does not use the NumPy ABI and is not affected by this change. In particular, the kinds of issues seen in pybind11 don't apply in nanobind.

wjakob commented 3 months ago

(Please only open issues if you have an actual reproducer for a problem -- the instructions are clear on this).