Skip to content

gh-89850: Add default C implementations of persistent_id() and persistent_load()#113579

Merged
serhiy-storchaka merged 1 commit into
python:mainfrom
serhiy-storchaka:pickle-pers-via-super
Jan 10, 2024
Merged

gh-89850: Add default C implementations of persistent_id() and persistent_load()#113579
serhiy-storchaka merged 1 commit into
python:mainfrom
serhiy-storchaka:pickle-pers-via-super

Conversation

@serhiy-storchaka

@serhiy-storchaka serhiy-storchaka commented Dec 30, 2023

Copy link
Copy Markdown
Member

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.


📚 Documentation preview 📚: https://cpython-previews--113579.org.readthedocs.build/

…persistent_load()

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.
@serhiy-storchaka
serhiy-storchaka merged commit 89cee94 into python:main Jan 10, 2024
@serhiy-storchaka
serhiy-storchaka deleted the pickle-pers-via-super branch January 10, 2024 13:30
kulikjak pushed a commit to kulikjak/cpython that referenced this pull request Jan 22, 2024
…persistent_load() (pythonGH-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.
aisk pushed a commit to aisk/cpython that referenced this pull request Feb 11, 2024
…persistent_load() (pythonGH-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.
Glyphack pushed a commit to Glyphack/cpython that referenced this pull request Sep 2, 2024
…persistent_load() (pythonGH-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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant