From de98e1b1317657783bf4d3f4f6e04a3ad1c8fc88 Mon Sep 17 00:00:00 2001 From: Jonathan Helmus Date: Wed, 11 Feb 2026 08:18:33 -0600 Subject: [PATCH 1/6] CPython 3.15.0a5 -> 3.15.0a6 --- pythonbuild/downloads.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pythonbuild/downloads.py b/pythonbuild/downloads.py index d17f02152..e7af6c069 100644 --- a/pythonbuild/downloads.py +++ b/pythonbuild/downloads.py @@ -93,10 +93,10 @@ "python_tag": "cp314", }, "cpython-3.15": { - "url": "https://www.python.org/ftp/python/3.15.0/Python-3.15.0a5.tar.xz", - "size": 34829268, - "sha256": "fee40da6450b67547c079dcb2852e8a03db6d57e06415466b2d3294449db22ef", - "version": "3.15.0a5", + "url": "https://www.python.org/ftp/python/3.15.0/Python-3.15.0a6.tar.xz", + "size": 34950024, + "sha256": "8e2a4e1b2afb93a84d659d431b1f384544b3da00a4b8ff5bf3580f07ad4ff989", + "version": "3.15.0a6", "licenses": ["Python-2.0", "CNRI-Python"], "license_file": "LICENSE.cpython.txt", "python_tag": "cp315", From e93f477443efccd3bae028fd363b18cc87fb973d Mon Sep 17 00:00:00 2001 From: Jonathan Helmus Date: Wed, 11 Feb 2026 08:19:33 -0600 Subject: [PATCH 2/6] remove unnedded optimized-static-colors patch --- cpython-unix/build-cpython.sh | 8 -------- cpython-unix/patch-optimizer-static-colors.patch | 13 ------------- 2 files changed, 21 deletions(-) delete mode 100644 cpython-unix/patch-optimizer-static-colors.patch diff --git a/cpython-unix/build-cpython.sh b/cpython-unix/build-cpython.sh index a95e3adfb..86f66882f 100755 --- a/cpython-unix/build-cpython.sh +++ b/cpython-unix/build-cpython.sh @@ -324,14 +324,6 @@ if [ -n "${PYTHON_MEETS_MINIMUM_VERSION_3_14}" ]; then patch -p1 -i ${ROOT}/patch-python-relative-build-details.patch fi -# Mark the COLORS global variable static to prevent it from -# conflicting with the symbol in the ncurses library. -# Fix has been merged upstream, drop in next 3.15 release -# https://github.com/python/cpython/pull/143846 -if [ -n "${PYTHON_MEETS_MINIMUM_VERSION_3_15}" ]; then - patch -p1 -i ${ROOT}/patch-optimizer-static-colors.patch -fi - # Most bits look at CFLAGS. But setup.py only looks at CPPFLAGS. # So we need to set both. CFLAGS="${EXTRA_TARGET_CFLAGS} -fPIC -I${TOOLS_PATH}/deps/include -I${TOOLS_PATH}/deps/include/ncursesw" diff --git a/cpython-unix/patch-optimizer-static-colors.patch b/cpython-unix/patch-optimizer-static-colors.patch deleted file mode 100644 index 6b8ef77f1..000000000 --- a/cpython-unix/patch-optimizer-static-colors.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/Python/optimizer.c b/Python/optimizer.c -index a2a1feb8b9e..c5f47d7f22c 100644 ---- a/Python/optimizer.c -+++ b/Python/optimizer.c -@@ -2009,7 +2009,7 @@ find_line_number(PyCodeObject *code, _PyExecutorObject *executor) - #define BLACK "#000000" - #define LOOP "#00c000" - --const char *COLORS[10] = { -+static const char *COLORS[10] = { - "9", - "8", - "7", From 4218ad065dc8cb6ab1d3ad8d04ba82f3f48e9f06 Mon Sep 17 00:00:00 2001 From: Jonathan Helmus Date: Wed, 11 Feb 2026 08:19:59 -0600 Subject: [PATCH 3/6] enable tail call for free-theading on Windows for 3.15 --- cpython-windows/build.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/cpython-windows/build.py b/cpython-windows/build.py index 3b27e6793..7b2cb301f 100644 --- a/cpython-windows/build.py +++ b/cpython-windows/build.py @@ -752,8 +752,7 @@ def run_msbuild( args.append("/property:DisableGil=true") # Build tail-calling Python for 3.15+ - # TODO(jjh) Remove 'not freethreaded' when 3.15.0a6 released - if python_version.startswith("3.15") and platform == "x64" and not freethreaded: + if python_version.startswith("3.15") and platform == "x64": args.append("/property:PlatformToolset=v145") args.append("/property:UseTailCallInterp=true") From 687208dbd87c6b25f7e7805418e142d662e63ea3 Mon Sep 17 00:00:00 2001 From: Jonathan Helmus Date: Wed, 11 Feb 2026 08:32:02 -0600 Subject: [PATCH 4/6] add interpreter.c to _testiternalcapi module for 3.15 --- cpython-unix/extension-modules.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cpython-unix/extension-modules.yml b/cpython-unix/extension-modules.yml index 0bccd0f25..4dbde9107 100644 --- a/cpython-unix/extension-modules.yml +++ b/cpython-unix/extension-modules.yml @@ -652,6 +652,8 @@ _testinternalcapi: minimum-python-version: "3.13" - source: _testinternalcapi/complex.c minimum-python-version: "3.14" + - source: _testinternalcapi/interpreter.c + minimum-python-version: "3.15" _testmultiphase: minimum-python-version: '3.10' From fba41df9b46086234747705e877fabb1afe9fe8f Mon Sep 17 00:00:00 2001 From: Jonathan Helmus Date: Wed, 11 Feb 2026 09:31:15 -0600 Subject: [PATCH 5/6] patch _testiternalcapi to extern symbol --- cpython-unix/build-cpython.sh | 5 +++++ .../patch-testinternalcapi-interpreter-extern.patch | 13 +++++++++++++ 2 files changed, 18 insertions(+) create mode 100644 cpython-unix/patch-testinternalcapi-interpreter-extern.patch diff --git a/cpython-unix/build-cpython.sh b/cpython-unix/build-cpython.sh index 86f66882f..1795326bc 100755 --- a/cpython-unix/build-cpython.sh +++ b/cpython-unix/build-cpython.sh @@ -324,6 +324,11 @@ if [ -n "${PYTHON_MEETS_MINIMUM_VERSION_3_14}" ]; then patch -p1 -i ${ROOT}/patch-python-relative-build-details.patch fi +# Mark _Py_jit_entry as extern in _testiternalcapi/interpreter.c to avoid a duplicate symbols. +if [ -n "${PYTHON_MEETS_MINIMUM_VERSION_3_15}" ]; then + patch -p1 -i ${ROOT}/patch-testinternalcapi-interpreter-extern.patch +fi + # Most bits look at CFLAGS. But setup.py only looks at CPPFLAGS. # So we need to set both. CFLAGS="${EXTRA_TARGET_CFLAGS} -fPIC -I${TOOLS_PATH}/deps/include -I${TOOLS_PATH}/deps/include/ncursesw" diff --git a/cpython-unix/patch-testinternalcapi-interpreter-extern.patch b/cpython-unix/patch-testinternalcapi-interpreter-extern.patch new file mode 100644 index 000000000..4ddfc75c4 --- /dev/null +++ b/cpython-unix/patch-testinternalcapi-interpreter-extern.patch @@ -0,0 +1,13 @@ +diff --git a/Modules/_testinternalcapi/interpreter.c b/Modules/_testinternalcapi/interpreter.c +index 2cd23fa3c58..653332f7073 100644 +--- a/Modules/_testinternalcapi/interpreter.c ++++ b/Modules/_testinternalcapi/interpreter.c +@@ -21,7 +21,7 @@ stop_tracing_and_jit(PyThreadState *tstate, _PyInterpreterFrame *frame) + } + #endif + +-_PyJitEntryFuncPtr _Py_jit_entry; ++extern _PyJitEntryFuncPtr _Py_jit_entry; + + #if _Py_TAIL_CALL_INTERP + #include "test_targets.h" From a03f6131af14b2335266482d6b255d2bea7558fb Mon Sep 17 00:00:00 2001 From: Jonathan Helmus Date: Wed, 11 Feb 2026 16:58:08 -0600 Subject: [PATCH 6/6] expand comment --- cpython-unix/build-cpython.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cpython-unix/build-cpython.sh b/cpython-unix/build-cpython.sh index 1795326bc..5c5c516d5 100755 --- a/cpython-unix/build-cpython.sh +++ b/cpython-unix/build-cpython.sh @@ -325,6 +325,8 @@ if [ -n "${PYTHON_MEETS_MINIMUM_VERSION_3_14}" ]; then fi # Mark _Py_jit_entry as extern in _testiternalcapi/interpreter.c to avoid a duplicate symbols. +# The symbol is not actually used in the module, a better solution should be found, see: +# https://github.com/python/cpython/issues/144712 if [ -n "${PYTHON_MEETS_MINIMUM_VERSION_3_15}" ]; then patch -p1 -i ${ROOT}/patch-testinternalcapi-interpreter-extern.patch fi