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
Currently apptools.persistence.VersionedUnpickler.load is intended to be used with pickle.dump, with pickle imported from the standard library.
The missing dump in apptools to pair with VersionedUnpickler.load limits refactoring and extensions in the future: All customization of the pickling business must happen at the load stage. When VersionedUnpickler.load is used, one (e.g. me) would expect to see a matching dump (e.g. VersionedPickler.dump), and would be worried to see they don't match.
If there is a public API providing dump and load for downstream projects depending on apptools.persistence to use (even though the dump would simply call pickle.dump), more of the library can change, e.g. shifting logic from load to dump, without having to cause backward incompatible breakages downstream. Such an API is also more obvious for developers to use.
The text was updated successfully, but these errors were encountered:
kitchoi
changed the title
VersionedUnpickler.load should have a more obviously pair 'dump' method in the library
VersionedUnpickler.load should have a more obviously paired 'dump' method in the library
Nov 23, 2020
Currently
apptools.persistence.VersionedUnpickler.load
is intended to be used withpickle.dump
, withpickle
imported from the standard library.The missing
dump
inapptools
to pair withVersionedUnpickler.load
limits refactoring and extensions in the future: All customization of the pickling business must happen at theload
stage. WhenVersionedUnpickler.load
is used, one (e.g. me) would expect to see a matchingdump
(e.g.VersionedPickler.dump
), and would be worried to see they don't match.If there is a public API providing
dump
andload
for downstream projects depending onapptools.persistence
to use (even though thedump
would simply callpickle.dump
), more of the library can change, e.g. shifting logic from load to dump, without having to cause backward incompatible breakages downstream. Such an API is also more obvious for developers to use.The text was updated successfully, but these errors were encountered: