bpo-46006: Move the interned strings and identifiers to _PyRuntimeState.#30131
bpo-46006: Move the interned strings and identifiers to _PyRuntimeState.#30131ericsnowcurrently wants to merge 5 commits into
Conversation
|
I didn't review the code but this seems like a good way to fix bpo-46006. We can have more time to figure out how to make them per-interpreter (assuming that's the decision). |
Sorry, something went wrong.
|
I agree with @nascheme that this is probably the best fix for 3.11a4. Let's hope that we can keep the overhead of immortal objects low enough that we can have parallel sub-interpreters and static global objects. |
Sorry, something went wrong.
|
https://bugs.python.org/issue46006 is about interned strings. Fixing this issue doesn't need to share again identifiers between all interpreters. I'm not convinced by the value of moving the structures from PyInterpreterState to _PyRuntimeState. I propose a different PR which only reverts ea25180 : PR #30422. It only moves the |
Sorry, something went wrong.
Currently the interned strings (and strings created for
_Py_IDENTIFIER()) are per-interpreter. This is causing some bugs because other objects which may hold a reference to the string are still global. So until we are closer to moving the bulk of the global objects to per-interpreter, the simplest thing is to move the interned strings (and identifiers) to_PyRuntimeState.https://bugs.python.org/issue46006