-
Notifications
You must be signed in to change notification settings - Fork 524
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
ENH: avoid deprecation warnings from numpy 2 #2416
Conversation
d0deef3
to
f7e689a
Compare
f7e689a
to
416ce5c
Compare
416ce5c
to
d67f231
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #2416 +/- ##
=======================================
Coverage 89.58% 89.58%
=======================================
Files 17 17
Lines 2391 2401 +10
=======================================
+ Hits 2142 2151 +9
- Misses 249 250 +1 ☔ View full report in Codecov by Sentry. |
@tacaswell should I add tests for any/all new (uncovered) paths ? |
Yes please if it is not excessively complicated to make the tests work with both np1 and np2. |
d67f231
to
f0d84e3
Compare
f0d84e3
to
3776eab
Compare
Took me longer than I anticipated but I added tests to cover most new paths (I couldn't figure out how to 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.
Thanks! I think the NumPy copy
stuff can be simplified a bit, I've put some comments about it inline.
Co-authored-by: Thomas Kluyver <thomas.kluyver@xfel.eu>
Co-authored-by: Thomas Kluyver <thomas.kluyver@xfel.eu>
Thanks! |
@takluyver these deprecation warnings are starting to affect downstream CI (I've heard of astropy, but there may be others). My assumption is that we'll release h5py 3.12 sometimes in the next 2 months for Python 3.13 wheels anyway, and I don't think that's a problem if not, but could you confirm ? Thank you ! |
Yup, I think we can do a new release fairly soon. I'd be tempted to wait for Python 3.13, but we can also go before that if we need to. |
with the rc1 out we should be able to ship wheels for it soon. This is happening in #2470 |
Ah, yes, that's right. But possibly we should wait for numpy to make wheels first? |
We don't have to. In fact matplotlib 3.9.2 already has cp313 wheels on PyPI, even though neither numpy or contourpy does, at the moment. |
I doubt there's much pressure until numpy has wheels ready, and it gives us a chance to catch any random errors from numpy's wheels being built differently from how numpy gets built in our CI, so I probably would wait for that. Python 3.13 also includes the option to disable the GIL, doesn't it? Do you know if we need to do anything around that? Using h5py you don't get much benefit from disabling the GIL, because HDF5 has it's own big lock, but I imagine someone will want to try. |
Yes there's a couple small things we can do to at least not get in the way of downstream testers. I've been learning about this topic lately and I should be able to expedite such changes in the coming days. |
Thanks! |
Fixes a couple deprecation warnings caught while running the test suite with
pytest -Werror
against numpy dev.Namely
xref: numpy/numpy#24634
And
xref: numpy/numpy#25168