[issue39465] Design a subinterpreter friendly alternative to _Py_IDENTIFIER

Petr Viktorin report at bugs.python.org
Thu Jan 30 06:53:21 EST 2020


Petr Viktorin <encukou at gmail.com> added the comment:

> What is the problem between _Py_IDENTIFIER and multi-phase initialisation modules?

AFAIK there is no problem now, except possibly a race condition when initializing the identifiers.
It seems it's too easy to conflate porting to multi-phase initialization and getting rid of static state.


The problem will come with per-interpreter reference counting, or when the `str` class is no longer shared across all interpreters. For that, we'll need either per-interpreter identifiers, or solve the issue in another way.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue39465>
_______________________________________


More information about the Python-bugs-list mailing list