Repository navigation
Reorganize pycore_pystate.h header #84449
Copy link
Copy link
Closed
Labels
3.9 (EOL)end of lifeend of lifeinterpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)
Description
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
assignee = None
closed_at = <Date 2020-04-15.13:50:06.991>
created_at = <Date 2020-04-12.23:01:07.834>
labels = ['interpreter-core', '3.9']
title = 'Reorganize pycore_pystate.h header'
updated_at = <Date 2020-04-15.13:50:06.990>
user = 'https://github.com/vstinner'bugs.python.org fields:
activity = <Date 2020-04-15.13:50:06.990>
actor = 'vstinner'
assignee = 'none'
closed = True
closed_date = <Date 2020-04-15.13:50:06.991>
closer = 'vstinner'
components = ['Interpreter Core']
creation = <Date 2020-04-12.23:01:07.834>
creator = 'vstinner'
dependencies = []
files = []
hgrepos = []
issue_num = 40268
keywords = ['patch']
message_count = 16.0
messages = ['366274', '366279', '366292', '366352', '366378', '366385', '366395', '366398', '366465', '366466', '366467', '366469', '366472', '366477', '366510', '366516']
nosy_count = 1.0
nosy_names = ['vstinner']
pr_nums = ['19492', '19493', '19505', '19509', '19510', '19515', '19529', '19530', '19531', '19532', '19533', '19536']
priority = 'normal'
resolution = 'fixed'
stage = 'resolved'
status = 'closed'
superseder = None
type = None
url = 'https://bugs.python.org/issue40268'
versions = ['Python 3.9']Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
3.9 (EOL)end of lifeend of lifeinterpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)
Activity
vstinner commentedon Apr 12, 2020
Over the time, pycore_pystate.h header file becomes more and more complex. It exposes too many internals whereas most consumers only need basic functions like _PyThreadState_GET().
I plan to use this issue as a placeholder for changes to reorganize pycore_pystate.h. I'm working on multiple pull requests.
vstinner commentedon Apr 13, 2020
New changeset da7933e by Victor Stinner in branch 'master':
bpo-40268: Add _PyInterpreterState_GetConfig() (GH-19492)
da7933e
vstinner commentedon Apr 13, 2020
New changeset 1c4cbdf by Victor Stinner in branch 'master':
bpo-40268: Add pycore_runtime.h header file (GH-19493)
1c4cbdf
vstinner commentedon Apr 13, 2020
New changeset 0c13e1f by Victor Stinner in branch 'master':
bpo-40241: Add pycore_interp.h header (GH-19499)
0c13e1f
vstinner commentedon Apr 14, 2020
New changeset 4a3fe08 by Victor Stinner in branch 'master':
bpo-40268: Include explicitly pycore_interp.h (GH-19505)
4a3fe08
vstinner commentedon Apr 14, 2020
New changeset 81a7be3 by Victor Stinner in branch 'master':
bpo-40268: Rename _PyInterpreterState_GET_UNSAFE() (GH-19509)
81a7be3
vstinner commentedon Apr 14, 2020
New changeset e5014be by Victor Stinner in branch 'master':
bpo-40268: Remove a few pycore_pystate.h includes (GH-19510)
e5014be
vstinner commentedon Apr 14, 2020
New changeset e560f90 by Victor Stinner in branch 'master':
bpo-40268: Move struct _gc_runtime_state to pycore_gc.h (GH-19515)
e560f90
vstinner commentedon Apr 14, 2020
See also bpo-2897: Deprecate structmember.h.
vstinner commentedon Apr 15, 2020
New changeset 62183b8 by Victor Stinner in branch 'master':
bpo-40268: Remove explicit pythread.h includes (bpo-19529)
62183b8
vstinner commentedon Apr 15, 2020
New changeset 4a21e57 by Victor Stinner in branch 'master':
bpo-40268: Remove unused structmember.h includes (GH-19530)
4a21e57
vstinner commentedon Apr 15, 2020
New changeset d9ea5ca by Victor Stinner in branch 'master':
bpo-40268: Remove unused pycore_pymem.h includes (GH-19531)
d9ea5ca
vstinner commentedon Apr 15, 2020
New changeset 361dcdc by Victor Stinner in branch 'master':
bpo-40268: Remove unused osdefs.h includes (GH-19532)
361dcdc
vstinner commentedon Apr 15, 2020
New changeset 4f98f46 by Victor Stinner in branch 'master':
bpo-40268: Remove unused imports in pylifecycle.c (GH-19533)
4f98f46
vstinner commentedon Apr 15, 2020
New changeset 5eca75d by Victor Stinner in branch 'master':
bpo-40268: Reformat posixmodule.c includes (GH-19536)
5eca75d
vstinner commentedon Apr 15, 2020
That's basically done: pycore_pystate.h no longer defines PyInterpreterState structure. pycore_interp.h must now be included explicitly. It's now included by the following files:
I also pushed many cleanup changes. I think that it's now enough, I close the issue ;-)