Skip to content

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

@kitchoi

Description

@kitchoi

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions