This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: [internals] Pass the current interpreter (interp) rather than the current Python thread state (state)
Type: Stage: resolved
Components: Interpreter Core Versions: Python 3.10
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: vstinner
Priority: normal Keywords: patch

Created on 2021-02-19 11:59 by vstinner, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 24576 merged vstinner, 2021-02-19 12:00
PR 24577 merged vstinner, 2021-02-19 12:01
PR 24580 merged vstinner, 2021-02-19 13:40
PR 24581 merged vstinner, 2021-02-19 13:42
PR 24583 merged vstinner, 2021-02-19 14:18
Messages (6)
msg387308 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2021-02-19 11:59
I modified many internal C functions to pass the current Python thread state (tstate), but in practice, only the current interpreter (interp) is needed.
msg387311 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2021-02-19 12:21
New changeset 5592f2b9daa24bf74cc616abcc40a29da2bdccb2 by Victor Stinner in branch 'master':
bpo-43268: Replace _PyThreadState_GET() with _PyInterpreterState_GET() (GH-24576)
https://github.com/python/cpython/commit/5592f2b9daa24bf74cc616abcc40a29da2bdccb2
msg387315 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2021-02-19 12:33
New changeset 101bf69ff18a946fed7c274f088878aaf85174cc by Victor Stinner in branch 'master':
bpo-43268: _Py_IsMainInterpreter() now expects interp (GH-24577)
https://github.com/python/cpython/commit/101bf69ff18a946fed7c274f088878aaf85174cc
msg387321 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2021-02-19 14:08
New changeset acde3f1530f1664c9ec7f22e16a7f54c5191e4a6 by Victor Stinner in branch 'master':
bpo-43268: Remove abusive usage of tstate in sysmodule.c (#24581)
https://github.com/python/cpython/commit/acde3f1530f1664c9ec7f22e16a7f54c5191e4a6
msg387323 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2021-02-19 14:10
New changeset bcb094b41f7fe4dd1686c50891d85632fcf0d481 by Victor Stinner in branch 'master':
bpo-43268: Pass interp rather than tstate to internal functions (GH-24580)
https://github.com/python/cpython/commit/bcb094b41f7fe4dd1686c50891d85632fcf0d481
msg387326 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2021-02-19 14:51
New changeset 839184f85cb2d2ad514fff9b431733d1c9607533 by Victor Stinner in branch 'master':
bpo-43268: local_clear() uses _PyInterpreterState_GET() (GH-24583)
https://github.com/python/cpython/commit/839184f85cb2d2ad514fff9b431733d1c9607533
History
Date User Action Args
2022-04-11 14:59:41adminsetgithub: 87434
2021-02-19 14:52:27vstinnersetstatus: open -> closed
resolution: fixed
stage: patch review -> resolved
2021-02-19 14:51:58vstinnersetmessages: + msg387326
2021-02-19 14:18:54vstinnersetpull_requests: + pull_request23362
2021-02-19 14:10:52vstinnersetmessages: + msg387323
2021-02-19 14:08:02vstinnersetmessages: + msg387321
2021-02-19 13:42:21vstinnersetpull_requests: + pull_request23360
2021-02-19 13:40:11vstinnersetpull_requests: + pull_request23359
2021-02-19 12:33:34vstinnersetmessages: + msg387315
2021-02-19 12:21:31vstinnersetmessages: + msg387311
2021-02-19 12:01:48vstinnersetpull_requests: + pull_request23356
2021-02-19 12:00:31vstinnersetkeywords: + patch
stage: patch review
pull_requests: + pull_request23355
2021-02-19 11:59:23vstinnercreate