-
Notifications
You must be signed in to change notification settings - Fork 24
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
Fix multiple versioned pickle wrappers #133
Comments
The following are all the uses of
Looking at apptools/apptools/sweet_pickle/__init__.py Lines 112 to 113 in a693c79
The apptools/apptools/sweet_pickle/versioned_unpickler.py Lines 112 to 131 in a693c79
Note this is identical to the same method on the apptools/apptools/persistence/versioned_unpickler.py Lines 37 to 56 in a693c79
So it seems this could easily be replaced to use Likewise, looking closer at dump: apptools/apptools/sweet_pickle/__init__.py Lines 126 to 131 in a693c79
It seems the only thing apptools/apptools/sweet_pickle/__init__.py Lines 161 to 168 in a693c79
However, this docstring for a function of the same name in persistence.StatePickler suggests this isn't needed:apptools/apptools/persistence/state_pickler.py Lines 316 to 321 in a693c79
There are also other cases where Overall it seems to me that |
Looking at using
I tried this and there was actually one other minor problem. In persistence, apptools/apptools/sweet_pickle/versioned_unpickler.py Lines 25 to 28 in a693c79
As a result, when running the
Since we are soon to drop support for python 2, it seems we will always want |
Apptools provides the
sweet_pickle
subpackage to handle versioning of pickled objects to allow unpickling of objects after changes to the class structure.The
persistence
subpackage has a slightly different focus: it is more about extracting state as a dictionary, but it has similar themes.Mayavi uses
persistence
, but it also usesapptools.naming
which internally usessweet_pickle
, so we cannot simply deprecatesweet_pickle
.The text was updated successfully, but these errors were encountered: