-
Notifications
You must be signed in to change notification settings - Fork 49
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
v0.13.2: NumPy 2.0 compatibility by using two import routes for VisibleDeprecationWarning #525
Conversation
Signed-off-by: Håkon Wiik Ånes <hwaanes@gmail.com>
…umpy Signed-off-by: Håkon Wiik Ånes <hwaanes@gmail.com>
Signed-off-by: Håkon Wiik Ånes <hwaanes@gmail.com>
Signed-off-by: Håkon Wiik Ånes <hwaanes@gmail.com>
Signed-off-by: Håkon Wiik Ånes <hwaanes@gmail.com>
Signed-off-by: Håkon Wiik Ånes <hwaanes@gmail.com>
Just to be clear, Path one, full fresh install
takes numpy2 and this new diffpy version. Path 2, on a legacy install which already has numpy1 would install orix correctly (at |
Yes |
great! I'll review. I think we should be numpy2 only at some point, but probably not just yet... |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good stuff! Merging.
Thanks! I checked locally, and with this PR, diffpy.structure v3.2.2rc0, and NumPy v2, all tests ran fine. |
I'll publish the patch release v0.13.2 then. |
Hm, well, perhaps wait a few days until diffpy.structure v3.2.2 is released. |
Description of the change
The only place orix's code is incompatible with NumPy v2 is the importing of
VisibleDeprecationWarning
from the top namespace. This was removed in v2. The replacement,exceptions.VisibleDeprecationWarning
, was added in v1.25. To support NumPy older and newer, I've added both import attempts inorix.constants
, making the warning available internally via this module.diffpy.structure just made a pre-release v3.2.2rc0 which supports NumPy 2.0 (here on PyPI). With this PR, orix is also compatible with NumPy 2.0. orix is still compatible with diffpy.structure >= 3.0.2, and we don't need to increase this.
I suggest to make a patch release v0.13.2 within the next few days after this PR is merged into main.
Progress of the PR
For reviewers
__init__.py
.section in
CHANGELOG.rst
.__credits__
inorix/__init__.py
and in.zenodo.json
.