classification
Title: [subinterpreters] Convert "global" static variable caches in _json to heap variables
Type: Stage: resolved
Components: Library (Lib), Subinterpreters Versions: Python 3.11, Python 3.10
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: christian.heimes, eric.snow, kj, vstinner
Priority: normal Keywords: patch

Created on 2021-01-05 15:54 by kj, last changed 2021-05-17 09:36 by kj. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 24121 merged kj, 2021-01-05 15:59
PR 26161 open kj, 2021-05-16 12:35
Messages (5)
msg384411 - (view) Author: Ken Jin (kj) * (Python committer) Date: 2021-01-05 15:54
_json currently uses a few static locals for caching of PyUnicode and one Exception object.  This patch aims to move them to the heap.

Apologies if this isn't the right way to track subinterpreter issues, I took a look at issue36876 but it seemed like a meta issue to me.
msg386081 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2021-02-01 16:27
New changeset b5931f1d9f1f9f907e5cb6e193154672f78c1225 by Ken Jin in branch 'master':
bpo-42834: Fix _json internal caches for subinterpreters (GH-24121)
https://github.com/python/cpython/commit/b5931f1d9f1f9f907e5cb6e193154672f78c1225
msg393741 - (view) Author: Ken Jin (kj) * (Python committer) Date: 2021-05-16 12:34
Hi Victor, I'm re-using this issue as I'm doing a similar change to compile.c. I hope you're alright with that.
msg393786 - (view) Author: Christian Heimes (christian.heimes) * (Python committer) Date: 2021-05-17 06:36
KJ, please create a new bug for compile.c. bpo's are cheap to create.
msg393801 - (view) Author: Ken Jin (kj) * (Python committer) Date: 2021-05-17 09:36
Hi Christian and Victor, thanks for the advice! Points taken. I'll keep in mind to create a new issue for similar things in the future so things are less confusing for everyone.

The new issue for this is Issue44156.
History
Date User Action Args
2021-05-17 09:36:06kjsetmessages: + msg393801
2021-05-17 06:36:38christian.heimessettitle: [subinterpreters] Make static caches in various places subinterpreter compatible -> [subinterpreters] Convert "global" static variable caches in _json to heap variables
2021-05-17 06:36:25christian.heimessetstatus: open -> closed

nosy: + christian.heimes
messages: + msg393786

resolution: fixed
stage: patch review -> resolved
2021-05-16 12:35:42kjsetstage: resolved -> patch review
pull_requests: + pull_request24795
2021-05-16 12:34:07kjsetstatus: closed -> open
versions: + Python 3.11
title: [subinterpreters] Convert "global" static variable caches in _json to heap variables -> [subinterpreters] Make static caches in various places subinterpreter compatible
messages: + msg393741

resolution: fixed -> (no value)
2021-02-01 16:27:44vstinnersetstatus: open -> closed
resolution: fixed
stage: patch review -> resolved
2021-02-01 16:27:05vstinnersetmessages: + msg386081
2021-01-05 15:59:21kjsetkeywords: + patch
stage: patch review
pull_requests: + pull_request22952
2021-01-05 15:54:05kjcreate