Mercurial > cpython-lru_cache-weakref
diff Python/import.c @ 85112:1edff836c954
Issue #10241: Clear extension module dict copies at interpreter shutdown.
Patch by Neil Schemenauer, minimally modified.
(re-apply after fix for tkinter-related crash)
| author | Antoine Pitrou <solipsis@pitrou.net> |
|---|---|
| date | Sun, 11 Aug 2013 00:30:09 +0200 |
| parents | 41b1a2bbd3b6 |
| children | ea4130668150 |
line wrap: on
line diff
--- a/Python/import.c Sun Aug 11 00:22:30 2013 +0200 +++ b/Python/import.c Sun Aug 11 00:30:09 2013 +0200 @@ -380,6 +380,8 @@ builtins = interp->builtins; interp->builtins = PyDict_New(); Py_DECREF(builtins); + /* Clear module dict copies stored in the interpreter state */ + _PyState_ClearModules(); /* Collect references */ _PyGC_CollectNoFail(); /* Dump GC stats before it's too late, since it uses the warnings
