Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 34k
[3.10] bpo-46006: Revert "bpo-40521: Per-interpreter interned strings (GH-20085)" (GH-30422)#30425
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Uh oh!
There was an error while loading. Please reload this page.
Conversation
vstinner commented Jan 6, 2022 • edited by bedevere-bot
Loading Uh oh!
There was an error while loading. Please reload this page.
edited by bedevere-bot
Uh oh!
There was an error while loading. Please reload this page.
vstinner commented Jan 6, 2022
@encukou and @pablogsal: the "Check if the ABI has changed" job failed with: That's right. My PR changes PyInterpreterState which is excluded from the limited C API / stable ABI. How can I merge my PR (fix the CI job)? |
pablogsal commented Jan 6, 2022
pablogsal commented Jan 6, 2022 • edited
Loading Uh oh!
There was an error while loading. Please reload this page.
edited
Uh oh!
There was an error while loading. Please reload this page.
@vstinner could you email python Dev about this ABI change? I think this needs to be discussed broadly before we merge (or not) into 3.10 Alternatively, you can restore the pointer and leave it to be NULL. |
Uh oh!
There was an error while loading. Please reload this page.
vstinner commented Jan 6, 2022
The last time I saw a bug report about an internal structure, the issue was closed as "not a bug": https://bugs.python.org/issue39599 Well, I don't want to bother about this specific revert. It seems like a few persons like to inspect PyInterpreterState structure at runtime in debuggers and profilers, and changing PyInterpreterState is just an annoyance. So I will just do what Pablo suggests, keep the member but don't use it. |
vstinner commented Jan 6, 2022
Good. |
vstinner commented Jan 6, 2022
I cannot merge this PR because of an "unresolved conversation", but I can no longer access the conversation, since it's gone after a |
kumaraditya303 commented Jan 6, 2022
@vstinner As I clicked on conversations it seems it got resolved. |
vstinner commented Jan 6, 2022
You're a magician! You unblocked my PR. |
ericsnowcurrently commented Jan 6, 2022
How did something out of |
vstinner commented Jan 6, 2022
It's excluded from the limited C API. I'm not sure why @pablogsal and @encukou care about it. As I wrote, I'm aware that a few persons rely on the exact PyInterpreterState structure, so if it's possible to avoid modifying it, I prefer to leave it as it is in a Python stable version (3.10.x). In Python 3.11, it's fine to change it since Python 3.11 is not released yet. |
pablogsal commented Jan 6, 2022
We care about it because although is not in the limited C-API, there are projects such as profilers and debuggers that rely on the size of the struct and changing this in a bugfix release is a pain. |
vstinner commented Jan 6, 2022
Does it mean that the GitHub ABI CI doesn't only check the stable ABI, but the whole ABI? |
pablogsal commented Jan 8, 2022 • edited
Loading Uh oh!
There was an error while loading. Please reload this page.
edited
Uh oh!
There was an error while loading. Please reload this page.
You can see what it does: Line 761 in bea3f42
It checks from all the symbols exposed from the shared object, which is a superset of the stable ABI. |
encukou commented Jan 9, 2022
The stable ABI (and limited API) should be stable across all 3.x versions. |
ericsnowcurrently commented Jan 10, 2022
Right. I wasn't thinking about backports when I asked about the stable ABI. We definitely should not be breaking any ABI in a bugfix release. The CI check that caught the ABI change is definitely valuable. |
This reverts commit ea25180.
Keep "assert(interned == NULL);" in _PyUnicode_Fini(), but only for
the main interpreter.
Keep _PyUnicode_ClearInterned() changes avoiding the creation of a
temporary Python list object.
(cherry picked from commit 35d6540)
https://bugs.python.org/issue46006