]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-89850: Add default C implementations of persistent_id() and persistent_load()...
authorSerhiy Storchaka <storchaka@gmail.com>
Wed, 10 Jan 2024 13:30:37 +0000 (15:30 +0200)
committerGitHub <noreply@github.com>
Wed, 10 Jan 2024 13:30:37 +0000 (15:30 +0200)
commit89cee94b315c88d3cd4c9ffc051e7abd6a5f2196
treeeb1510818cfed63f0e62a4dfbedba1f0208d3d74
parentb3d2427f2280fa8dae3515036c518d74ba43ebd1
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.
Doc/library/pickle.rst
Lib/test/test_pickle.py
Misc/NEWS.d/next/Library/2023-12-29-22-29-34.gh-issue-89850.KnxiZA.rst [new file with mode: 0644]
Modules/_pickle.c
Modules/clinic/_pickle.c.h