Skip to content

Conversation

@vstinner
Copy link
Member

@vstinnervstinner commented Mar 14, 2025

#include "pycore_lock.h" // _PyOnceFlag
#include "pycore_modsupport.h" // _PyArg_NoPositional()
#include "pycore_pystate.h" // _PyInterpreterState_GET()
#include "pycore_runtime.h" // _Py_ID()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

_Py_ID is defined in pycore_global_strings.h

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, I see your comment on the issue... it needs access to _PyRuntime's internals.

Copy link
MemberAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, in practice, pycore_runtime.h should be used.

Copy link
Member

@gpsheadgpshead left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

approving as a general concept without trying to understand each one of these directly under the assumption you know what you're doing to try and move towards a less tangled circular mess and anything actually wrong here would fail to build.

@vstinner
Copy link
MemberAuthor

PR rewritten on top of commit a1aeec6:

commit a1aeec61c4321ba9a6966109343bd88dcf9cb26a Author: Mark Shannon <mark@hotpy.org> Date: Mon Mar 17 09:19:04 2025 +0000 GH-131238: Core header refactor (GH-131250) * Moves most structs in pycore_ header files into pycore_structs.h and pycore_runtime_structs.h * Removes many cross-header dependencies 

@vstinnervstinner marked this pull request as ready for review March 17, 2025 11:32
@vstinnervstinner merged commit 978e37b into python:mainMar 17, 2025
45 checks passed
@vstinnervstinner deleted the pycore_deps branch March 17, 2025 11:32
@vstinner
Copy link
MemberAuthor

I wrote this PR to prepare #131356.

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

@vstinner@gpshead@colesbury@JelleZijlstra