enthought / enthought/apptools

VersionedUnpickler depends on private implementation details of _Unpickler

Open
#232 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

As described in this comment chain: https://github.com/enthought/apptools/pull/199#discussion_r528611358

The `apptools.persistence.versioned_unpickler.NewUnpickler` class currently depends on an attribute `dispatch` defined on the `_Unpickler` class from `pickle`, which is not intended to be public. Further this is forcing `VersionedUnpickler` to continue using `_Unpickler` not the `Unpickler`which comes from the faster `_pickle` (see here: https://github.com/python/cpython/blob/aa01011003bb855cd52abfd49f2443446590d913/Lib/pickle.py#L1772-L1787).

Ultimately, we should remove the dependency on `dispatch` which is part of a private interface, and evolve `VersionedUnpickler` to be able to use `Unpickler` / not be tied to `_Unpickler`.

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.