[issue44050] [subinterpreters] _PyImport_FixupExtensionObject() regression in Python 3.9
Petr Viktorin
report at bugs.python.org
Tue Aug 17 09:02:57 EDT 2021
Petr Viktorin <encukou at gmail.com> added the comment:
> Maybe the old behavior was better: if an extension uses the old API, share its state between all interpreters.
Yes, I think the old behavior was better: if an extension uses the old API, share its state between all interpreters.
This is obviously bad, but I don't see how skipping part of initialization (as done in https://github.com/python/cpython/commit/82c83bd907409c287a5bd0d0f4598f2c0538f34d#diff-28cfc3e2868980a79d93d2ebdc8747dcb9231f3dd7f2caef96e74107d1ea3bf3L721-R719 ) is better.
(Note that the "def->m_size == -1" means that the module does not support sub-interpreters, because it has global state, per https://docs.python.org/3/c-api/module.html#c.PyModuleDef.m_size)
----------
nosy: +petr.viktorin
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue44050>
_______________________________________
More information about the Python-bugs-list
mailing list