]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-116869: Fix test_cext for Free Threading (#117043)
authorVictor Stinner <vstinner@python.org>
Tue, 19 Mar 2024 22:23:17 +0000 (23:23 +0100)
committerGitHub <noreply@github.com>
Tue, 19 Mar 2024 22:23:17 +0000 (23:23 +0100)
Don't check for warnings on Free Threading.

Lib/test/test_cext/__init__.py
Lib/test/test_cext/setup.py

index 7bf2381d844d1c1aa55102855341880228e4706d..e4472b3355759c8cc5e19c5651ad38438b2c33a2 100644 (file)
@@ -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')
 
index 17a90caa98b5662212de248af32a04080a550dd8..1a4ec26f9985d3f7727b439ab790d991f4da9975 100644 (file)
@@ -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