mirror of
https://github.com/python/cpython.git
synced 2025-08-25 11:15:02 +00:00
gh-102660: Handle m_copy Specially for the sys and builtins Modules (gh-102661)
It doesn't make sense to use multi-phase init for these modules. Using a per-interpreter "m_copy" (instead of PyModuleDef.m_base.m_copy) makes this work okay. (This came up while working on gh-101660.) Note that we might instead end up disallowing re-load for sys/builtins since they are so special. https://github.com/python/cpython/issues/102660
This commit is contained in:
parent
80abd62647
commit
cdb21ba74d
5 changed files with 44 additions and 4 deletions
|
@ -805,6 +805,7 @@ interpreter_clear(PyInterpreterState *interp, PyThreadState *tstate)
|
|||
assert(interp->imports.importlib == NULL);
|
||||
assert(interp->imports.import_func == NULL);
|
||||
|
||||
Py_CLEAR(interp->sysdict_copy);
|
||||
Py_CLEAR(interp->builtins_copy);
|
||||
Py_CLEAR(interp->dict);
|
||||
#ifdef HAVE_FORK
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue