-
Notifications
You must be signed in to change notification settings - Fork 83
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
feat!: remove deprecations for 1.4.0 release #2688
Conversation
This reverts commit 9218a77. This is required because it these classes are likely serialised in some behavior dictionaries
Hmm, looks like we probably shouldn't remove the |
Codecov Report
Additional details and impacted files
|
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 for making each deprecated feature removal a separate commit; it was much easier to review each commit separately!
Hmm, looks like we probably shouldn't remove the
ak.behaviors.string
module (or categorical) just yet; any pickles whose array class is defined in these modules will thus fail to load. I propose to wait, and eventually we'll be able to remove these outright. Let's bump the removal to 6-12 months?
Good point—to maintain backward pickle compatibility, we can never fully remove them. But they can become hollow shells of their former selves, like the ak._ext.Form
and subclasses in
Lines 3 to 17 in 519bba6
from awkward.forms import ( | |
BitMaskedForm, | |
ByteMaskedForm, | |
EmptyForm, | |
Form, | |
IndexedForm, | |
IndexedOptionForm, | |
ListForm, | |
ListOffsetForm, | |
NumpyForm, | |
RecordForm, | |
RegularForm, | |
UnionForm, | |
UnmaskedForm, | |
) |
If all we're trying to do is have pickle.load
not fail on old data, the ak.behaviors.string.StringBehavior
etc. classes must continue to exist at that address, but they don't have to be special classes. We can keep the string.py and categorical.py modules in behaviors/, but StringBehavior
etc. can be alternate names for ak.Array
(i.e. no special class for them). After unpickling, the arrays would no longer carry any residue of pickle having declared that they should have these classes.
If anyone asks why we have these pass-throughs, the answer can be the same as for _ext.py: to preserve old pickles. (A comment can explain that in-situ.) That would minimize cognitive overhead.
Hmm, the thought had occurred to me but I dismissed it as non-viable. I'm not sure why, though; it's a good idea! Now this can merge :) |
Per the wiki:
typestr
argument will be removed fromForm
objects.Form.type_from_behavior(...)
will be removed in favour ofForm.type
.ak.typetracer.empty_if_typetracer
will be removed in favour ofak.typetracer.length_zero_if_typetracer
.UnionArray.simplified
'smerge
argument will be removed.