diff options
author | Steve Dower <steve.dower@python.org> | 2020-07-03 22:34:46 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-07-03 22:34:46 (GMT) |
commit | 941117aaa32bf8b02c739ad848ac727292f75b05 (patch) | |
tree | c52bfc658463e13547a0a46eb5a81478afcbe102 /Python | |
parent | e1d4fdc53347617bea1aff0d7112471453f65003 (diff) | |
download | cpython-941117aaa32bf8b02c739ad848ac727292f75b05.zip cpython-941117aaa32bf8b02c739ad848ac727292f75b05.tar.gz cpython-941117aaa32bf8b02c739ad848ac727292f75b05.tar.bz2 |
bpo-21222: Fix improperly merged change so that final hooks are called before types are cleared (GH-21304)
Diffstat (limited to 'Python')
-rw-r--r-- | Python/pylifecycle.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Python/pylifecycle.c b/Python/pylifecycle.c index e218808..00a9b99 100644 --- a/Python/pylifecycle.c +++ b/Python/pylifecycle.c @@ -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 |