From 41010184880151d6ae02a226dbacc796e5c90d11 Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Sat, 26 Dec 2020 01:45:43 +0100 Subject: bpo-42745: Make the type cache per-interpreter (GH-23947) Make the type attribute lookup cache per-interpreter. Add private _PyType_InitCache() function, called by PyInterpreterState_New(). Continue to share next_version_tag between interpreters, since static types are still shared by interpreters. Remove MCACHE macro: the cache is no longer disabled if the EXPERIMENTAL_ISOLATED_SUBINTERPRETERS macro is defined. --- Python/pylifecycle.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Python/pylifecycle.c') diff --git a/Python/pylifecycle.c b/Python/pylifecycle.c index 8d744c7bfd4..c3c1aa22e94 100644 --- a/Python/pylifecycle.c +++ b/Python/pylifecycle.c @@ -1750,7 +1750,7 @@ Py_FinalizeEx(void) _PyImport_Fini(); /* Cleanup typeobject.c's internal caches. */ - _PyType_Fini(); + _PyType_Fini(tstate); /* unload faulthandler module */ _PyFaulthandler_Fini(); -- cgit v1.2.3