Title: [subinterpreters] Replace static string caches with subinterpreter-compatible alternatives
Type: Stage: resolved
Components: Subinterpreters Versions: Python 3.11
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: eric.snow, kj, vstinner
Priority: normal Keywords: patch

Created on 2021-05-17 09:34 by kj, last changed 2021-10-20 16:03 by kj. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 26161 merged kj, 2021-05-17 09:36
Messages (3)
msg393800 - (view) Author: Ken Jin (kj) * (Python committer) Date: 2021-05-17 09:34
Hello, this is a meta issue for replacing cached string constants in various places with alternatives compatible with subinterpreters such as _Py_IDENTIFIER.

Ideally the replacements should not cause any performance regression. But to be safe I would recommend starting in places that aren't "hot".

A list of such caches can be found via a tool created by Eric:

Thanks everyone!
msg394352 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2021-05-25 13:55
New changeset 29669245d4ad760f43853a7a0434143090135331 by Ken Jin in branch 'main':
bpo-44156: Make cached string constants in compile.c subinterpreter compatible (GH-26161)
msg404483 - (view) Author: Ken Jin (kj) * (Python committer) Date: 2021-10-20 16:03
I'll open separate issues for other similar changes.
Date User Action Args
2021-10-20 16:03:49kjsetstatus: open -> closed
resolution: fixed
messages: + msg404483

stage: patch review -> resolved
2021-05-25 13:55:42vstinnersetmessages: + msg394352
2021-05-25 09:57:28vstinnersetcomponents: + Subinterpreters
2021-05-17 09:36:42kjsetkeywords: + patch
stage: patch review
pull_requests: + pull_request24809
2021-05-17 09:34:25kjcreate