Closed hakonanes closed 2 months ago
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.
Just to be clear, orix
would have two installation options:
Path one, full fresh install
pip install orix
takes numpy2 and this new diffpy version.
Path 2, on a legacy install which already has numpy1 would install orix correctly (at 0.13.2
) with no issues?
Yes
Yes
great! I'll review. I think we should be numpy2 only at some point, but probably not just yet...
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
.CHANGELOG.rst
.__credits__
inorix/__init__.py
and in.zenodo.json
.