Commit 0db8e53
fix finalize_modules: only clear __main__ dict, mark daemon thread tests as expected failure
Without GC, clearing all module dicts during finalization causes __del__
handlers to fail (globals are None). Restrict Phase 4 to only clear
__main__ dict — other modules' globals stay intact for their __del__
handlers.
Mark test_daemon_threads_shutdown_{stdout,stderr}_deadlock as expected
failures — without GC+GIL, finalize_modules clears __main__ globals
while daemon threads are still running.
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>1 parent bf76333 commit 0db8e53
2 files changed
+13
-16
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4865 | 4865 | | |
4866 | 4866 | | |
4867 | 4867 | | |
| 4868 | + | |
4868 | 4869 | | |
4869 | 4870 | | |
4870 | 4871 | | |
4871 | 4872 | | |
4872 | 4873 | | |
| 4874 | + | |
4873 | 4875 | | |
4874 | 4876 | | |
4875 | 4877 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
738 | 738 | | |
739 | 739 | | |
740 | 740 | | |
741 | | - | |
742 | | - | |
743 | | - | |
| 741 | + | |
| 742 | + | |
| 743 | + | |
| 744 | + | |
744 | 745 | | |
745 | | - | |
746 | | - | |
| 746 | + | |
| 747 | + | |
| 748 | + | |
| 749 | + | |
| 750 | + | |
| 751 | + | |
747 | 752 | | |
748 | | - | |
749 | | - | |
750 | | - | |
751 | 753 | | |
752 | 754 | | |
753 | 755 | | |
754 | 756 | | |
755 | 757 | | |
756 | 758 | | |
757 | | - | |
758 | | - | |
759 | | - | |
760 | | - | |
761 | | - | |
762 | | - | |
763 | 759 | | |
764 | | - | |
765 | | - | |
| 760 | + | |
766 | 761 | | |
767 | 762 | | |
768 | 763 | | |
| |||
0 commit comments