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
Drop support for NumPy 1.20 #14349
Drop support for NumPy 1.20 #14349
Conversation
Thank you for your contribution to Astropy! 🌌 This checklist is meant to remind the package maintainers who will review this pull request of some common things to look for.
|
👋 Thank you for your draft pull request! Do you know that you can use |
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.
With dropping the support, we should also remove work-arounds that are needed for numpy 1.20. I think there are not so many:
find . -name \*.py -exec grep NUMPY_LT_1_21 {} \; -print
"NUMPY_LT_1_21_1",
NUMPY_LT_1_21_1 = not minversion(np, "1.21.1")
./astropy/utils/compat/numpycompat.py
# perhaps axis or where was masked (in NUMPY_LT_1_21 this is
./astropy/utils/masked/core.py
from astropy.utils.compat import NUMPY_LT_1_21_1, NUMPY_LT_1_22
sys.byteorder == "big" and NUMPY_LT_1_21_1, reason="Numpy GitHub Issue 19153"
./astropy/units/tests/test_quantity_array_methods.py
from astropy.utils.compat import NUMPY_LT_1_21_1
@pytest.mark.skipif(NUMPY_LT_1_21_1, reason="https://stackoverflow.com/q/69571643")
./astropy/units/tests/test_structured.py
Since these are all "mine", I thought I might as well fix them... Will push a commit shortly, and approve assuming tests pass.
419c4e0
to
78eebf3
Compare
78eebf3
to
d12eb0f
Compare
@@ -125,9 +124,6 @@ def test_swapaxes(self): | |||
assert q_swapaxes.unit == q.unit | |||
assert np.all(q_swapaxes.value == q.value.swapaxes(0, 2)) | |||
|
|||
@pytest.mark.xfail( | |||
sys.byteorder == "big" and NUMPY_LT_1_21_1, reason="Numpy GitHub Issue 19153" |
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.
@mhvk , won't this comparison also hold for 1.21.0?
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.
Darn, I'm an idiot! I just thought we were dropping support for the oldest numpy version in numpycompat.py
, but apparently we never had anything particularly bad about numpy 1.20... Sigh...
And thanks for catching that. Am happy to push an update with that commit removed...
d12eb0f
to
36ba035
Compare
I removed my incorrect adjustments! Should now all be fine. |
Failures in -dev are all unrelated (asdf), so let's get this in. Thanks, @WilliamJamieson, and apologies again for adding edits for the wrong numpy version! |
Description
Per APE 18, as of today (January, 31 2023) we should drop support for NumPy 1.20 (see https://numpy.org/neps/nep-0029-deprecation_policy.html#drop-schedule). This PR executes that drop of support