From 81c21137f3025223e58036c343987bb054fa1a3a Mon Sep 17 00:00:00 2001 From: Jonathan Helmus Date: Wed, 14 Jan 2026 10:03:18 -0600 Subject: [PATCH 1/2] CPython 3.15.0a4 -> 3.15.0a5 --- pythonbuild/downloads.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pythonbuild/downloads.py b/pythonbuild/downloads.py index 8ae55371b..63588335e 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.0a4.tar.xz", - "size": 34778104, - "sha256": "a0a521d5c480b89979da1aefce29750eb158128c0178728ebfef7511c21b4e77", - "version": "3.15.0a4", + "url": "https://www.python.org/ftp/python/3.15.0/Python-3.15.0a5.tar.xz", + "size": 34829268, + "sha256": "fee40da6450b67547c079dcb2852e8a03db6d57e06415466b2d3294449db22ef", + "version": "3.15.0a5", "licenses": ["Python-2.0", "CNRI-Python"], "license_file": "LICENSE.cpython.txt", "python_tag": "cp315", From 1635cf82817820b2436ad4791daae06e428c98b0 Mon Sep 17 00:00:00 2001 From: Jonathan Helmus Date: Wed, 14 Jan 2026 11:53:39 -0600 Subject: [PATCH 2/2] make the COLORS variable static --- cpython-unix/build-cpython.sh | 6 ++++++ cpython-unix/patch-optimizer-static-colors.patch | 13 +++++++++++++ 2 files changed, 19 insertions(+) create mode 100644 cpython-unix/patch-optimizer-static-colors.patch diff --git a/cpython-unix/build-cpython.sh b/cpython-unix/build-cpython.sh index 2c4e58501..c590e2fda 100755 --- a/cpython-unix/build-cpython.sh +++ b/cpython-unix/build-cpython.sh @@ -323,6 +323,12 @@ 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. +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 new file mode 100644 index 000000000..6b8ef77f1 --- /dev/null +++ b/cpython-unix/patch-optimizer-static-colors.patch @@ -0,0 +1,13 @@ +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",