You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
"""An abstract class to provide functionality common to the updaters."""
defget_latest(self, module, name):
"""The refactorings dictionary contains mappings between old and new
module names. Since we only bump the version number one increment
there is only one possible answer.
"""
But from where it is used, there are more features expected of this interface, e.g. it is expected to have an attribute called setstates which is a dictionary:
The structure of this dictionary is not documented (and there seem to be no tests for it). It seems to be used for monkeypatching a class __setstate__ (a global state that does not belong to apptools!), but it may not be restored.
Monkeypatching here in the code path if VersionedUnpickler.updater is not None:
It is possible that no one uses an updater with the VersionedUnpickler so this monkeypatching is never exercised. I have not checked if there are other uses of an updater anywhere else. It could be a feature that can be removed.
The text was updated successfully, but these errors were encountered:
The
VersionedUnpickler
accepts an updater object:apptools/apptools/persistence/versioned_unpickler.py
Lines 111 to 113 in 632a4bf
This was supposed to be its "interface":
apptools/apptools/persistence/updater.py
Lines 9 to 17 in 632a4bf
But from where it is used, there are more features expected of this interface, e.g. it is expected to have an attribute called
setstates
which is a dictionary:apptools/apptools/persistence/versioned_unpickler.py
Line 157 in 632a4bf
The structure of this dictionary is not documented (and there seem to be no tests for it). It seems to be used for monkeypatching a class
__setstate__
(a global state that does not belong to apptools!), but it may not be restored.Monkeypatching here in the code path if
VersionedUnpickler.updater
is not None:apptools/apptools/persistence/versioned_unpickler.py
Lines 166 to 167 in 632a4bf
To be restored if some other unpickler without an updater came across the same class:
apptools/apptools/persistence/versioned_unpickler.py
Lines 145 to 148 in 632a4bf
It is possible that no one uses an updater with the
VersionedUnpickler
so this monkeypatching is never exercised. I have not checked if there are other uses of an updater anywhere else. It could be a feature that can be removed.The text was updated successfully, but these errors were encountered: