From: Victor Stinner Date: Mon, 9 Feb 2026 16:17:00 +0000 (+0100) Subject: gh-144490: Fix test_cppext on Windows (#144628) X-Git-Tag: v3.15.0a6~25 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=245ba3d6cbef9fa0c0d55ab5e53f21a918e7b898;p=thirdparty%2FPython%2Fcpython.git gh-144490: Fix test_cppext on Windows (#144628) Don't include pycore_backoff.h and pycore_cell.h on Windows, since they emit C++ compiler warnings. --- diff --git a/Lib/test/test_cppext/extension.cpp b/Lib/test/test_cppext/extension.cpp index 038f67bbbe3f..a8cd70aacbc8 100644 --- a/Lib/test/test_cppext/extension.cpp +++ b/Lib/test/test_cppext/extension.cpp @@ -16,10 +16,9 @@ // gh-135906: Check for compiler warnings in the internal C API # include "internal/pycore_frame.h" // mimalloc emits many compiler warnings when Python is built in debug - // mode (when MI_DEBUG is not zero) - // mimalloc emits compiler warnings when Python is built on Windows - // in free-threaded mode. -# if !defined(Py_DEBUG) && !(defined(MS_WINDOWS) && defined(Py_GIL_DISABLED)) + // mode (when MI_DEBUG is not zero). + // mimalloc emits compiler warnings when Python is built on Windows. +# if !defined(Py_DEBUG) && !defined(MS_WINDOWS) # include "internal/pycore_backoff.h" # include "internal/pycore_cell.h" # endif