Skip to content

Commit c6dc4b5

Browse files
committed
Fix Python 3.15 Windows CI
Tests fails on Windows with Python 3.15: "unresolved external symbol PyInit_test_pythoncapi_compat_cext_c11".
1 parent 26ebd12 commit c6dc4b5

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

‎tests/setup.py‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,12 @@
1212
# Set to true to debug C/C++ extensions in gdb
1313
DEBUG = False
1414

15+
MS_WINDOWS = (sys.platform == 'win32')
1516
FREE_THREADING = bool(sysconfig.get_config_var('Py_GIL_DISABLED'))
1617
if sys.implementation.name == 'cpython':
1718
if FREE_THREADING:
18-
TEST_LIMITED_C_API = (sys.version_info >= (3, 15))
19+
# FIXME: test the limited C API on Windows
20+
TEST_LIMITED_C_API = (sys.version_info >= (3, 15)) and not MS_WINDOWS
1921
else:
2022
TEST_LIMITED_C_API = True
2123
else:

‎tests/test_pythoncapi_compat_cext.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2654,7 +2654,7 @@ module_exec(PyObject *module)
26542654

26552655

26562656
// On Python 3.15 and newer, use PySlot API
2657-
#if PY_VERSION_HEX >= 0x030F0000
2657+
#if PY_VERSION_HEX >= 0x030F0000 && !defined(MS_WINDOWS)
26582658

26592659
PyABIInfo_VAR(abi_info);
26602660

0 commit comments

Comments
 (0)