8000 gh-116869: Fix test_cext for Free Threading by vstinner · Pull Request #117043 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

gh-116869: Fix test_cext for Free Threading #117043

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 3 commits into from
Mar 19, 2024
Merged
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
Next Next commit
gh-116869: Fix test_cext for Free Threading
  • Loading branch information
vstinner committed Mar 19, 2024
commit b641d4bbf15a4c062e703160d7db523e87e10201
11 changes: 7 additions & 4 deletions Lib/test/test_cext/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,14 @@
# 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',
]
# Free Threading doesn't build with -Werror=declaration-after-statement
if not sysconfig.get_config_var('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 = []
Expand Down
0