https://github.com/python/cpython/commit/f4cc77d494ee0e10ed84ce369f0910c70a2f6d44
commit: f4cc77d494ee0e10ed84ce369f0910c70a2f6d44
branch: main
author: Victor Stinner <[email protected]>
committer: vstinner <[email protected]>
date: 2024-03-21T00:06:24+01:00
summary:
gh-116869: Enable -Werror in test_cext for Free Threading (#117106)
Check for warnings, but don't enable the compiler flag
-Werror=declaration-after-statement.
files:
M Lib/test/test_cext/setup.py
diff --git a/Lib/test/test_cext/setup.py b/Lib/test/test_cext/setup.py
index 1a4ec26f9985d3..ccad3fa62ad086 100644
--- a/Lib/test/test_cext/setup.py
+++ b/Lib/test/test_cext/setup.py
@@ -11,17 +11,19 @@
SOURCE = 'extension.c'
-if not support.MS_WINDOWS and not support.Py_GIL_DISABLED:
+if not support.MS_WINDOWS:
# C compiler flags for GCC and clang
CFLAGS = [
# 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',
-
- # gh-116869: The Python C API must be compatible with building
- # with the -Werror=declaration-after-statement compiler flag.
- '-Werror=declaration-after-statement',
]
+ if not support.Py_GIL_DISABLED:
+ CFLAGS.append(
+ # gh-116869: The Python C API must be compatible with building
+ # with the -Werror=declaration-after-statement compiler flag.
+ '-Werror=declaration-after-statement',
+ )
else:
# Don't pass any compiler flag to MSVC
CFLAGS = []
_______________________________________________
Python-checkins mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/python-checkins.python.org/
Member address: [email protected]