Commit ca85362
committed
gh-141749 fix pure python pickle.py error handling
This fix addresses error handling inconsistencies in CPython's pure Python `pickle.py` implementation to match the behavior of the C `_pickle` module. The changes make the pure Python implementation raise proper `UnpicklingError` exceptions for invalid pickle data instead of low-level `KeyError` and `IndexError` exceptions.1 parent 14cbd0e commit ca85362
File tree
3 files changed
+12
-2
lines changed- Lib
- test
- Misc/NEWS.d/next/Library
3 files changed
+12
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1349 | 1349 | | |
1350 | 1350 | | |
1351 | 1351 | | |
1352 | | - | |
| 1352 | + | |
| 1353 | + | |
| 1354 | + | |
| 1355 | + | |
| 1356 | + | |
| 1357 | + | |
1353 | 1358 | | |
1354 | 1359 | | |
1355 | 1360 | | |
1356 | 1361 | | |
1357 | 1362 | | |
| 1363 | + | |
| 1364 | + | |
1358 | 1365 | | |
1359 | 1366 | | |
1360 | 1367 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
55 | 55 | | |
56 | 56 | | |
57 | 57 | | |
58 | | - | |
| 58 | + | |
59 | 59 | | |
60 | 60 | | |
61 | 61 | | |
| |||
Lines changed: 3 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
0 commit comments