Skip to content

Commit 941117a

Browse files
authored
bpo-21222: Fix improperly merged change so that final hooks are called before types are cleared (GH-21304)
1 parent e1d4fdc commit 941117a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Python/pylifecycle.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1301,15 +1301,15 @@ finalize_interp_clear(PyThreadState *tstate)
13011301
_PyGC_CollectNoFail();
13021302
}
13031303

1304-
finalize_interp_types(tstate, is_main_interp);
1305-
13061304
/* Clear all loghooks */
13071305
/* Both _PySys_Audit function and users still need PyObject, such as tuple.
13081306
Call _PySys_ClearAuditHooks when PyObject available. */
13091307
if (is_main_interp) {
13101308
_PySys_ClearAuditHooks(tstate);
13111309
}
13121310

1311+
finalize_interp_types(tstate, is_main_interp);
1312+
13131313
if (is_main_interp) {
13141314
/* XXX Still allocated:
13151315
- various static ad-hoc pointers to interned strings

0 commit comments

Comments
 (0)