Repository navigation
Commit 3a73a52
gh-157443: Track the argument of sys.unraisablehook in the GC
PyStructSequence_New() does not track the created object, and the
argument of sys.unraisablehook holds the exception and its traceback,
so a reference cycle through it was never collected.
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>1 parent da5a155 commit 3a73a52
3 files changed
Lines changed: 27 additions & 0 deletions
File tree
- Lib/test
- Misc/NEWS.d/next/Core_and_Builtins
- Python
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1515 | 1515 | | |
1516 | 1516 | | |
1517 | 1517 | | |
| 1518 | + | |
| 1519 | + | |
| 1520 | + | |
| 1521 | + | |
| 1522 | + | |
| 1523 | + | |
| 1524 | + | |
| 1525 | + | |
| 1526 | + | |
| 1527 | + | |
| 1528 | + | |
| 1529 | + | |
| 1530 | + | |
| 1531 | + | |
| 1532 | + | |
| 1533 | + | |
| 1534 | + | |
| 1535 | + | |
| 1536 | + | |
| 1537 | + | |
| 1538 | + | |
1518 | 1539 | | |
1519 | 1540 | | |
1520 | 1541 | | |
| |||
Lines changed: 3 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1447 | 1447 | | |
1448 | 1448 | | |
1449 | 1449 | | |
| 1450 | + | |
| 1451 | + | |
| 1452 | + | |
1450 | 1453 | | |
1451 | 1454 | | |
1452 | 1455 | | |
| |||
0 commit comments