diff --git a/cpython-unix/build-cpython.sh b/cpython-unix/build-cpython.sh index a95e3adfb..5c5c516d5 100755 --- a/cpython-unix/build-cpython.sh +++ b/cpython-unix/build-cpython.sh @@ -324,12 +324,11 @@ 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 +# 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-optimizer-static-colors.patch + patch -p1 -i ${ROOT}/patch-testinternalcapi-interpreter-extern.patch fi # Most bits look at CFLAGS. But setup.py only looks at CPPFLAGS. 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' 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", 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" 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") 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",