diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2024-01-10 13:30:37 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-01-10 13:30:37 (GMT) |
commit | 89cee94b315c88d3cd4c9ffc051e7abd6a5f2196 (patch) | |
tree | eb1510818cfed63f0e62a4dfbedba1f0208d3d74 /Misc | |
parent | b3d2427f2280fa8dae3515036c518d74ba43ebd1 (diff) | |
download | cpython-89cee94b315c88d3cd4c9ffc051e7abd6a5f2196.zip cpython-89cee94b315c88d3cd4c9ffc051e7abd6a5f2196.tar.gz cpython-89cee94b315c88d3cd4c9ffc051e7abd6a5f2196.tar.bz2 |
gh-89850: Add default C implementations of persistent_id() and persistent_load() (GH-113579)
Previously the C implementation of pickle.Pickler and pickle.Unpickler
classes did not have such methods and they could only be used if
they were overloaded in subclasses or set as instance attributes.
Fixed calling super().persistent_id() and super().persistent_load() in
subclasses of the C implementation of pickle.Pickler and pickle.Unpickler
classes. It no longer causes an infinite recursion.
Diffstat (limited to 'Misc')
-rw-r--r-- | Misc/NEWS.d/next/Library/2023-12-29-22-29-34.gh-issue-89850.KnxiZA.rst | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Misc/NEWS.d/next/Library/2023-12-29-22-29-34.gh-issue-89850.KnxiZA.rst b/Misc/NEWS.d/next/Library/2023-12-29-22-29-34.gh-issue-89850.KnxiZA.rst new file mode 100644 index 0000000..90251ad --- /dev/null +++ b/Misc/NEWS.d/next/Library/2023-12-29-22-29-34.gh-issue-89850.KnxiZA.rst @@ -0,0 +1,5 @@ +Add default implementations of :meth:`pickle.Pickler.persistent_id` and +:meth:`pickle.Unpickler.persistent_load` methods in the C implementation. +Calling ``super().persistent_id()`` and ``super().persistent_load()`` in +subclasses of the C implementation of :class:`pickle.Pickler` and +:class:`pickle.Unpickler` classes no longer causes infinite recursion. |