SciTools / cf-units

Units of measure as required by the Climate and Forecast (CF) Metadata Conventions
https://cf-units.readthedocs.io/en/latest/
BSD 3-Clause "New" or "Revised" License
64 stars 46 forks source link

Numpy 2 testing #427

Open ocefpaf opened 4 months ago

ocefpaf commented 4 months ago

🚀 Pull Request

Description

This PR adapts the code for numpy 2.0. I'm building on top of #313 b/c this one should be merged after that one. Note that I did not add numpy 2.0 to the test matrix yet. The test matrix here is quite complex with automated conda-lock, tox, etc. It is quite hard to contribute to it!

pp-mo commented 4 days ago

NOTE: This might couple to #443 Not sure of the exact relationship here, needs investigating

ocefpaf commented 4 days ago

NOTE: This might couple to #443 Not sure of the exact relationship here, needs investigating

Note that PyPI doesn't support repodata patching, like in conda-forge. That means cf-units build with numpy<2 will be installable in numpy>=2 envs unless the user pins it! Changes like https://github.com/SciTools/cf-units/pull/427/files#diff-50c86b7ed8ac2cf95bd48334961bf0530cdc77b5a56f852c5c61b89d735fd711 would help ameliorate that if a new release with these changes are out soon. Another action would be a post release of the current one with the numpy<2 pin in it.