Skip to content
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

VersionedUnpickler.load should have a more obviously paired 'dump' method in the library #231

Open
kitchoi opened this issue Nov 23, 2020 · 0 comments

Comments

@kitchoi
Copy link
Contributor

kitchoi commented Nov 23, 2020

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.

@kitchoi 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant