]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
bpo-21222: Fix improperly merged change so that final hooks are called before types...
authorSteve Dower <steve.dower@python.org>
Fri, 3 Jul 2020 22:34:46 +0000 (23:34 +0100)
committerGitHub <noreply@github.com>
Fri, 3 Jul 2020 22:34:46 +0000 (23:34 +0100)
Python/pylifecycle.c

index e2188080686109cf0b37c1a9c69f407edd217b1e..00a9b99be4aa3f9d66d0539d58a7264a09600b14 100644 (file)
@@ -1301,8 +1301,6 @@ finalize_interp_clear(PyThreadState *tstate)
         _PyGC_CollectNoFail();
     }
 
-    finalize_interp_types(tstate, is_main_interp);
-
     /* Clear all loghooks */
     /* Both _PySys_Audit function and users still need PyObject, such as tuple.
        Call _PySys_ClearAuditHooks when PyObject available. */
@@ -1310,6 +1308,8 @@ finalize_interp_clear(PyThreadState *tstate)
         _PySys_ClearAuditHooks(tstate);
     }
 
+    finalize_interp_types(tstate, is_main_interp);
+
     if (is_main_interp) {
         /* XXX Still allocated:
            - various static ad-hoc pointers to interned strings