◐ Shell
clean mode source ↗

gh-122559: Synchronize C and Python implementation of the io module about pickling by serhiy-storchaka · Pull Request #122628 · python/cpython

…dule about pickling

In the C implementation, remove __reduce__ and __reduce_ex__ methods
that always raise TypeError and restore __getstate__ methods that always
raise TypeErrori.

This restores fine details of the pre-3.12 behavior and unifies
both implementations.

@bedevere-app Bot mentioned this pull request

Aug 2, 2024

picnixz

…JlJr3.rst

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>

serhiy-storchaka added a commit to serhiy-storchaka/cpython that referenced this pull request

May 4, 2025
…e io module about pickling (pythonGH-122628)

In the C implementation, remove __reduce__ and __reduce_ex__ methods
that always raise TypeError and restore __getstate__ methods that always
raise TypeErrori.

This restores fine details of the pre-3.12 behavior and unifies
both implementations.
(cherry picked from commit e9253eb)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>

serhiy-storchaka added a commit that referenced this pull request

May 4, 2025
…odule about pickling (GH-122628) (GH-133381)

In the C implementation, remove __reduce__ and __reduce_ex__ methods
that always raise TypeError and restore __getstate__ methods that always
raise TypeErrori.

This restores fine details of the pre-3.12 behavior and unifies
both implementations.
(cherry picked from commit e9253eb)

diegorusso added a commit to diegorusso/cpython that referenced this pull request

May 4, 2025

Pranjal095 pushed a commit to Pranjal095/cpython that referenced this pull request

Jul 12, 2025
…dule about pickling (pythonGH-122628)

In the C implementation, remove __reduce__ and __reduce_ex__ methods
that always raise TypeError and restore __getstate__ methods that always
raise TypeErrori.

This restores fine details of the pre-3.12 behavior and unifies
both implementations.