Skip to content

gh-131238: Remove pycore_lock.h includes #131483

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 19, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Include/internal/pycore_ast_state.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 0 additions & 2 deletions Include/internal/pycore_atexit.h
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
#ifndef Py_INTERNAL_ATEXIT_H
#define Py_INTERNAL_ATEXIT_H

#include "pycore_lock.h" // PyMutex

#ifdef __cplusplus
extern "C" {
#endif
Expand Down
1 change: 0 additions & 1 deletion Include/internal/pycore_brc.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@

#include <stdint.h>
#include "pycore_llist.h" // struct llist_node
#include "pycore_lock.h" // PyMutex
#include "pycore_object_stack.h" // _PyObjectStack

#ifdef __cplusplus
Expand Down
1 change: 0 additions & 1 deletion Include/internal/pycore_ceval_state.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ extern "C" {
# error "this header requires Py_BUILD_CORE define"
#endif

#include "pycore_lock.h" // PyMutex
#include "pycore_gil.h" // struct _gil_runtime_state


Expand Down
1 change: 0 additions & 1 deletion Include/internal/pycore_code.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ extern "C" {

#include "pycore_structs.h" // _Py_CODEUNIT
#include "pycore_stackref.h" // _PyStackRef
#include "pycore_lock.h" // PyMutex
#include "pycore_backoff.h" // _Py_BackoffCounter
#include "pycore_tstate.h" // _PyThreadStateImpl

Expand Down
1 change: 0 additions & 1 deletion Include/internal/pycore_codecs.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ extern "C" {
#endif

#include "pycore_interp_structs.h" // struct codecs_state
#include "pycore_lock.h" // PyMutex

/* Initialize codecs-related state for the given interpreter, including
registering the first codec search function. Must be called before any other
Expand Down
2 changes: 1 addition & 1 deletion Include/internal/pycore_critical_section.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
# error "this header requires Py_BUILD_CORE define"
#endif

#include "pycore_lock.h" // PyMutex
#include "pycore_lock.h" // PyMutex_LockFast()
#include "pycore_pystate.h" // _PyThreadState_GET()
#include <stdint.h>

Expand Down
1 change: 0 additions & 1 deletion Include/internal/pycore_crossinterp.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ extern "C" {
# error "this header requires Py_BUILD_CORE define"
#endif

#include "pycore_lock.h" // PyMutex
#include "pycore_pyerrors.h"


Expand Down
2 changes: 0 additions & 2 deletions Include/internal/pycore_function.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
extern "C" {
#endif

#include "pycore_lock.h"

#ifndef Py_BUILD_CORE
# error "this header requires Py_BUILD_CORE define"
#endif
Expand Down
1 change: 0 additions & 1 deletion Include/internal/pycore_import.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ extern "C" {

#include "pycore_hashtable.h" // _Py_hashtable_t
#include "pycore_interp_structs.h" // _import_state
#include "pycore_lock.h" // PyMutex

extern int _PyImport_IsInitialized(PyInterpreterState *);

Expand Down
1 change: 0 additions & 1 deletion Include/internal/pycore_pymem.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
#define Py_INTERNAL_PYMEM_H

#include "pycore_llist.h" // struct llist_node
#include "pycore_lock.h" // PyMutex

#ifdef __cplusplus
extern "C" {
Expand Down
1 change: 0 additions & 1 deletion Include/internal/pycore_qsbr.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@

#include <stdbool.h>
#include <stdint.h>
#include "pycore_lock.h" // PyMutex

#ifdef __cplusplus
extern "C" {
Expand Down
1 change: 0 additions & 1 deletion Include/internal/pycore_unicodeobject.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ extern "C" {
# error "this header requires Py_BUILD_CORE define"
#endif

#include "pycore_lock.h" // PyMutex
#include "pycore_fileutils.h" // _Py_error_handler
#include "pycore_ucnhash.h" // _PyUnicode_Name_CAPI
#include "pycore_global_objects.h" // _Py_SINGLETON
Expand Down
2 changes: 1 addition & 1 deletion Include/internal/pycore_weakref.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ extern "C" {
#endif

#include "pycore_critical_section.h" // Py_BEGIN_CRITICAL_SECTION()
#include "pycore_lock.h"
#include "pycore_lock.h" // PyMutex_LockFlags()
#include "pycore_object.h" // _Py_REF_IS_MERGED()
#include "pycore_pyatomic_ft_wrappers.h"

Expand Down
2 changes: 1 addition & 1 deletion Parser/asdl_c.py
Original file line number Diff line number Diff line change
Expand Up @@ -2368,7 +2368,7 @@ def write_internal_h_header(mod, f):
#ifndef Py_INTERNAL_AST_STATE_H
#define Py_INTERNAL_AST_STATE_H

#include "pycore_lock.h" // _PyOnceFlag
#include "pycore_lock.h" // _PyOnceFlag

#ifdef __cplusplus
extern "C" {
Expand Down
Loading