diff options
Diffstat (limited to 'Python')
| -rw-r--r-- | Python/import.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Python/import.c b/Python/import.c index 1ec7553..8358d70 100644 --- a/Python/import.c +++ b/Python/import.c @@ -710,7 +710,9 @@ _PyImport_FixupExtensionObject(PyObject *mod, PyObject *name, return -1; } - if (_Py_IsMainInterpreter(tstate)) { + // bpo-44050: Extensions and def->m_base.m_copy can be updated + // when the extension module doesn't support sub-interpreters. + if (_Py_IsMainInterpreter(tstate) || def->m_size == -1) { if (def->m_size == -1) { if (def->m_base.m_copy) { /* Somebody already imported the module, |
