Skip to content

Conversation

@vstinner
Copy link
Member

@vstinner vstinner commented Mar 14, 2025

@vstinner vstinner marked this pull request as draft March 14, 2025 19:39
#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
Member Author

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

@gpshead gpshead 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
Member Author

PR rewritten on top of commit a1aeec6:

commit a1aeec61c4321ba9a6966109343bd88dcf9cb26a
Author: Mark Shannon <[email protected]>
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

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

I wrote this PR to prepare #131356.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants