Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Revert the poisoning for now
  • Loading branch information
encukou committed Apr 7, 2026
commit 1cd72a7587a6202ca0499c907d0ec8948499a0f2
11 changes: 0 additions & 11 deletions Include/pyport.h
Original file line number Diff line number Diff line change
Expand Up @@ -83,17 +83,6 @@
// locking needed in for free-threaded interpreters builds.
# define Py_GIL_DISABLED
# endif
# if defined(_Py_IS_TESTCEXT)
// When compiling for abi3t, contents of Python.h should not depend
// on Py_GIL_DISABLED.
// We ask GCC to error if it sees the macro from this point on.
// Since users are free to the macro, and there's no way to undo the poisoning
// at the end of Python.h, we only do this in a test module.
# ifdef __GNUC__
# undef Py_GIL_DISABLED
# pragma GCC poison Py_GIL_DISABLED
# endif
# endif
#endif


Expand Down
5 changes: 0 additions & 5 deletions Lib/test/test_cext/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,6 @@
# The purpose of test_cext extension is to check that building a C
# extension using the Python C API does not emit C compiler warnings.
'-Werror',
# Enable extra checks for header files, which:
# - need to be enabled somewhere inside Python headers (rather than
# before including Python.h)
# - should not be checked for user code
'-D_Py_IS_TESTCEXT',
]

# C compiler flags for GCC and clang
Expand Down
Loading