enthought / enthought/apptools

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

Open
#231 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
38
Forks
21
PR merge metrics
No merged PRs in 30d

Description

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.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.