From: Victor Stinner Date: Tue, 19 Mar 2024 22:23:17 +0000 (+0100) Subject: gh-116869: Fix test_cext for Free Threading (#117043) X-Git-Tag: v3.13.0a6~220 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=d5ebf8b71fd18d7a1f2f6b670a2c18749dc2b55e;p=thirdparty%2FPython%2Fcpython.git gh-116869: Fix test_cext for Free Threading (#117043) Don't check for warnings on Free Threading. --- diff --git a/Lib/test/test_cext/__init__.py b/Lib/test/test_cext/__init__.py index 7bf2381d844d..e4472b335575 100644 --- a/Lib/test/test_cext/__init__.py +++ b/Lib/test/test_cext/__init__.py @@ -40,9 +40,11 @@ class TestExt(unittest.TestCase): def test_build_c99(self): self.check_build('_test_c99_cext', std='c99') + @unittest.skipIf(support.Py_GIL_DISABLED, 'incompatible with Free Threading') def test_build_limited(self): self.check_build('_test_limited_cext', limited=True) + @unittest.skipIf(support.Py_GIL_DISABLED, 'broken for now with Free Threading') def test_build_limited_c11(self): self.check_build('_test_limited_c11_cext', limited=True, std='c11') diff --git a/Lib/test/test_cext/setup.py b/Lib/test/test_cext/setup.py index 17a90caa98b5..1a4ec26f9985 100644 --- a/Lib/test/test_cext/setup.py +++ b/Lib/test/test_cext/setup.py @@ -11,7 +11,7 @@ from setuptools import setup, Extension SOURCE = 'extension.c' -if not support.MS_WINDOWS: +if not support.MS_WINDOWS and not support.Py_GIL_DISABLED: # C compiler flags for GCC and clang CFLAGS = [ # The purpose of test_cext extension is to check that building a C