Commit ed858b3
pythongh-122559: Synchronize C and Python implementation of the 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.1 parent f0efb20 commit ed858b3
File tree
5 files changed
+55
-10
lines changed- Lib/test
- Misc/NEWS.d/next/Library
- Modules/_io
5 files changed
+55
-10
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1373 | 1373 | | |
1374 | 1374 | | |
1375 | 1375 | | |
| 1376 | + | |
| 1377 | + | |
| 1378 | + | |
| 1379 | + | |
| 1380 | + | |
| 1381 | + | |
| 1382 | + | |
| 1383 | + | |
| 1384 | + | |
| 1385 | + | |
| 1386 | + | |
| 1387 | + | |
| 1388 | + | |
| 1389 | + | |
| 1390 | + | |
| 1391 | + | |
| 1392 | + | |
| 1393 | + | |
| 1394 | + | |
| 1395 | + | |
| 1396 | + | |
| 1397 | + | |
1376 | 1398 | | |
1377 | 1399 | | |
1378 | 1400 | | |
| |||
3950 | 3972 | | |
3951 | 3973 | | |
3952 | 3974 | | |
| 3975 | + | |
| 3976 | + | |
| 3977 | + | |
| 3978 | + | |
| 3979 | + | |
| 3980 | + | |
| 3981 | + | |
| 3982 | + | |
| 3983 | + | |
| 3984 | + | |
| 3985 | + | |
| 3986 | + | |
| 3987 | + | |
| 3988 | + | |
| 3989 | + | |
| 3990 | + | |
| 3991 | + | |
| 3992 | + | |
| 3993 | + | |
| 3994 | + | |
| 3995 | + | |
| 3996 | + | |
3953 | 3997 | | |
3954 | 3998 | | |
3955 | 3999 | | |
| |||
Lines changed: 6 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2555 | 2555 | | |
2556 | 2556 | | |
2557 | 2557 | | |
2558 | | - | |
2559 | | - | |
| 2558 | + | |
2560 | 2559 | | |
2561 | 2560 | | |
2562 | 2561 | | |
| |||
2615 | 2614 | | |
2616 | 2615 | | |
2617 | 2616 | | |
2618 | | - | |
2619 | | - | |
| 2617 | + | |
2620 | 2618 | | |
2621 | 2619 | | |
2622 | 2620 | | |
| |||
2733 | 2731 | | |
2734 | 2732 | | |
2735 | 2733 | | |
2736 | | - | |
2737 | | - | |
| 2734 | + | |
2738 | 2735 | | |
2739 | 2736 | | |
2740 | 2737 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1262 | 1262 | | |
1263 | 1263 | | |
1264 | 1264 | | |
1265 | | - | |
1266 | | - | |
| 1265 | + | |
1267 | 1266 | | |
1268 | 1267 | | |
1269 | 1268 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3366 | 3366 | | |
3367 | 3367 | | |
3368 | 3368 | | |
3369 | | - | |
3370 | | - | |
| 3369 | + | |
3371 | 3370 | | |
3372 | 3371 | | |
3373 | 3372 | | |
| |||
0 commit comments