There was an error while loading. Please reload this page.
1 parent 96cdc6c commit 79f7cd3Copy full SHA for 79f7cd3
1 file changed
Python/pylifecycle.c
@@ -2118,8 +2118,9 @@ finalize_interp_clear(PyThreadState *tstate)
2118
_PyExc_ClearExceptionGroupType(interp);
2119
_Py_clear_generic_types(interp);
2120
_PyTypes_FiniCachedDescriptors(interp);
2121
+ _PySys_Fini(interp);
2122
- /* Clear interpreter state and all thread states */
2123
+ /* Clear interpreter state and all thread states: last GC collection! */
2124
_PyInterpreterState_Clear(tstate);
2125
2126
/* Clear all loghooks */
@@ -2137,7 +2138,6 @@ finalize_interp_clear(PyThreadState *tstate)
2137
2138
}
2139
2140
finalize_interp_types(interp);
- _PySys_Fini(interp);
2141
2142
/* Finalize dtoa at last so that finalizers calling repr of float doesn't crash */
2143
_PyDtoa_Fini(interp);
0 commit comments