Skip to content

[3.13] gh-122559: Synchronize C and Python implementation of the io module about pickling (GH-122628)#133381

Merged
serhiy-storchaka merged 1 commit intopython:3.13from
serhiy-storchaka:backport-e9253eb-3.13
May 4, 2025
Merged

[3.13] gh-122559: Synchronize C and Python implementation of the io module about pickling (GH-122628)#133381
serhiy-storchaka merged 1 commit intopython:3.13from
serhiy-storchaka:backport-e9253eb-3.13

Conversation

@serhiy-storchaka
Copy link
Member

@serhiy-storchaka serhiy-storchaka commented May 4, 2025

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)

…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 serhiy-storchaka enabled auto-merge (squash) May 4, 2025 15:42
@serhiy-storchaka serhiy-storchaka merged commit 973e2d3 into python:3.13 May 4, 2025
38 checks passed
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