summaryrefslogtreecommitdiff
path: root/Python/pythonrun.c
diff options
context:
space:
mode:
Diffstat (limited to 'Python/pythonrun.c')
-rw-r--r--Python/pythonrun.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/Python/pythonrun.c b/Python/pythonrun.c
index 9b72908df6..7cee8e4eda 100644
--- a/Python/pythonrun.c
+++ b/Python/pythonrun.c
@@ -404,6 +404,9 @@ Py_Finalize(void)
Py_XDECREF(warnings_module);
warnings_module = NULL;
+ /* Clear type lookup cache */
+ PyType_ClearCache();
+
/* Collect garbage. This may call finalizers; it's nice to call these
* before all modules are destroyed.
* XXX If a __del__ or weakref callback is triggered here, and tries to