-
Notifications
You must be signed in to change notification settings - Fork 520
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
Deprecate 'with dset.astype()' #1842
Conversation
h5py 3.0 introduced the ability to slice an astype wrapper directly (ds.astype(np.int32)[:]). I'd like to remove the old pattern of using astype() as a context manager with mutable state, and get rid of the thread-local storage it requires.
Codecov Report
@@ Coverage Diff @@
## master #1842 +/- ##
==========================================
+ Coverage 88.38% 88.39% +0.01%
==========================================
Files 17 17
Lines 2281 2284 +3
==========================================
+ Hits 2016 2019 +3
Misses 265 265
Continue to review full report at Codecov.
|
Add the warning for 3.3, or wait a while longer? This is trickier than #1839. The sooner we start pushing people away from this, the sooner we can get rid of the thread-locals piece. But the only way to keep code compatible with h5py 2.x and 3.x is to use the older style ( I'm leaning towards leaving this a bit longer - maybe add the warning a year after h5py 3.0 was released. |
I'm sold that we should let people have a 12 month support window for older versions of h5py. This should wait until Nov 2021 (which I presume will be h5py3.4). |
Should we merge this now? |
Yes, it has been a year since 3.0 was released with the new |
h5py 3.0 introduced the ability to slice an astype wrapper directly (
ds.astype(np.int32)[:]
). I'd like to remove the old pattern of using astype() as a context manager with mutable state, and get rid of the thread-local storage it requires.Edit: I am happy if we want to give people more time to update to 3.x before adding this warning. We released 3.0 in October 2020. The 3.3 release may be around 6 months after that, depending on how eager we are to do it.