◐ Shell
clean mode source ↗

[3.13] gh-122559: Synchronize C and Python implementation of the io module about pickling (GH-122628) by serhiy-storchaka · Pull Request #133381 · python/cpython

…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>

@bedevere-app Bot mentioned this pull request

May 4, 2025