From fa73b914dd618384cdc5044731eaa1108ba0abd8 Mon Sep 17 00:00:00 2001 From: "Kevin P. Fleming" Date: Sat, 18 May 2024 15:01:26 -0400 Subject: [PATCH 01/33] Support for Python 3.13. --- .github/workflows/apple.yml | 26 +++ .github/workflows/linux.yml | 168 ++++++++++++++++++ .github/workflows/windows.yml | 1 + cpython-unix/Makefile | 5 + cpython-unix/build-cpython-host.sh | 4 +- cpython-unix/build-cpython.sh | 28 ++- cpython-unix/build-main.py | 1 + cpython-unix/build.py | 6 +- cpython-unix/extension-modules.yml | 52 ++++++ cpython-unix/patch-cpython-pr-119712.patch | 138 ++++++++++++++ cpython-unix/patch-disable-multiarch-13.patch | 17 ++ .../patch-dont-clear-runshared-13.patch | 14 ++ ...atch-macos-link-extension-modules-13.patch | 12 ++ cpython-unix/targets.yml | 18 ++ pythonbuild/cpython.py | 16 +- pythonbuild/downloads.py | 9 + src/validation.rs | 30 +++- 17 files changed, 533 insertions(+), 12 deletions(-) create mode 100644 cpython-unix/patch-cpython-pr-119712.patch create mode 100644 cpython-unix/patch-disable-multiarch-13.patch create mode 100644 cpython-unix/patch-dont-clear-runshared-13.patch create mode 100644 cpython-unix/patch-macos-link-extension-modules-13.patch diff --git a/.github/workflows/apple.yml b/.github/workflows/apple.yml index 8e46ec30..b36a6064 100644 --- a/.github/workflows/apple.yml +++ b/.github/workflows/apple.yml @@ -114,6 +114,19 @@ jobs: py: 'cpython-3.12' optimizations: 'pgo+lto' + - target_triple: 'aarch64-apple-darwin' + runner: macos-14 + py: 'cpython-3.13' + optimizations: 'debug' + - target_triple: 'aarch64-apple-darwin' + runner: macos-14 + py: 'cpython-3.13' + optimizations: 'pgo' + - target_triple: 'aarch64-apple-darwin' + runner: macos-14 + py: 'cpython-3.13' + optimizations: 'pgo+lto' + # macOS on Intel hardware. This is pretty straightforward. We exclude # noopt because it doesn't provide any compelling advantages over PGO # or LTO builds. @@ -181,6 +194,19 @@ jobs: runner: macos-13 py: 'cpython-3.12' optimizations: 'pgo+lto' + + - target_triple: 'x86_64-apple-darwin' + runner: macos-13 + py: 'cpython-3.13' + optimizations: 'debug' + - target_triple: 'x86_64-apple-darwin' + runner: macos-13 + py: 'cpython-3.13' + optimizations: 'pgo' + - target_triple: 'x86_64-apple-darwin' + runner: macos-13 + py: 'cpython-3.13' + optimizations: 'pgo+lto' needs: - pythonbuild runs-on: ${{ matrix.build.runner }} diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 364d982e..4c354cc2 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -175,6 +175,16 @@ jobs: py: 'cpython-3.12' optimizations: 'lto' + - target_triple: 'aarch64-unknown-linux-gnu' + py: 'cpython-3.13' + optimizations: 'debug' + - target_triple: 'aarch64-unknown-linux-gnu' + py: 'cpython-3.13' + optimizations: 'noopt' + - target_triple: 'aarch64-unknown-linux-gnu' + py: 'cpython-3.13' + optimizations: 'lto' + # Cross-compiles can't do PGO and require Python 3.9. - target_triple: 'armv7-unknown-linux-gnueabi' py: 'cpython-3.9' @@ -216,6 +226,16 @@ jobs: py: 'cpython-3.12' optimizations: 'lto' + - target_triple: 'armv7-unknown-linux-gnueabi' + py: 'cpython-3.13' + optimizations: 'debug' + - target_triple: 'armv7-unknown-linux-gnueabi' + py: 'cpython-3.13' + optimizations: 'noopt' + - target_triple: 'armv7-unknown-linux-gnueabi' + py: 'cpython-3.13' + optimizations: 'lto' + # Cross-compiles can't do PGO and require Python 3.9. - target_triple: 'armv7-unknown-linux-gnueabihf' py: 'cpython-3.9' @@ -257,6 +277,16 @@ jobs: py: 'cpython-3.12' optimizations: 'lto' + - target_triple: 'armv7-unknown-linux-gnueabihf' + py: 'cpython-3.13' + optimizations: 'debug' + - target_triple: 'armv7-unknown-linux-gnueabihf' + py: 'cpython-3.13' + optimizations: 'noopt' + - target_triple: 'armv7-unknown-linux-gnueabihf' + py: 'cpython-3.13' + optimizations: 'lto' + # Cross-compiles can't do PGO and require Python 3.9. - target_triple: 'mips-unknown-linux-gnu' py: 'cpython-3.9' @@ -298,6 +328,16 @@ jobs: py: 'cpython-3.12' optimizations: 'lto' + - target_triple: 'mips-unknown-linux-gnu' + py: 'cpython-3.13' + optimizations: 'debug' + - target_triple: 'mips-unknown-linux-gnu' + py: 'cpython-3.13' + optimizations: 'noopt' + - target_triple: 'mips-unknown-linux-gnu' + py: 'cpython-3.13' + optimizations: 'lto' + # Cross-compiles can't do PGO and require Python 3.9. - target_triple: 'mipsel-unknown-linux-gnu' py: 'cpython-3.9' @@ -339,6 +379,16 @@ jobs: py: 'cpython-3.12' optimizations: 'lto' + - target_triple: 'mipsel-unknown-linux-gnu' + py: 'cpython-3.13' + optimizations: 'debug' + - target_triple: 'mipsel-unknown-linux-gnu' + py: 'cpython-3.13' + optimizations: 'noopt' + - target_triple: 'mipsel-unknown-linux-gnu' + py: 'cpython-3.13' + optimizations: 'lto' + # Cross-compiles can't do PGO and require Python 3.9. - target_triple: 's390x-unknown-linux-gnu' py: 'cpython-3.9' @@ -380,6 +430,16 @@ jobs: py: 'cpython-3.12' optimizations: 'lto' + - target_triple: 's390x-unknown-linux-gnu' + py: 'cpython-3.13' + optimizations: 'debug' + - target_triple: 's390x-unknown-linux-gnu' + py: 'cpython-3.13' + optimizations: 'noopt' + - target_triple: 's390x-unknown-linux-gnu' + py: 'cpython-3.13' + optimizations: 'lto' + # Cross-compiles can't do PGO and require Python 3.9. - target_triple: 'ppc64le-unknown-linux-gnu' py: 'cpython-3.9' @@ -421,6 +481,16 @@ jobs: py: 'cpython-3.12' optimizations: 'lto' + - target_triple: 'ppc64le-unknown-linux-gnu' + py: 'cpython-3.13' + optimizations: 'debug' + - target_triple: 'ppc64le-unknown-linux-gnu' + py: 'cpython-3.13' + optimizations: 'noopt' + - target_triple: 'ppc64le-unknown-linux-gnu' + py: 'cpython-3.13' + optimizations: 'lto' + # We don't publish noopt builds when PGO is available. - target_triple: 'x86_64-unknown-linux-gnu' py: 'cpython-3.8' @@ -487,6 +557,19 @@ jobs: optimizations: 'pgo+lto' run: true + - target_triple: 'x86_64-unknown-linux-gnu' + py: 'cpython-3.13' + optimizations: 'debug' + run: true + - target_triple: 'x86_64-unknown-linux-gnu' + py: 'cpython-3.13' + optimizations: 'pgo' + run: true + - target_triple: 'x86_64-unknown-linux-gnu' + py: 'cpython-3.13' + optimizations: 'pgo+lto' + run: true + - target_triple: 'x86_64_v2-unknown-linux-gnu' py: 'cpython-3.9' optimizations: 'debug' @@ -539,6 +622,19 @@ jobs: optimizations: 'pgo+lto' run: true + - target_triple: 'x86_64_v2-unknown-linux-gnu' + py: 'cpython-3.13' + optimizations: 'debug' + run: true + - target_triple: 'x86_64_v2-unknown-linux-gnu' + py: 'cpython-3.13' + optimizations: 'pgo' + run: true + - target_triple: 'x86_64_v2-unknown-linux-gnu' + py: 'cpython-3.13' + optimizations: 'pgo+lto' + run: true + - target_triple: 'x86_64_v3-unknown-linux-gnu' py: 'cpython-3.9' optimizations: 'debug' @@ -591,6 +687,19 @@ jobs: optimizations: 'pgo+lto' run: true + - target_triple: 'x86_64_v3-unknown-linux-gnu' + py: 'cpython-3.13' + optimizations: 'debug' + run: true + - target_triple: 'x86_64_v3-unknown-linux-gnu' + py: 'cpython-3.13' + optimizations: 'pgo' + run: true + - target_triple: 'x86_64_v3-unknown-linux-gnu' + py: 'cpython-3.13' + optimizations: 'pgo+lto' + run: true + # GitHub Actions runners don't support x86-64-v4 so we can't PGO. - target_triple: 'x86_64_v4-unknown-linux-gnu' py: 'cpython-3.9' @@ -633,6 +742,16 @@ jobs: py: 'cpython-3.12' optimizations: 'lto' + - target_triple: 'x86_64_v4-unknown-linux-gnu' + py: 'cpython-3.13' + optimizations: 'debug' + - target_triple: 'x86_64_v4-unknown-linux-gnu' + py: 'cpython-3.13' + optimizations: 'noopt' + - target_triple: 'x86_64_v4-unknown-linux-gnu' + py: 'cpython-3.13' + optimizations: 'lto' + # musl doesn't support PGO. - target_triple: 'x86_64-unknown-linux-musl' py: 'cpython-3.8' @@ -699,6 +818,19 @@ jobs: optimizations: 'lto' run: true + - target_triple: 'x86_64-unknown-linux-musl' + py: 'cpython-3.13' + optimizations: 'debug' + run: true + - target_triple: 'x86_64-unknown-linux-musl' + py: 'cpython-3.13' + optimizations: 'noopt' + run: true + - target_triple: 'x86_64-unknown-linux-musl' + py: 'cpython-3.13' + optimizations: 'lto' + run: true + - target_triple: 'x86_64_v2-unknown-linux-musl' py: 'cpython-3.9' optimizations: 'debug' @@ -751,6 +883,19 @@ jobs: optimizations: 'lto' run: true + - target_triple: 'x86_64_v2-unknown-linux-musl' + py: 'cpython-3.13' + optimizations: 'debug' + run: true + - target_triple: 'x86_64_v2-unknown-linux-musl' + py: 'cpython-3.13' + optimizations: 'noopt' + run: true + - target_triple: 'x86_64_v2-unknown-linux-musl' + py: 'cpython-3.13' + optimizations: 'lto' + run: true + - target_triple: 'x86_64_v3-unknown-linux-musl' py: 'cpython-3.9' optimizations: 'debug' @@ -803,6 +948,19 @@ jobs: optimizations: 'lto' run: true + - target_triple: 'x86_64_v3-unknown-linux-musl' + py: 'cpython-3.13' + optimizations: 'debug' + run: true + - target_triple: 'x86_64_v3-unknown-linux-musl' + py: 'cpython-3.13' + optimizations: 'noopt' + run: true + - target_triple: 'x86_64_v3-unknown-linux-musl' + py: 'cpython-3.13' + optimizations: 'lto' + run: true + - target_triple: 'x86_64_v4-unknown-linux-musl' py: 'cpython-3.9' optimizations: 'debug' @@ -843,6 +1001,16 @@ jobs: py: 'cpython-3.12' optimizations: 'lto' + - target_triple: 'x86_64_v4-unknown-linux-musl' + py: 'cpython-3.13' + optimizations: 'debug' + - target_triple: 'x86_64_v4-unknown-linux-musl' + py: 'cpython-3.13' + optimizations: 'noopt' + - target_triple: 'x86_64_v4-unknown-linux-musl' + py: 'cpython-3.13' + optimizations: 'lto' + needs: - pythonbuild - image diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index 2f2b5f3c..413cdd3f 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -54,6 +54,7 @@ jobs: - 'cpython-3.10' - 'cpython-3.11' - 'cpython-3.12' + - 'cpython-3.13' vcvars: - 'vcvars32.bat' - 'vcvars64.bat' diff --git a/cpython-unix/Makefile b/cpython-unix/Makefile index 08488956..d3225451 100644 --- a/cpython-unix/Makefile +++ b/cpython-unix/Makefile @@ -270,6 +270,8 @@ $(OUTDIR)/cpython-3.11-$(CPYTHON_3.11_VERSION)-$(HOST_PLATFORM).tar: $(PYTHON_HO $(OUTDIR)/cpython-3.12-$(CPYTHON_3.12_VERSION)-$(HOST_PLATFORM).tar: $(PYTHON_HOST_DEPENDS) $(RUN_BUILD) --docker-image $(DOCKER_IMAGE_BUILD) cpython-3.12-host +$(OUTDIR)/cpython-3.13-$(CPYTHON_3.13_VERSION)-$(HOST_PLATFORM).tar: $(PYTHON_HOST_DEPENDS) + $(RUN_BUILD) --docker-image $(DOCKER_IMAGE_BUILD) cpython-3.13-host PYTHON_DEPENDS := \ $(PYTHON_SUPPORT_FILES) \ @@ -318,3 +320,6 @@ $(OUTDIR)/cpython-$(CPYTHON_3.11_VERSION)-$(PACKAGE_SUFFIX).tar: $(ALL_PYTHON_DE $(OUTDIR)/cpython-$(CPYTHON_3.12_VERSION)-$(PACKAGE_SUFFIX).tar: $(ALL_PYTHON_DEPENDS) $(RUN_BUILD) --docker-image $(DOCKER_IMAGE_BUILD) cpython-3.12 + +$(OUTDIR)/cpython-$(CPYTHON_3.13_VERSION)-$(PACKAGE_SUFFIX).tar: $(ALL_PYTHON_DEPENDS) + $(RUN_BUILD) --docker-image $(DOCKER_IMAGE_BUILD) cpython-3.13 diff --git a/cpython-unix/build-cpython-host.sh b/cpython-unix/build-cpython-host.sh index cfc1e8a7..459558bb 100755 --- a/cpython-unix/build-cpython-host.sh +++ b/cpython-unix/build-cpython-host.sh @@ -38,7 +38,9 @@ pushd "Python-${PYTHON_VERSION}" # configure. This is reported as https://bugs.python.org/issue45405. We nerf the # check since we know what we're doing. if [ "${CC}" = "clang" ]; then - if [ -n "${PYTHON_MEETS_MINIMUM_VERSION_3_9}" ]; then + if [ -n "${PYTHON_MEETS_MINIMUM_VERSION_3_13}" ]; then + patch -p1 -i ${ROOT}/patch-disable-multiarch-13.patch + elif [ -n "${PYTHON_MEETS_MINIMUM_VERSION_3_9}" ]; then patch -p1 -i ${ROOT}/patch-disable-multiarch.patch else patch -p1 -i ${ROOT}/patch-disable-multiarch-legacy.patch diff --git a/cpython-unix/build-cpython.sh b/cpython-unix/build-cpython.sh index 87225429..b64a23a4 100755 --- a/cpython-unix/build-cpython.sh +++ b/cpython-unix/build-cpython.sh @@ -72,7 +72,10 @@ cat Makefile.extra pushd Python-${PYTHON_VERSION} # configure doesn't support cross-compiling on Apple. Teach it. -if [ -n "${PYTHON_MEETS_MINIMUM_VERSION_3_12}" ]; then +if [ "${PYTHON_MAJMIN_VERSION}" = "3.13" ]; then + # FIXME: new patch may be required + : +elif [ "${PYTHON_MAJMIN_VERSION}" = "3.12" ]; then patch -p1 -i ${ROOT}/patch-apple-cross-3.12.patch else patch -p1 -i ${ROOT}/patch-apple-cross.patch @@ -94,7 +97,9 @@ fi # Configure nerfs RUNSHARED when cross-compiling, which prevents PGO from running when # we can in fact run the target binaries (e.g. x86_64 host and i686 target). Undo that. if [ -n "${CROSS_COMPILING}" ]; then - if [ -n "${PYTHON_MEETS_MINIMUM_VERSION_3_11}" ]; then + if [ -n "${PYTHON_MEETS_MINIMUM_VERSION_3_13}" ]; then + patch -p1 -i ${ROOT}/patch-dont-clear-runshared-13.patch + elif [ -n "${PYTHON_MEETS_MINIMUM_VERSION_3_11}" ]; then patch -p1 -i ${ROOT}/patch-dont-clear-runshared.patch else patch -p1 -i ${ROOT}/patch-dont-clear-runshared-legacy.patch @@ -105,7 +110,9 @@ fi # configure. This is reported as https://bugs.python.org/issue45405. We nerf the # check since we know what we're doing. if [ "${CC}" = "clang" ]; then - if [ -n "${PYTHON_MEETS_MINIMUM_VERSION_3_9}" ]; then + if [ -n "${PYTHON_MEETS_MINIMUM_VERSION_3_13}" ]; then + patch -p1 -i ${ROOT}/patch-disable-multiarch-13.patch + elif [ -n "${PYTHON_MEETS_MINIMUM_VERSION_3_9}" ]; then patch -p1 -i ${ROOT}/patch-disable-multiarch.patch else patch -p1 -i ${ROOT}/patch-disable-multiarch-legacy.patch @@ -136,7 +143,18 @@ fi # The default build rule for the macOS dylib doesn't pick up libraries # from modules / makesetup. So patch it accordingly. -patch -p1 -i ${ROOT}/patch-macos-link-extension-modules.patch +if [ -n "${PYTHON_MEETS_MINIMUM_VERSION_3_13}" ]; then + patch -p1 -i ${ROOT}/patch-macos-link-extension-modules-13.patch +else + patch -p1 -i ${ROOT}/patch-macos-link-extension-modules.patch +fi + +# Header files generated by Argument Clinic in 3.13.0b1 are missing +# an #include directive; PR 119712 corrected this. +# FIXME: remove during update to support 3.13.0b2 +if [ -n "${PYTHON_MEETS_MINIMUM_VERSION_3_13}" ]; then + patch -p1 -i ${ROOT}/patch-cpython-pr-119712.patch +fi # Also on macOS, the `python` executable is linked against libraries defined by statically # linked modules. But those libraries should only get linked into libpython, not the @@ -280,7 +298,7 @@ if [ "${PYBUILD_PLATFORM}" != "macos" ]; then fi fi -# On Python 3.12 we need to link the special hacl library provided some SHA-256 +# On Python 3.12+ we need to link the special hacl library provided some SHA-256 # implementations. Since we hack up the regular extension building mechanism, we # need to reinvent this wheel. if [ -n "${PYTHON_MEETS_MINIMUM_VERSION_3_12}" ]; then diff --git a/cpython-unix/build-main.py b/cpython-unix/build-main.py index b9b3c5dc..34a90d19 100755 --- a/cpython-unix/build-main.py +++ b/cpython-unix/build-main.py @@ -67,6 +67,7 @@ def main(): "cpython-3.10", "cpython-3.11", "cpython-3.12", + "cpython-3.13", }, default="cpython-3.11", help="Python distribution to build", diff --git a/cpython-unix/build.py b/cpython-unix/build.py index ccea702c..e3570054 100755 --- a/cpython-unix/build.py +++ b/cpython-unix/build.py @@ -435,6 +435,7 @@ def build_cpython_host( support = { "build-cpython-host.sh", "patch-disable-multiarch.patch", + "patch-disable-multiarch-13.patch", "patch-disable-multiarch-legacy.patch", } for s in sorted(support): @@ -455,7 +456,7 @@ def build_cpython_host( # Set environment variables allowing convenient testing for Python # version ranges. - for v in ("3.8", "3.9", "3.10", "3.11", "3.12"): + for v in ("3.8", "3.9", "3.10", "3.11", "3.12", "3.13"): normal_version = v.replace(".", "_") if meets_python_minimum_version(python_version, v): @@ -782,7 +783,7 @@ def build_cpython( # Set environment variables allowing convenient testing for Python # version ranges. - for v in ("3.8", "3.9", "3.10", "3.11", "3.12"): + for v in ("3.8", "3.9", "3.10", "3.11", "3.12", "3.13"): normal_version = v.replace(".", "_") if meets_python_minimum_version(python_version, v): @@ -1195,6 +1196,7 @@ def main(): "cpython-3.10", "cpython-3.11", "cpython-3.12", + "cpython-3.13", ): build_cpython( settings, diff --git a/cpython-unix/extension-modules.yml b/cpython-unix/extension-modules.yml index 37f78101..52150b59 100644 --- a/cpython-unix/extension-modules.yml +++ b/cpython-unix/extension-modules.yml @@ -67,6 +67,7 @@ _contextvars: - _contextvarsmodule.c _crypt: + maximum-python-version: "3.12" build-mode: shared sources: - _cryptmodule.c @@ -286,6 +287,21 @@ _heapq: _imp: config-c-only: true +_interpchannels: + minimum-python-version: "3.13" + sources: + - _interpchannelsmodule.c + +_interpqueues: + minimum-python-version: "3.13" + sources: + - _interpqueuesmodule.c + +_interpreters: + minimum-python-version: "3.13" + sources: + - _interpretersmodule.c + _io: setup-enabled: true required-targets: @@ -528,9 +544,21 @@ _struct: sources: - _struct.c +_suggestions: + setup-enabled: true + minimum-python-version: '3.13' + sources: + - _suggestions.c + _symtable: setup-enabled: true +_sysconfig: + setup-enabled: true + minimum-python-version: '3.13' + sources: + - _sysconfig.c + _testbuffer: minimum-python-version: '3.9' sources: @@ -545,6 +573,11 @@ _testcapi: sources: - _testcapimodule.c +_testexternalinspection: + minimum-python-version: '3.13' + sources: + - _testexternalinspection.c + _testimportmultiple: minimum-python-version: '3.9' sources: @@ -558,6 +591,18 @@ _testinternalcapi: - Include/internal sources: - _testinternalcapi.c + includes-conditional: + - path: _testinternalcapi/parts.h + minimum-python-version: "3.13" + sources-conditional: + - source: _testinternalcapi/pytime.c + minimum-python-version: "3.13" + - source: _testinternalcapi/set.c + minimum-python-version: "3.13" + - source: _testinternalcapi/test_critical_sections.c + minimum-python-version: "3.13" + - source: _testinternalcapi/test_lock.c + minimum-python-version: "3.13" _testmultiphase: minimum-python-version: '3.9' @@ -659,11 +704,13 @@ _weakref: _xxinterpchannels: minimum-python-version: '3.12' + maximum-python-version: '3.12' sources: - _xxinterpchannelsmodule.c _xxsubinterpreters: minimum-python-version: '3.9' + maximum-python-version: '3.12' sources: - _xxsubinterpretersmodule.c @@ -687,6 +734,7 @@ atexit: # Modules/Setup comment is ambiguous as to whether this module actually works. audioop: + maximum-python-version: '3.12' sources: - audioop.c @@ -745,6 +793,7 @@ mmap: - mmapmodule.c nis: + maximum-python-version: "3.12" disabled-targets: # NIS is not available on Apple OS. - aarch64-apple-.* @@ -767,6 +816,7 @@ nis: - nsl ossaudiodev: + maximum-python-version: "3.12" disabled-targets: # ossaudiodev not available on Apple OS. - aarch64-apple-.* @@ -806,6 +856,7 @@ readline: - readline.c defines: - USE_LIBEDIT=1 + - Py_RL_STARTUP_HOOK_TAKES_ARGS includes-deps: - libedit/include - libedit/include/ncursesw @@ -828,6 +879,7 @@ select: - selectmodule.c spwd: + maximum-python-version: "3.12" sources: - spwdmodule.c diff --git a/cpython-unix/patch-cpython-pr-119712.patch b/cpython-unix/patch-cpython-pr-119712.patch new file mode 100644 index 00000000..04f5121d --- /dev/null +++ b/cpython-unix/patch-cpython-pr-119712.patch @@ -0,0 +1,138 @@ +diff a/Modules/_ctypes/clinic/_ctypes.c.h b/Modules/_ctypes/clinic/_ctypes.c.h +--- a/Modules/_ctypes/clinic/_ctypes.c.h ++++ b/Modules/_ctypes/clinic/_ctypes.c.h +@@ -2,6 +2,9 @@ + preserve + [clinic start generated code]*/ + ++#if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) ++# include "pycore_runtime.h" // _Py_SINGLETON() ++#endif + #include "pycore_abstract.h" // _PyNumber_Index() + #include "pycore_modsupport.h" // _PyArg_UnpackKeywords() + +diff a/Modules/_io/clinic/bufferedio.c.h b/Modules/_io/clinic/bufferedio.c.h +--- a/Modules/_io/clinic/bufferedio.c.h ++++ b/Modules/_io/clinic/bufferedio.c.h +@@ -4,7 +4,7 @@ preserve + + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + # include "pycore_gc.h" // PyGC_Head +-# include "pycore_runtime.h" // _Py_ID() ++# include "pycore_runtime.h" // _Py_SINGLETON() + #endif + #include "pycore_abstract.h" // _PyNumber_Index() + #include "pycore_critical_section.h"// Py_BEGIN_CRITICAL_SECTION() +diff a/Modules/_io/clinic/iobase.c.h b/Modules/_io/clinic/iobase.c.h +--- a/Modules/_io/clinic/iobase.c.h ++++ b/Modules/_io/clinic/iobase.c.h +@@ -2,6 +2,9 @@ + preserve + [clinic start generated code]*/ + ++#if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) ++# include "pycore_runtime.h" // _Py_SINGLETON() ++#endif + #include "pycore_abstract.h" // _Py_convert_optional_to_ssize_t() + #include "pycore_modsupport.h" // _PyArg_UnpackKeywords() + +diff a/Modules/_io/clinic/textio.c.h b/Modules/_io/clinic/textio.c.h +--- a/Modules/_io/clinic/textio.c.h ++++ b/Modules/_io/clinic/textio.c.h +@@ -4,7 +4,7 @@ preserve + + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + # include "pycore_gc.h" // PyGC_Head +-# include "pycore_runtime.h" // _Py_ID() ++# include "pycore_runtime.h" // _Py_SINGLETON() + #endif + #include "pycore_abstract.h" // _Py_convert_optional_to_ssize_t() + #include "pycore_critical_section.h"// Py_BEGIN_CRITICAL_SECTION() +diff a/Modules/clinic/_curses_panel.c.h b/Modules/clinic/_curses_panel.c.h +--- a/Modules/clinic/_curses_panel.c.h ++++ b/Modules/clinic/_curses_panel.c.h +@@ -2,6 +2,9 @@ + preserve + [clinic start generated code]*/ + ++#if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) ++# include "pycore_runtime.h" // _Py_SINGLETON() ++#endif + #include "pycore_modsupport.h" // _PyArg_UnpackKeywords() + + PyDoc_STRVAR(_curses_panel_panel_bottom__doc__, +diff a/Modules/clinic/_dbmmodule.c.h b/Modules/clinic/_dbmmodule.c.h +--- a/Modules/clinic/_dbmmodule.c.h ++++ b/Modules/clinic/_dbmmodule.c.h +@@ -2,6 +2,9 @@ + preserve + [clinic start generated code]*/ + ++#if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) ++# include "pycore_runtime.h" // _Py_SINGLETON() ++#endif + #include "pycore_modsupport.h" // _PyArg_UnpackKeywords() + + PyDoc_STRVAR(_dbm_dbm_close__doc__, +diff a/Modules/clinic/_elementtree.c.h b/Modules/clinic/_elementtree.c.h +--- a/Modules/clinic/_elementtree.c.h ++++ b/Modules/clinic/_elementtree.c.h +@@ -4,7 +4,7 @@ preserve + + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + # include "pycore_gc.h" // PyGC_Head +-# include "pycore_runtime.h" // _Py_ID() ++# include "pycore_runtime.h" // _Py_SINGLETON() + #endif + #include "pycore_abstract.h" // _PyNumber_Index() + #include "pycore_modsupport.h" // _PyArg_UnpackKeywords() +diff a/Modules/clinic/_gdbmmodule.c.h b/Modules/clinic/_gdbmmodule.c.h +--- a/Modules/clinic/_gdbmmodule.c.h ++++ b/Modules/clinic/_gdbmmodule.c.h +@@ -2,6 +2,9 @@ + preserve + [clinic start generated code]*/ + ++#if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) ++# include "pycore_runtime.h" // _Py_SINGLETON() ++#endif + #include "pycore_modsupport.h" // _PyArg_CheckPositional() + + PyDoc_STRVAR(_gdbm_gdbm_get__doc__, +diff a/Modules/clinic/_pickle.c.h b/Modules/clinic/_pickle.c.h +--- a/Modules/clinic/_pickle.c.h ++++ b/Modules/clinic/_pickle.c.h +@@ -4,7 +4,7 @@ preserve + + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + # include "pycore_gc.h" // PyGC_Head +-# include "pycore_runtime.h" // _Py_ID() ++# include "pycore_runtime.h" // _Py_SINGLETON() + #endif + #include "pycore_modsupport.h" // _PyArg_UnpackKeywords() + +diff a/Modules/clinic/arraymodule.c.h b/Modules/clinic/arraymodule.c.h +--- a/Modules/clinic/arraymodule.c.h ++++ b/Modules/clinic/arraymodule.c.h +@@ -2,6 +2,9 @@ + preserve + [clinic start generated code]*/ + ++#if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) ++# include "pycore_runtime.h" // _Py_SINGLETON() ++#endif + #include "pycore_abstract.h" // _PyNumber_Index() + #include "pycore_modsupport.h" // _PyArg_CheckPositional() + +diff a/Modules/clinic/pyexpat.c.h b/Modules/clinic/pyexpat.c.h +--- a/Modules/clinic/pyexpat.c.h ++++ b/Modules/clinic/pyexpat.c.h +@@ -4,7 +4,7 @@ preserve + + #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) + # include "pycore_gc.h" // PyGC_Head +-# include "pycore_runtime.h" // _Py_ID() ++# include "pycore_runtime.h" // _Py_SINGLETON() + #endif + #include "pycore_modsupport.h" // _PyArg_UnpackKeywords() + diff --git a/cpython-unix/patch-disable-multiarch-13.patch b/cpython-unix/patch-disable-multiarch-13.patch new file mode 100644 index 00000000..3ff33246 --- /dev/null +++ b/cpython-unix/patch-disable-multiarch-13.patch @@ -0,0 +1,17 @@ +diff -u 13-a/configure.ac 13-b/configure.ac +--- 13-a/configure.ac 2024-05-08 05:21:00.000000000 -0400 ++++ 13-b/configure.ac 2024-05-19 07:42:23.294762624 -0400 +@@ -1090,12 +1090,7 @@ + dnl architecture. PLATFORM_TRIPLET will be a pair or single value for these + dnl platforms. + AC_MSG_CHECKING([for multiarch]) +-AS_CASE([$ac_sys_system], +- [Darwin*], [MULTIARCH=""], +- [iOS], [MULTIARCH=""], +- [FreeBSD*], [MULTIARCH=""], +- [MULTIARCH=$($CC --print-multiarch 2>/dev/null)] +-) ++MULTIARCH= + AC_SUBST([MULTIARCH]) + + if test x$PLATFORM_TRIPLET != x && test x$MULTIARCH != x; then diff --git a/cpython-unix/patch-dont-clear-runshared-13.patch b/cpython-unix/patch-dont-clear-runshared-13.patch new file mode 100644 index 00000000..7dcba084 --- /dev/null +++ b/cpython-unix/patch-dont-clear-runshared-13.patch @@ -0,0 +1,14 @@ +diff -u 13-a/configure.ac 13-b/configure.ac +--- 13-a/configure.ac 2024-05-08 05:21:00.000000000 -0400 ++++ 13-b/configure.ac 2024-05-19 12:44:04.530770938 -0400 +@@ -1564,10 +1564,6 @@ + fi + AC_MSG_RESULT([$LDLIBRARY]) + +-if test "$cross_compiling" = yes; then +- RUNSHARED= +-fi +- + AC_MSG_CHECKING([HOSTRUNNER]) + AC_ARG_VAR([HOSTRUNNER], [Program to run CPython for the host platform]) + if test -z "$HOSTRUNNER" diff --git a/cpython-unix/patch-macos-link-extension-modules-13.patch b/cpython-unix/patch-macos-link-extension-modules-13.patch new file mode 100644 index 00000000..75b0d781 --- /dev/null +++ b/cpython-unix/patch-macos-link-extension-modules-13.patch @@ -0,0 +1,12 @@ +diff -u 13-a/Makefile.pre.in 13-b/Makefile.pre.in +--- 13-a/Makefile.pre.in 2024-05-08 05:21:00.000000000 -0400 ++++ 13-b/Makefile.pre.in 2024-05-19 07:55:45.091521909 -0400 +@@ -903,7 +903,7 @@ + $(BLDSHARED) $(NO_AS_NEEDED) -o $@ -Wl,-h$@ $^ + + libpython$(LDVERSION).dylib: $(LIBRARY_OBJS) +- $(CC) -dynamiclib $(PY_CORE_LDFLAGS) -undefined dynamic_lookup -Wl,-install_name,$(prefix)/lib/libpython$(LDVERSION).dylib -Wl,-compatibility_version,$(VERSION) -Wl,-current_version,$(VERSION) -o $@ $(LIBRARY_OBJS) $(DTRACE_OBJS) $(SHLIBS) $(LIBC) $(LIBM); \ ++ $(CC) -dynamiclib $(PY_CORE_LDFLAGS) -undefined dynamic_lookup -Wl,-install_name,$(prefix)/lib/libpython$(LDVERSION).dylib -Wl,-compatibility_version,$(VERSION) -Wl,-current_version,$(VERSION) -o $@ $(LIBRARY_OBJS) $(DTRACE_OBJS) $(MODLIBS) $(SHLIBS) $(LIBC) $(LIBM); \ + + + libpython$(VERSION).sl: $(LIBRARY_OBJS) diff --git a/cpython-unix/targets.yml b/cpython-unix/targets.yml index fd81e286..02e41311 100644 --- a/cpython-unix/targets.yml +++ b/cpython-unix/targets.yml @@ -64,6 +64,7 @@ aarch64-apple-darwin: - '3.10' - '3.11' - '3.12' + - '3.13' needs_toolchain: true host_cc: clang host_cxx: clang++ @@ -153,6 +154,7 @@ aarch64-unknown-linux-gnu: - '3.10' - '3.11' - '3.12' + - '3.13' docker_image_suffix: .cross host_cc: /usr/bin/x86_64-linux-gnu-gcc host_cxx: /usr/bin/x86_64-linux-gnu-g++ @@ -231,6 +233,7 @@ armv7-unknown-linux-gnueabi: - '3.10' - '3.11' - '3.12' + - '3.13' docker_image_suffix: .cross host_cc: /usr/bin/x86_64-linux-gnu-gcc host_cxx: /usr/bin/x86_64-linux-gnu-g++ @@ -269,6 +272,7 @@ armv7-unknown-linux-gnueabihf: - '3.10' - '3.11' - '3.12' + - '3.13' docker_image_suffix: .cross host_cc: /usr/bin/x86_64-linux-gnu-gcc host_cxx: /usr/bin/x86_64-linux-gnu-g++ @@ -308,6 +312,7 @@ i686-unknown-linux-gnu: - '3.10' - '3.11' - '3.12' + - '3.13' needs_toolchain: true host_cc: clang host_cxx: clang++ @@ -351,6 +356,7 @@ mips-unknown-linux-gnu: - '3.10' - '3.11' - '3.12' + - '3.13' docker_image_suffix: .cross host_cc: /usr/bin/x86_64-linux-gnu-gcc host_cxx: /usr/bin/x86_64-linux-gnu-g++ @@ -389,6 +395,7 @@ mipsel-unknown-linux-gnu: - '3.10' - '3.11' - '3.12' + - '3.13' docker_image_suffix: .cross host_cc: /usr/bin/x86_64-linux-gnu-gcc host_cxx: /usr/bin/x86_64-linux-gnu-g++ @@ -427,6 +434,7 @@ ppc64le-unknown-linux-gnu: - '3.10' - '3.11' - '3.12' + - '3.13' docker_image_suffix: .cross host_cc: /usr/bin/x86_64-linux-gnu-gcc host_cxx: /usr/bin/x86_64-linux-gnu-g++ @@ -465,6 +473,7 @@ s390x-unknown-linux-gnu: - '3.10' - '3.11' - '3.12' + - '3.13' docker_image_suffix: .cross host_cc: /usr/bin/x86_64-linux-gnu-gcc host_cxx: /usr/bin/x86_64-linux-gnu-g++ @@ -548,6 +557,7 @@ x86_64-apple-darwin: - '3.10' - '3.11' - '3.12' + - '3.13' needs_toolchain: true apple_sdk_platform: macosx host_cc: clang @@ -717,6 +727,7 @@ x86_64-unknown-linux-gnu: - '3.10' - '3.11' - '3.12' + - '3.13' needs_toolchain: true host_cc: clang host_cxx: clang++ @@ -761,6 +772,7 @@ x86_64_v2-unknown-linux-gnu: - '3.10' - '3.11' - '3.12' + - '3.13' needs_toolchain: true host_cc: clang host_cxx: clang++ @@ -806,6 +818,7 @@ x86_64_v3-unknown-linux-gnu: - '3.10' - '3.11' - '3.12' + - '3.13' needs_toolchain: true host_cc: clang host_cxx: clang++ @@ -851,6 +864,7 @@ x86_64_v4-unknown-linux-gnu: - '3.10' - '3.11' - '3.12' + - '3.13' needs_toolchain: true host_cc: clang host_cxx: clang++ @@ -896,6 +910,7 @@ x86_64-unknown-linux-musl: - '3.10' - '3.11' - '3.12' + - '3.13' needs_toolchain: true host_cc: clang host_cxx: clang++ @@ -938,6 +953,7 @@ x86_64_v2-unknown-linux-musl: - '3.10' - '3.11' - '3.12' + - '3.13' needs_toolchain: true host_cc: clang host_cxx: clang++ @@ -981,6 +997,7 @@ x86_64_v3-unknown-linux-musl: - '3.10' - '3.11' - '3.12' + - '3.13' needs_toolchain: true host_cc: clang host_cxx: clang++ @@ -1024,6 +1041,7 @@ x86_64_v4-unknown-linux-musl: - '3.10' - '3.11' - '3.12' + - '3.13' needs_toolchain: true host_cc: clang host_cxx: clang++ diff --git a/pythonbuild/cpython.py b/pythonbuild/cpython.py index 97a715d5..c499cc0f 100644 --- a/pythonbuild/cpython.py +++ b/pythonbuild/cpython.py @@ -41,6 +41,8 @@ "properties": { "path": {"type": "string"}, "targets": {"type": "array", "items": {"type": "string"}}, + "minimum-python-version": {"type": "string"}, + "maximum-python-version": {"type": "string"}, }, "additionalProperties": False, }, @@ -534,7 +536,19 @@ def derive_setup_local( line += f" -I{path}" for entry in info.get("includes-conditional", []): - if any(re.match(p, target_triple) for p in entry["targets"]): + if targets := entry.get("targets", []): + target_match = any(re.match(p, target_triple) for p in targets) + else: + target_match = True + + python_min_match = meets_python_minimum_version( + python_version, entry.get("minimum-python-version", "1.0") + ) + python_max_match = meets_python_maximum_version( + python_version, entry.get("maximum-python-version", "100.0") + ) + + if target_match and (python_min_match and python_max_match): line += f" -I{entry['path']}" for path in info.get("includes-deps", []): diff --git a/pythonbuild/downloads.py b/pythonbuild/downloads.py index 16835ac7..8c556d8e 100644 --- a/pythonbuild/downloads.py +++ b/pythonbuild/downloads.py @@ -79,6 +79,15 @@ "license_file": "LICENSE.cpython.txt", "python_tag": "cp312", }, + "cpython-3.13": { + "url": "https://www.python.org/ftp/python/3.13.0/Python-3.13.0b1.tar.xz", + "size": 21054240, + "sha256": "ba716ac56b039b545ad4a90ce586a57aa97869364553746ef2445728ceec198e", + "version": "3.13.0b1", + "licenses": ["Python-2.0", "CNRI-Python"], + "license_file": "LICENSE.cpython.txt", + "python_tag": "cp313", + }, "expat": { "url": "https://github.com/libexpat/libexpat/releases/download/R_2_5_0/expat-2.5.0.tar.xz", "size": 460560, diff --git a/src/validation.rs b/src/validation.rs index 12155132..83cf216e 100644 --- a/src/validation.rs +++ b/src/validation.rs @@ -287,6 +287,16 @@ static DARWIN_ALLOWED_DYLIBS: Lazy> = Lazy::new(|| { max_compatibility_version: "3.12.0".try_into().unwrap(), required: false, }, + MachOAllowedDylib { + name: "@executable_path/../lib/libpython3.13.dylib".to_string(), + max_compatibility_version: "3.13.0".try_into().unwrap(), + required: false, + }, + MachOAllowedDylib { + name: "@executable_path/../lib/libpython3.13d.dylib".to_string(), + max_compatibility_version: "3.13.0".try_into().unwrap(), + required: false, + }, MachOAllowedDylib { name: "/System/Library/Frameworks/AppKit.framework/Versions/C/AppKit".to_string(), max_compatibility_version: "45.0.0".try_into().unwrap(), @@ -708,6 +718,15 @@ const GLOBAL_EXTENSIONS_PYTHON_3_12: &[&str] = &[ "_zoneinfo", ]; +const GLOBAL_EXTENSIONS_PYTHON_3_13: &[&str] = &[ + "_sha2", + "_tokenize", + "_typing", + "_xxinterpchannels", + "_xxsubinterpreters", + "_zoneinfo", +]; + const GLOBAL_EXTENSIONS_MACOS: &[&str] = &["_scproxy"]; const GLOBAL_EXTENSIONS_POSIX: &[&str] = &[ @@ -1448,6 +1467,9 @@ fn validate_extension_modules( "3.12" => { wanted.extend(GLOBAL_EXTENSIONS_PYTHON_3_12); } + "3.13" => { + wanted.extend(GLOBAL_EXTENSIONS_PYTHON_3_13); + } _ => { panic!("unhandled Python version: {}", python_major_minor); } @@ -1477,7 +1499,7 @@ fn validate_extension_modules( } } - if (is_linux || is_macos) && matches!(python_major_minor, "3.9" | "3.10" | "3.11" | "3.12") { + if (is_linux || is_macos) && matches!(python_major_minor, "3.9" | "3.10" | "3.11" | "3.12" | "3.13") { wanted.extend([ "_testbuffer", "_testimportmultiple", @@ -1486,7 +1508,7 @@ fn validate_extension_modules( ]); } - if (is_linux || is_macos) && python_major_minor == "3.12" { + if (is_linux || is_macos) && matches!(python_major_minor, "3.12" | "3.13") { wanted.insert("_testsinglephase"); } @@ -1500,7 +1522,7 @@ fn validate_extension_modules( } // _wmi is Windows only on 3.12+. - if python_major_minor == "3.12" && is_windows { + if matches!(python_major_minor, "3.12" | "3.13") && is_windows { wanted.insert("_wmi"); } @@ -1623,6 +1645,8 @@ fn validate_distribution( "3.11" } else if dist_filename.starts_with("cpython-3.12.") { "3.12" + } else if dist_filename.starts_with("cpython-3.13.") { + "3.13" } else { return Err(anyhow!("could not parse Python version from filename")); }; From 3e0c7bc8ea5d387103db9a4732feabff0a7151ae Mon Sep 17 00:00:00 2001 From: "Kevin P. Fleming" Date: Thu, 6 Jun 2024 06:28:07 -0400 Subject: [PATCH 02/33] Update to 3.13.0b2. --- cpython-unix/build-cpython.sh | 7 -- cpython-unix/patch-cpython-pr-119712.patch | 138 --------------------- pythonbuild/downloads.py | 6 +- src/validation.rs | 1 + 4 files changed, 4 insertions(+), 148 deletions(-) delete mode 100644 cpython-unix/patch-cpython-pr-119712.patch diff --git a/cpython-unix/build-cpython.sh b/cpython-unix/build-cpython.sh index b64a23a4..f0fd0903 100755 --- a/cpython-unix/build-cpython.sh +++ b/cpython-unix/build-cpython.sh @@ -149,13 +149,6 @@ else patch -p1 -i ${ROOT}/patch-macos-link-extension-modules.patch fi -# Header files generated by Argument Clinic in 3.13.0b1 are missing -# an #include directive; PR 119712 corrected this. -# FIXME: remove during update to support 3.13.0b2 -if [ -n "${PYTHON_MEETS_MINIMUM_VERSION_3_13}" ]; then - patch -p1 -i ${ROOT}/patch-cpython-pr-119712.patch -fi - # Also on macOS, the `python` executable is linked against libraries defined by statically # linked modules. But those libraries should only get linked into libpython, not the # executable. This behavior is kinda suspect on all platforms, as it could be adding diff --git a/cpython-unix/patch-cpython-pr-119712.patch b/cpython-unix/patch-cpython-pr-119712.patch deleted file mode 100644 index 04f5121d..00000000 --- a/cpython-unix/patch-cpython-pr-119712.patch +++ /dev/null @@ -1,138 +0,0 @@ -diff a/Modules/_ctypes/clinic/_ctypes.c.h b/Modules/_ctypes/clinic/_ctypes.c.h ---- a/Modules/_ctypes/clinic/_ctypes.c.h -+++ b/Modules/_ctypes/clinic/_ctypes.c.h -@@ -2,6 +2,9 @@ - preserve - [clinic start generated code]*/ - -+#if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) -+# include "pycore_runtime.h" // _Py_SINGLETON() -+#endif - #include "pycore_abstract.h" // _PyNumber_Index() - #include "pycore_modsupport.h" // _PyArg_UnpackKeywords() - -diff a/Modules/_io/clinic/bufferedio.c.h b/Modules/_io/clinic/bufferedio.c.h ---- a/Modules/_io/clinic/bufferedio.c.h -+++ b/Modules/_io/clinic/bufferedio.c.h -@@ -4,7 +4,7 @@ preserve - - #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # include "pycore_gc.h" // PyGC_Head --# include "pycore_runtime.h" // _Py_ID() -+# include "pycore_runtime.h" // _Py_SINGLETON() - #endif - #include "pycore_abstract.h" // _PyNumber_Index() - #include "pycore_critical_section.h"// Py_BEGIN_CRITICAL_SECTION() -diff a/Modules/_io/clinic/iobase.c.h b/Modules/_io/clinic/iobase.c.h ---- a/Modules/_io/clinic/iobase.c.h -+++ b/Modules/_io/clinic/iobase.c.h -@@ -2,6 +2,9 @@ - preserve - [clinic start generated code]*/ - -+#if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) -+# include "pycore_runtime.h" // _Py_SINGLETON() -+#endif - #include "pycore_abstract.h" // _Py_convert_optional_to_ssize_t() - #include "pycore_modsupport.h" // _PyArg_UnpackKeywords() - -diff a/Modules/_io/clinic/textio.c.h b/Modules/_io/clinic/textio.c.h ---- a/Modules/_io/clinic/textio.c.h -+++ b/Modules/_io/clinic/textio.c.h -@@ -4,7 +4,7 @@ preserve - - #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # include "pycore_gc.h" // PyGC_Head --# include "pycore_runtime.h" // _Py_ID() -+# include "pycore_runtime.h" // _Py_SINGLETON() - #endif - #include "pycore_abstract.h" // _Py_convert_optional_to_ssize_t() - #include "pycore_critical_section.h"// Py_BEGIN_CRITICAL_SECTION() -diff a/Modules/clinic/_curses_panel.c.h b/Modules/clinic/_curses_panel.c.h ---- a/Modules/clinic/_curses_panel.c.h -+++ b/Modules/clinic/_curses_panel.c.h -@@ -2,6 +2,9 @@ - preserve - [clinic start generated code]*/ - -+#if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) -+# include "pycore_runtime.h" // _Py_SINGLETON() -+#endif - #include "pycore_modsupport.h" // _PyArg_UnpackKeywords() - - PyDoc_STRVAR(_curses_panel_panel_bottom__doc__, -diff a/Modules/clinic/_dbmmodule.c.h b/Modules/clinic/_dbmmodule.c.h ---- a/Modules/clinic/_dbmmodule.c.h -+++ b/Modules/clinic/_dbmmodule.c.h -@@ -2,6 +2,9 @@ - preserve - [clinic start generated code]*/ - -+#if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) -+# include "pycore_runtime.h" // _Py_SINGLETON() -+#endif - #include "pycore_modsupport.h" // _PyArg_UnpackKeywords() - - PyDoc_STRVAR(_dbm_dbm_close__doc__, -diff a/Modules/clinic/_elementtree.c.h b/Modules/clinic/_elementtree.c.h ---- a/Modules/clinic/_elementtree.c.h -+++ b/Modules/clinic/_elementtree.c.h -@@ -4,7 +4,7 @@ preserve - - #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # include "pycore_gc.h" // PyGC_Head --# include "pycore_runtime.h" // _Py_ID() -+# include "pycore_runtime.h" // _Py_SINGLETON() - #endif - #include "pycore_abstract.h" // _PyNumber_Index() - #include "pycore_modsupport.h" // _PyArg_UnpackKeywords() -diff a/Modules/clinic/_gdbmmodule.c.h b/Modules/clinic/_gdbmmodule.c.h ---- a/Modules/clinic/_gdbmmodule.c.h -+++ b/Modules/clinic/_gdbmmodule.c.h -@@ -2,6 +2,9 @@ - preserve - [clinic start generated code]*/ - -+#if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) -+# include "pycore_runtime.h" // _Py_SINGLETON() -+#endif - #include "pycore_modsupport.h" // _PyArg_CheckPositional() - - PyDoc_STRVAR(_gdbm_gdbm_get__doc__, -diff a/Modules/clinic/_pickle.c.h b/Modules/clinic/_pickle.c.h ---- a/Modules/clinic/_pickle.c.h -+++ b/Modules/clinic/_pickle.c.h -@@ -4,7 +4,7 @@ preserve - - #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # include "pycore_gc.h" // PyGC_Head --# include "pycore_runtime.h" // _Py_ID() -+# include "pycore_runtime.h" // _Py_SINGLETON() - #endif - #include "pycore_modsupport.h" // _PyArg_UnpackKeywords() - -diff a/Modules/clinic/arraymodule.c.h b/Modules/clinic/arraymodule.c.h ---- a/Modules/clinic/arraymodule.c.h -+++ b/Modules/clinic/arraymodule.c.h -@@ -2,6 +2,9 @@ - preserve - [clinic start generated code]*/ - -+#if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) -+# include "pycore_runtime.h" // _Py_SINGLETON() -+#endif - #include "pycore_abstract.h" // _PyNumber_Index() - #include "pycore_modsupport.h" // _PyArg_CheckPositional() - -diff a/Modules/clinic/pyexpat.c.h b/Modules/clinic/pyexpat.c.h ---- a/Modules/clinic/pyexpat.c.h -+++ b/Modules/clinic/pyexpat.c.h -@@ -4,7 +4,7 @@ preserve - - #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) - # include "pycore_gc.h" // PyGC_Head --# include "pycore_runtime.h" // _Py_ID() -+# include "pycore_runtime.h" // _Py_SINGLETON() - #endif - #include "pycore_modsupport.h" // _PyArg_UnpackKeywords() - diff --git a/pythonbuild/downloads.py b/pythonbuild/downloads.py index 8c556d8e..91927c48 100644 --- a/pythonbuild/downloads.py +++ b/pythonbuild/downloads.py @@ -80,10 +80,10 @@ "python_tag": "cp312", }, "cpython-3.13": { - "url": "https://www.python.org/ftp/python/3.13.0/Python-3.13.0b1.tar.xz", + "url": "https://www.python.org/ftp/python/3.13.0/Python-3.13.0b2.tar.xz", "size": 21054240, - "sha256": "ba716ac56b039b545ad4a90ce586a57aa97869364553746ef2445728ceec198e", - "version": "3.13.0b1", + "sha256": "bf11be01b42a07a3659e4e233591e03da631b7112aa61ee1e030eeb8c5dfd869", + "version": "3.13.0b2", "licenses": ["Python-2.0", "CNRI-Python"], "license_file": "LICENSE.cpython.txt", "python_tag": "cp313", diff --git a/src/validation.rs b/src/validation.rs index 83cf216e..b8c1bfba 100644 --- a/src/validation.rs +++ b/src/validation.rs @@ -718,6 +718,7 @@ const GLOBAL_EXTENSIONS_PYTHON_3_12: &[&str] = &[ "_zoneinfo", ]; +// FIXME: ensure that this list is correct for 3.13 const GLOBAL_EXTENSIONS_PYTHON_3_13: &[&str] = &[ "_sha2", "_tokenize", From b1a3f73d0428b1dc32d1db429be2a915860a3acf Mon Sep 17 00:00:00 2001 From: Zanie Blue Date: Wed, 5 Jun 2024 19:57:12 -0500 Subject: [PATCH 03/33] Handle `run_tests.py` removal in Python 3.13 --- cpython-unix/build-cpython.sh | 4 +++- cpython-windows/build.py | 16 ++++++++++++---- 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/cpython-unix/build-cpython.sh b/cpython-unix/build-cpython.sh index f0fd0903..68e606b6 100755 --- a/cpython-unix/build-cpython.sh +++ b/cpython-unix/build-cpython.sh @@ -906,7 +906,9 @@ cp -av Python/frozen.c ${ROOT}/out/python/build/Python/ cp -av Modules/Setup* ${ROOT}/out/python/build/Modules/ # Copy the test hardness runner for convenience. -cp -av Tools/scripts/run_tests.py ${ROOT}/out/python/build/ +if [ -d Tools/scripts/run_tests.py ]; then + cp -av Tools/scripts/run_tests.py ${ROOT}/out/python/build/ +fi mkdir ${ROOT}/out/python/licenses cp ${ROOT}/LICENSE.*.txt ${ROOT}/out/python/licenses/ diff --git a/cpython-windows/build.py b/cpython-windows/build.py index bc97cd57..f7a4ebd2 100644 --- a/cpython-windows/build.py +++ b/cpython-windows/build.py @@ -1700,10 +1700,18 @@ def build_cpython( log("copying %s to %s" % (source, dest)) shutil.copyfile(source, dest) - shutil.copyfile( - cpython_source_path / "Tools" / "scripts" / "run_tests.py", - out_dir / "python" / "build" / "run_tests.py", - ) + # CPython 3.13 removed `run_tests.py`. + if meets_python_minimum_version(python_version, "3.13"): + # TODO(zanieb): Write a script to invoke `python -m test --slow-ci` + # or update the metadata to not require `run_tests.py` + pathlib.Path( + out_dir / "python" / "build" / "run_tests.py", + ).touch() + else: + shutil.copyfile( + cpython_source_path / "Tools" / "scripts" / "run_tests.py", + out_dir / "python" / "build" / "run_tests.py", + ) licenses_dir = out_dir / "python" / "licenses" licenses_dir.mkdir() From a3a886088b4dd758b508c781c416a7e06a2d7a11 Mon Sep 17 00:00:00 2001 From: Zanie Blue Date: Thu, 6 Jun 2024 09:20:14 -0500 Subject: [PATCH 04/33] Add `_testinternalcapi` to `OBJECT_DIRS` --- cpython-unix/build-cpython.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cpython-unix/build-cpython.sh b/cpython-unix/build-cpython.sh index 68e606b6..c01475e7 100755 --- a/cpython-unix/build-cpython.sh +++ b/cpython-unix/build-cpython.sh @@ -843,7 +843,7 @@ ${BUILD_PYTHON} ${ROOT}/fix_shebangs.py ${ROOT}/out/python/install # downstream consumers. OBJECT_DIRS="Objects Parser Parser/pegen Programs Python" OBJECT_DIRS="${OBJECT_DIRS} Modules" -for ext in _blake2 cjkcodecs _ctypes _ctypes/darwin _decimal _expat _hacl _io _multiprocessing _sha3 _sqlite _sre _xxtestfuzz ; do +for ext in _blake2 cjkcodecs _ctypes _ctypes/darwin _decimal _expat _hacl _io _multiprocessing _sha3 _sqlite _sre _testinternalcapi _xxtestfuzz ; do OBJECT_DIRS="${OBJECT_DIRS} Modules/${ext}" done From 0bad18ff24c11fea41a0aa8c5299e30c87e417b5 Mon Sep 17 00:00:00 2001 From: "Kevin P. Fleming" Date: Fri, 2 Aug 2024 09:01:39 -0400 Subject: [PATCH 05/33] Update to Python 3.13.0rc1. --- pythonbuild/downloads.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pythonbuild/downloads.py b/pythonbuild/downloads.py index 91927c48..c526b3eb 100644 --- a/pythonbuild/downloads.py +++ b/pythonbuild/downloads.py @@ -80,10 +80,10 @@ "python_tag": "cp312", }, "cpython-3.13": { - "url": "https://www.python.org/ftp/python/3.13.0/Python-3.13.0b2.tar.xz", - "size": 21054240, - "sha256": "bf11be01b42a07a3659e4e233591e03da631b7112aa61ee1e030eeb8c5dfd869", - "version": "3.13.0b2", + "url": "https://www.python.org/ftp/python/3.13.0/Python-3.13.0rc1.tar.xz", + "size": 20881016, + "sha256": "678b884775eec0224d5159fa900879020baca2a36ce942fd95febfa1adb4a6bd", + "version": "3.13.0rc1", "licenses": ["Python-2.0", "CNRI-Python"], "license_file": "LICENSE.cpython.txt", "python_tag": "cp313", From 970f02849ce7c50527a24352dee33c0d21401c0e Mon Sep 17 00:00:00 2001 From: "Kevin P. Fleming" Date: Sat, 3 Aug 2024 17:45:32 -0400 Subject: [PATCH 06/33] Update extensions validator for 3.13. --- src/validation.rs | 39 ++++++++++++++++++++++++++++++--------- 1 file changed, 30 insertions(+), 9 deletions(-) diff --git a/src/validation.rs b/src/validation.rs index b8c1bfba..af94f7c6 100644 --- a/src/validation.rs +++ b/src/validation.rs @@ -648,7 +648,6 @@ const GLOBAL_EXTENSIONS: &[&str] = &[ "_weakref", "array", "atexit", - "audioop", "binascii", "builtins", "cmath", @@ -675,13 +674,15 @@ const GLOBAL_EXTENSIONS: &[&str] = &[ // _testsinglephase added in 3.12. // _sha256 and _sha512 merged into _sha2 in 3.12. // _xxinterpchannels added in 3.12. +// audioop removed in 3.13. // We didn't build ctypes_test until 3.9. // We didn't build some test extensions until 3.9. -const GLOBAL_EXTENSIONS_PYTHON_3_8: &[&str] = &["_sha256", "_sha512", "parser"]; +const GLOBAL_EXTENSIONS_PYTHON_3_8: &[&str] = &["audioop", "_sha256", "_sha512", "parser"]; const GLOBAL_EXTENSIONS_PYTHON_3_9: &[&str] = &[ + "audioop", "_peg_parser", "_sha256", "_sha512", @@ -692,6 +693,7 @@ const GLOBAL_EXTENSIONS_PYTHON_3_9: &[&str] = &[ ]; const GLOBAL_EXTENSIONS_PYTHON_3_10: &[&str] = &[ + "audioop", "_sha256", "_sha512", "_uuid", @@ -700,6 +702,7 @@ const GLOBAL_EXTENSIONS_PYTHON_3_10: &[&str] = &[ ]; const GLOBAL_EXTENSIONS_PYTHON_3_11: &[&str] = &[ + "audioop", "_sha256", "_sha512", "_tokenize", @@ -710,6 +713,7 @@ const GLOBAL_EXTENSIONS_PYTHON_3_11: &[&str] = &[ ]; const GLOBAL_EXTENSIONS_PYTHON_3_12: &[&str] = &[ + "audioop", "_sha2", "_tokenize", "_typing", @@ -718,13 +722,16 @@ const GLOBAL_EXTENSIONS_PYTHON_3_12: &[&str] = &[ "_zoneinfo", ]; -// FIXME: ensure that this list is correct for 3.13 const GLOBAL_EXTENSIONS_PYTHON_3_13: &[&str] = &[ + "_interpchannels", + "_interpqueues", + "_interpreters", "_sha2", + "_suggestions", + "_sysconfig", + "_testexternalinspection", "_tokenize", "_typing", - "_xxinterpchannels", - "_xxsubinterpreters", "_zoneinfo", ]; @@ -749,7 +756,7 @@ const GLOBAL_EXTENSIONS_POSIX: &[&str] = &[ "termios", ]; -const GLOBAL_EXTENSIONS_LINUX: &[&str] = &["spwd"]; +const GLOBAL_EXTENSIONS_LINUX_PRE_3_13: &[&str] = &["spwd"]; const GLOBAL_EXTENSIONS_WINDOWS: &[&str] = &[ "_msi", @@ -1478,6 +1485,9 @@ fn validate_extension_modules( if is_macos { wanted.extend(GLOBAL_EXTENSIONS_POSIX); + if python_major_minor == "3.13" { + wanted.remove("_crypt"); + } wanted.extend(GLOBAL_EXTENSIONS_MACOS); } @@ -1493,14 +1503,25 @@ fn validate_extension_modules( if is_linux { wanted.extend(GLOBAL_EXTENSIONS_POSIX); - wanted.extend(GLOBAL_EXTENSIONS_LINUX); + if python_major_minor == "3.13" { + wanted.remove("_crypt"); + } + if matches!(python_major_minor, "3.8" | "3.9" | "3.10" | "3.11" | "3.12") { + wanted.extend(GLOBAL_EXTENSIONS_LINUX_PRE_3_13); + } - if !is_linux_musl { + if !is_linux_musl && matches!(python_major_minor, "3.8" | "3.9" | "3.10" | "3.11" | "3.12") + { wanted.insert("ossaudiodev"); } } - if (is_linux || is_macos) && matches!(python_major_minor, "3.9" | "3.10" | "3.11" | "3.12" | "3.13") { + if (is_linux || is_macos) + && matches!( + python_major_minor, + "3.9" | "3.10" | "3.11" | "3.12" | "3.13" + ) + { wanted.extend([ "_testbuffer", "_testimportmultiple", From 084c8d44b98f174b53662a63e24b568bb4033103 Mon Sep 17 00:00:00 2001 From: Zanie Blue Date: Wed, 4 Sep 2024 12:59:57 -0500 Subject: [PATCH 07/33] Fix missing macOS framework for tcl/tk Required for missing `UTType` --- cpython-unix/extension-modules.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/cpython-unix/extension-modules.yml b/cpython-unix/extension-modules.yml index 52150b59..2afc5422 100644 --- a/cpython-unix/extension-modules.yml +++ b/cpython-unix/extension-modules.yml @@ -664,6 +664,7 @@ _tkinter: - CoreGraphics - IOKit - QuartzCore + - UniformTypeIdentifiers _tokenize: minimum-python-version: "3.11" From 10ee0200802e15e7857b7201c7196a6f0193b4a8 Mon Sep 17 00:00:00 2001 From: Zanie Blue Date: Wed, 4 Sep 2024 13:41:49 -0500 Subject: [PATCH 08/33] Bump minimum macOS version from `10.9` to `10.13` for `x86_64-apple-darwin` --- cpython-unix/targets.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cpython-unix/targets.yml b/cpython-unix/targets.yml index 02e41311..140fed67 100644 --- a/cpython-unix/targets.yml +++ b/cpython-unix/targets.yml @@ -546,7 +546,7 @@ thumb7k-apple-watchos: # Intel macOS. # -# We target compatibility with macOS 10.9+ for compatibility with older Apple +# We target compatibility with macOS 10.13+ for compatibility with older Apple # machines. x86_64-apple-darwin: host_platforms: @@ -566,7 +566,7 @@ x86_64-apple-darwin: target_cflags: - '-arch' - 'x86_64' - - '-mmacosx-version-min=10.9' + - '-mmacosx-version-min=10.13' # Suppress extremely verbose warnings we see with LLVM 10. - '-Wno-nullability-completeness' - '-Wno-expansion-to-defined' @@ -581,7 +581,7 @@ x86_64-apple-darwin: target_ldflags: - '-arch' - 'x86_64' - - '-mmacosx-version-min=10.9' + - '-mmacosx-version-min=10.13' needs: - autoconf - bzip2 From d33c58b3370f2cf8e200a925e72c6781a4d5bdbc Mon Sep 17 00:00:00 2001 From: Zanie Blue Date: Wed, 4 Sep 2024 15:35:21 -0500 Subject: [PATCH 09/33] Attempt to disable system libmpdec on Windows --- cpython-windows/build.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/cpython-windows/build.py b/cpython-windows/build.py index f7a4ebd2..9195e071 100644 --- a/cpython-windows/build.py +++ b/cpython-windows/build.py @@ -1599,6 +1599,11 @@ def build_cpython( if not meets_python_minimum_version(python_version, "3.12"): args.append("--include-distutils") + # CPython 3.13+ no longer uses a bundled libmpdec by default + # TODO(zanieb): We should use the system libmpdec as we do for Unix builds + if meets_python_minimum_version(python_version, "3.13"): + args.append("--with-system-libmpdec=no") + args.extend(["--include-idle", "--include-stable", "--include-tcltk"]) exec_and_log( From 9cacdcc31b0ccb14e0549c9680c39b13729175b3 Mon Sep 17 00:00:00 2001 From: Zanie Blue Date: Wed, 4 Sep 2024 16:03:18 -0500 Subject: [PATCH 10/33] Revert "Fix missing macOS framework for tcl/tk" This reverts commit 084c8d44b98f174b53662a63e24b568bb4033103. --- cpython-unix/extension-modules.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/cpython-unix/extension-modules.yml b/cpython-unix/extension-modules.yml index 2afc5422..52150b59 100644 --- a/cpython-unix/extension-modules.yml +++ b/cpython-unix/extension-modules.yml @@ -664,7 +664,6 @@ _tkinter: - CoreGraphics - IOKit - QuartzCore - - UniformTypeIdentifiers _tokenize: minimum-python-version: "3.11" From be596897d54aaa610dc6990e346e5f78bd45d411 Mon Sep 17 00:00:00 2001 From: Zanie Blue Date: Wed, 4 Sep 2024 18:58:51 -0500 Subject: [PATCH 11/33] TMP: Shrink matrix --- .github/workflows/apple.yml | 192 ++-- .github/workflows/linux.yml | 1560 ++++++++++++++++----------------- .github/workflows/windows.yml | 8 +- 3 files changed, 880 insertions(+), 880 deletions(-) diff --git a/.github/workflows/apple.yml b/.github/workflows/apple.yml index b36a6064..b3634bc0 100644 --- a/.github/workflows/apple.yml +++ b/.github/workflows/apple.yml @@ -49,57 +49,57 @@ jobs: fail-fast: false matrix: build: - - target_triple: 'aarch64-apple-darwin' - runner: macos-14 - py: 'cpython-3.8' - optimizations: 'debug' - - target_triple: 'aarch64-apple-darwin' - runner: macos-14 - py: 'cpython-3.8' - optimizations: 'pgo' - - target_triple: 'aarch64-apple-darwin' - runner: macos-14 - py: 'cpython-3.8' - optimizations: 'pgo+lto' + # - target_triple: 'aarch64-apple-darwin' + # runner: macos-14 + # py: 'cpython-3.8' + # optimizations: 'debug' + # - target_triple: 'aarch64-apple-darwin' + # runner: macos-14 + # py: 'cpython-3.8' + # optimizations: 'pgo' + # - target_triple: 'aarch64-apple-darwin' + # runner: macos-14 + # py: 'cpython-3.8' + # optimizations: 'pgo+lto' - - target_triple: 'aarch64-apple-darwin' - runner: macos-14 - py: 'cpython-3.9' - optimizations: 'debug' - - target_triple: 'aarch64-apple-darwin' - runner: macos-14 - py: 'cpython-3.9' - optimizations: 'pgo' - - target_triple: 'aarch64-apple-darwin' - runner: macos-14 - py: 'cpython-3.9' - optimizations: 'pgo+lto' + # - target_triple: 'aarch64-apple-darwin' + # runner: macos-14 + # py: 'cpython-3.9' + # optimizations: 'debug' + # - target_triple: 'aarch64-apple-darwin' + # runner: macos-14 + # py: 'cpython-3.9' + # optimizations: 'pgo' + # - target_triple: 'aarch64-apple-darwin' + # runner: macos-14 + # py: 'cpython-3.9' + # optimizations: 'pgo+lto' - - target_triple: 'aarch64-apple-darwin' - runner: macos-14 - py: 'cpython-3.10' - optimizations: 'debug' - - target_triple: 'aarch64-apple-darwin' - runner: macos-14 - py: 'cpython-3.10' - optimizations: 'pgo' - - target_triple: 'aarch64-apple-darwin' - runner: macos-14 - py: 'cpython-3.10' - optimizations: 'pgo+lto' + # - target_triple: 'aarch64-apple-darwin' + # runner: macos-14 + # py: 'cpython-3.10' + # optimizations: 'debug' + # - target_triple: 'aarch64-apple-darwin' + # runner: macos-14 + # py: 'cpython-3.10' + # optimizations: 'pgo' + # - target_triple: 'aarch64-apple-darwin' + # runner: macos-14 + # py: 'cpython-3.10' + # optimizations: 'pgo+lto' - - target_triple: 'aarch64-apple-darwin' - runner: macos-14 - py: 'cpython-3.11' - optimizations: 'debug' - - target_triple: 'aarch64-apple-darwin' - runner: macos-14 - py: 'cpython-3.11' - optimizations: 'pgo' - - target_triple: 'aarch64-apple-darwin' - runner: macos-14 - py: 'cpython-3.11' - optimizations: 'pgo+lto' + # - target_triple: 'aarch64-apple-darwin' + # runner: macos-14 + # py: 'cpython-3.11' + # optimizations: 'debug' + # - target_triple: 'aarch64-apple-darwin' + # runner: macos-14 + # py: 'cpython-3.11' + # optimizations: 'pgo' + # - target_triple: 'aarch64-apple-darwin' + # runner: macos-14 + # py: 'cpython-3.11' + # optimizations: 'pgo+lto' - target_triple: 'aarch64-apple-darwin' runner: macos-14 @@ -130,57 +130,57 @@ jobs: # macOS on Intel hardware. This is pretty straightforward. We exclude # noopt because it doesn't provide any compelling advantages over PGO # or LTO builds. - - target_triple: 'x86_64-apple-darwin' - runner: macos-13 - py: 'cpython-3.8' - optimizations: 'debug' - - target_triple: 'x86_64-apple-darwin' - runner: macos-13 - py: 'cpython-3.8' - optimizations: 'pgo' - - target_triple: 'x86_64-apple-darwin' - runner: macos-13 - py: 'cpython-3.8' - optimizations: 'pgo+lto' + # - target_triple: 'x86_64-apple-darwin' + # runner: macos-13 + # py: 'cpython-3.8' + # optimizations: 'debug' + # - target_triple: 'x86_64-apple-darwin' + # runner: macos-13 + # py: 'cpython-3.8' + # optimizations: 'pgo' + # - target_triple: 'x86_64-apple-darwin' + # runner: macos-13 + # py: 'cpython-3.8' + # optimizations: 'pgo+lto' - - target_triple: 'x86_64-apple-darwin' - runner: macos-13 - py: 'cpython-3.9' - optimizations: 'debug' - - target_triple: 'x86_64-apple-darwin' - runner: macos-13 - py: 'cpython-3.9' - optimizations: 'pgo' - - target_triple: 'x86_64-apple-darwin' - runner: macos-13 - py: 'cpython-3.9' - optimizations: 'pgo+lto' + # - target_triple: 'x86_64-apple-darwin' + # runner: macos-13 + # py: 'cpython-3.9' + # optimizations: 'debug' + # - target_triple: 'x86_64-apple-darwin' + # runner: macos-13 + # py: 'cpython-3.9' + # optimizations: 'pgo' + # - target_triple: 'x86_64-apple-darwin' + # runner: macos-13 + # py: 'cpython-3.9' + # optimizations: 'pgo+lto' - - target_triple: 'x86_64-apple-darwin' - runner: macos-13 - py: 'cpython-3.10' - optimizations: 'debug' - - target_triple: 'x86_64-apple-darwin' - runner: macos-13 - py: 'cpython-3.10' - optimizations: 'pgo' - - target_triple: 'x86_64-apple-darwin' - runner: macos-13 - py: 'cpython-3.10' - optimizations: 'pgo+lto' + # - target_triple: 'x86_64-apple-darwin' + # runner: macos-13 + # py: 'cpython-3.10' + # optimizations: 'debug' + # - target_triple: 'x86_64-apple-darwin' + # runner: macos-13 + # py: 'cpython-3.10' + # optimizations: 'pgo' + # - target_triple: 'x86_64-apple-darwin' + # runner: macos-13 + # py: 'cpython-3.10' + # optimizations: 'pgo+lto' - - target_triple: 'x86_64-apple-darwin' - runner: macos-13 - py: 'cpython-3.11' - optimizations: 'debug' - - target_triple: 'x86_64-apple-darwin' - runner: macos-13 - py: 'cpython-3.11' - optimizations: 'pgo' - - target_triple: 'x86_64-apple-darwin' - runner: macos-13 - py: 'cpython-3.11' - optimizations: 'pgo+lto' + # - target_triple: 'x86_64-apple-darwin' + # runner: macos-13 + # py: 'cpython-3.11' + # optimizations: 'debug' + # - target_triple: 'x86_64-apple-darwin' + # runner: macos-13 + # py: 'cpython-3.11' + # optimizations: 'pgo' + # - target_triple: 'x86_64-apple-darwin' + # runner: macos-13 + # py: 'cpython-3.11' + # optimizations: 'pgo+lto' - target_triple: 'x86_64-apple-darwin' runner: macos-13 diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 4c354cc2..ce1af864 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -125,45 +125,45 @@ jobs: matrix: build: # Cross-compiles can't do PGO. - - target_triple: 'aarch64-unknown-linux-gnu' - py: 'cpython-3.8' - optimizations: 'debug' - - target_triple: 'aarch64-unknown-linux-gnu' - py: 'cpython-3.8' - optimizations: 'noopt' - - target_triple: 'aarch64-unknown-linux-gnu' - py: 'cpython-3.8' - optimizations: 'lto' - - - target_triple: 'aarch64-unknown-linux-gnu' - py: 'cpython-3.9' - optimizations: 'debug' - - target_triple: 'aarch64-unknown-linux-gnu' - py: 'cpython-3.9' - optimizations: 'noopt' - - target_triple: 'aarch64-unknown-linux-gnu' - py: 'cpython-3.9' - optimizations: 'lto' - - - target_triple: 'aarch64-unknown-linux-gnu' - py: 'cpython-3.10' - optimizations: 'debug' - - target_triple: 'aarch64-unknown-linux-gnu' - py: 'cpython-3.10' - optimizations: 'noopt' - - target_triple: 'aarch64-unknown-linux-gnu' - py: 'cpython-3.10' - optimizations: 'lto' - - - target_triple: 'aarch64-unknown-linux-gnu' - py: 'cpython-3.11' - optimizations: 'debug' - - target_triple: 'aarch64-unknown-linux-gnu' - py: 'cpython-3.11' - optimizations: 'noopt' - - target_triple: 'aarch64-unknown-linux-gnu' - py: 'cpython-3.11' - optimizations: 'lto' + # - target_triple: 'aarch64-unknown-linux-gnu' + # py: 'cpython-3.8' + # optimizations: 'debug' + # - target_triple: 'aarch64-unknown-linux-gnu' + # py: 'cpython-3.8' + # optimizations: 'noopt' + # - target_triple: 'aarch64-unknown-linux-gnu' + # py: 'cpython-3.8' + # optimizations: 'lto' + + # - target_triple: 'aarch64-unknown-linux-gnu' + # py: 'cpython-3.9' + # optimizations: 'debug' + # - target_triple: 'aarch64-unknown-linux-gnu' + # py: 'cpython-3.9' + # optimizations: 'noopt' + # - target_triple: 'aarch64-unknown-linux-gnu' + # py: 'cpython-3.9' + # optimizations: 'lto' + + # - target_triple: 'aarch64-unknown-linux-gnu' + # py: 'cpython-3.10' + # optimizations: 'debug' + # - target_triple: 'aarch64-unknown-linux-gnu' + # py: 'cpython-3.10' + # optimizations: 'noopt' + # - target_triple: 'aarch64-unknown-linux-gnu' + # py: 'cpython-3.10' + # optimizations: 'lto' + + # - target_triple: 'aarch64-unknown-linux-gnu' + # py: 'cpython-3.11' + # optimizations: 'debug' + # - target_triple: 'aarch64-unknown-linux-gnu' + # py: 'cpython-3.11' + # optimizations: 'noopt' + # - target_triple: 'aarch64-unknown-linux-gnu' + # py: 'cpython-3.11' + # optimizations: 'lto' - target_triple: 'aarch64-unknown-linux-gnu' py: 'cpython-3.12' @@ -186,45 +186,45 @@ jobs: optimizations: 'lto' # Cross-compiles can't do PGO and require Python 3.9. - - target_triple: 'armv7-unknown-linux-gnueabi' - py: 'cpython-3.9' - optimizations: 'debug' - - target_triple: 'armv7-unknown-linux-gnueabi' - py: 'cpython-3.9' - optimizations: 'noopt' - - target_triple: 'armv7-unknown-linux-gnueabi' - py: 'cpython-3.9' - optimizations: 'lto' - - - target_triple: 'armv7-unknown-linux-gnueabi' - py: 'cpython-3.10' - optimizations: 'debug' - - target_triple: 'armv7-unknown-linux-gnueabi' - py: 'cpython-3.10' - optimizations: 'noopt' - - target_triple: 'armv7-unknown-linux-gnueabi' - py: 'cpython-3.10' - optimizations: 'lto' - - - target_triple: 'armv7-unknown-linux-gnueabi' - py: 'cpython-3.11' - optimizations: 'debug' - - target_triple: 'armv7-unknown-linux-gnueabi' - py: 'cpython-3.11' - optimizations: 'noopt' - - target_triple: 'armv7-unknown-linux-gnueabi' - py: 'cpython-3.11' - optimizations: 'lto' - - - target_triple: 'armv7-unknown-linux-gnueabi' - py: 'cpython-3.12' - optimizations: 'debug' - - target_triple: 'armv7-unknown-linux-gnueabi' - py: 'cpython-3.12' - optimizations: 'noopt' - - target_triple: 'armv7-unknown-linux-gnueabi' - py: 'cpython-3.12' - optimizations: 'lto' + # - target_triple: 'armv7-unknown-linux-gnueabi' + # py: 'cpython-3.9' + # optimizations: 'debug' + # - target_triple: 'armv7-unknown-linux-gnueabi' + # py: 'cpython-3.9' + # optimizations: 'noopt' + # - target_triple: 'armv7-unknown-linux-gnueabi' + # py: 'cpython-3.9' + # optimizations: 'lto' + + # - target_triple: 'armv7-unknown-linux-gnueabi' + # py: 'cpython-3.10' + # optimizations: 'debug' + # - target_triple: 'armv7-unknown-linux-gnueabi' + # py: 'cpython-3.10' + # optimizations: 'noopt' + # - target_triple: 'armv7-unknown-linux-gnueabi' + # py: 'cpython-3.10' + # optimizations: 'lto' + + # - target_triple: 'armv7-unknown-linux-gnueabi' + # py: 'cpython-3.11' + # optimizations: 'debug' + # - target_triple: 'armv7-unknown-linux-gnueabi' + # py: 'cpython-3.11' + # optimizations: 'noopt' + # - target_triple: 'armv7-unknown-linux-gnueabi' + # py: 'cpython-3.11' + # optimizations: 'lto' + + # - target_triple: 'armv7-unknown-linux-gnueabi' + # py: 'cpython-3.12' + # optimizations: 'debug' + # - target_triple: 'armv7-unknown-linux-gnueabi' + # py: 'cpython-3.12' + # optimizations: 'noopt' + # - target_triple: 'armv7-unknown-linux-gnueabi' + # py: 'cpython-3.12' + # optimizations: 'lto' - target_triple: 'armv7-unknown-linux-gnueabi' py: 'cpython-3.13' @@ -237,96 +237,96 @@ jobs: optimizations: 'lto' # Cross-compiles can't do PGO and require Python 3.9. - - target_triple: 'armv7-unknown-linux-gnueabihf' - py: 'cpython-3.9' - optimizations: 'debug' - - target_triple: 'armv7-unknown-linux-gnueabihf' - py: 'cpython-3.9' - optimizations: 'noopt' - - target_triple: 'armv7-unknown-linux-gnueabihf' - py: 'cpython-3.9' - optimizations: 'lto' - - - target_triple: 'armv7-unknown-linux-gnueabihf' - py: 'cpython-3.10' - optimizations: 'debug' - - target_triple: 'armv7-unknown-linux-gnueabihf' - py: 'cpython-3.10' - optimizations: 'noopt' - - target_triple: 'armv7-unknown-linux-gnueabihf' - py: 'cpython-3.10' - optimizations: 'lto' - - - target_triple: 'armv7-unknown-linux-gnueabihf' - py: 'cpython-3.11' - optimizations: 'debug' - - target_triple: 'armv7-unknown-linux-gnueabihf' - py: 'cpython-3.11' - optimizations: 'noopt' - - target_triple: 'armv7-unknown-linux-gnueabihf' - py: 'cpython-3.11' - optimizations: 'lto' - - - target_triple: 'armv7-unknown-linux-gnueabihf' - py: 'cpython-3.12' - optimizations: 'debug' - - target_triple: 'armv7-unknown-linux-gnueabihf' - py: 'cpython-3.12' - optimizations: 'noopt' - - target_triple: 'armv7-unknown-linux-gnueabihf' - py: 'cpython-3.12' - optimizations: 'lto' - - - target_triple: 'armv7-unknown-linux-gnueabihf' - py: 'cpython-3.13' - optimizations: 'debug' - - target_triple: 'armv7-unknown-linux-gnueabihf' - py: 'cpython-3.13' - optimizations: 'noopt' - - target_triple: 'armv7-unknown-linux-gnueabihf' - py: 'cpython-3.13' - optimizations: 'lto' - - # Cross-compiles can't do PGO and require Python 3.9. - - target_triple: 'mips-unknown-linux-gnu' - py: 'cpython-3.9' - optimizations: 'debug' - - target_triple: 'mips-unknown-linux-gnu' - py: 'cpython-3.9' - optimizations: 'noopt' - - target_triple: 'mips-unknown-linux-gnu' - py: 'cpython-3.9' - optimizations: 'lto' - - - target_triple: 'mips-unknown-linux-gnu' - py: 'cpython-3.10' - optimizations: 'debug' - - target_triple: 'mips-unknown-linux-gnu' - py: 'cpython-3.10' - optimizations: 'noopt' - - target_triple: 'mips-unknown-linux-gnu' - py: 'cpython-3.10' - optimizations: 'lto' - - - target_triple: 'mips-unknown-linux-gnu' - py: 'cpython-3.11' - optimizations: 'debug' - - target_triple: 'mips-unknown-linux-gnu' - py: 'cpython-3.11' - optimizations: 'noopt' - - target_triple: 'mips-unknown-linux-gnu' - py: 'cpython-3.11' - optimizations: 'lto' - - - target_triple: 'mips-unknown-linux-gnu' - py: 'cpython-3.12' - optimizations: 'debug' - - target_triple: 'mips-unknown-linux-gnu' - py: 'cpython-3.12' - optimizations: 'noopt' - - target_triple: 'mips-unknown-linux-gnu' - py: 'cpython-3.12' - optimizations: 'lto' + # - target_triple: 'armv7-unknown-linux-gnueabihf' + # py: 'cpython-3.9' + # optimizations: 'debug' + # - target_triple: 'armv7-unknown-linux-gnueabihf' + # py: 'cpython-3.9' + # optimizations: 'noopt' + # - target_triple: 'armv7-unknown-linux-gnueabihf' + # py: 'cpython-3.9' + # optimizations: 'lto' + + # - target_triple: 'armv7-unknown-linux-gnueabihf' + # py: 'cpython-3.10' + # optimizations: 'debug' + # - target_triple: 'armv7-unknown-linux-gnueabihf' + # py: 'cpython-3.10' + # optimizations: 'noopt' + # - target_triple: 'armv7-unknown-linux-gnueabihf' + # py: 'cpython-3.10' + # optimizations: 'lto' + + # - target_triple: 'armv7-unknown-linux-gnueabihf' + # py: 'cpython-3.11' + # optimizations: 'debug' + # - target_triple: 'armv7-unknown-linux-gnueabihf' + # py: 'cpython-3.11' + # optimizations: 'noopt' + # - target_triple: 'armv7-unknown-linux-gnueabihf' + # py: 'cpython-3.11' + # optimizations: 'lto' + + # - target_triple: 'armv7-unknown-linux-gnueabihf' + # py: 'cpython-3.12' + # optimizations: 'debug' + # - target_triple: 'armv7-unknown-linux-gnueabihf' + # py: 'cpython-3.12' + # optimizations: 'noopt' + # - target_triple: 'armv7-unknown-linux-gnueabihf' + # py: 'cpython-3.12' + # optimizations: 'lto' + + # - target_triple: 'armv7-unknown-linux-gnueabihf' + # py: 'cpython-3.13' + # optimizations: 'debug' + # - target_triple: 'armv7-unknown-linux-gnueabihf' + # py: 'cpython-3.13' + # optimizations: 'noopt' + # - target_triple: 'armv7-unknown-linux-gnueabihf' + # py: 'cpython-3.13' + # optimizations: 'lto' + + # # Cross-compiles can't do PGO and require Python 3.9. + # - target_triple: 'mips-unknown-linux-gnu' + # py: 'cpython-3.9' + # optimizations: 'debug' + # - target_triple: 'mips-unknown-linux-gnu' + # py: 'cpython-3.9' + # optimizations: 'noopt' + # - target_triple: 'mips-unknown-linux-gnu' + # py: 'cpython-3.9' + # optimizations: 'lto' + + # - target_triple: 'mips-unknown-linux-gnu' + # py: 'cpython-3.10' + # optimizations: 'debug' + # - target_triple: 'mips-unknown-linux-gnu' + # py: 'cpython-3.10' + # optimizations: 'noopt' + # - target_triple: 'mips-unknown-linux-gnu' + # py: 'cpython-3.10' + # optimizations: 'lto' + + # - target_triple: 'mips-unknown-linux-gnu' + # py: 'cpython-3.11' + # optimizations: 'debug' + # - target_triple: 'mips-unknown-linux-gnu' + # py: 'cpython-3.11' + # optimizations: 'noopt' + # - target_triple: 'mips-unknown-linux-gnu' + # py: 'cpython-3.11' + # optimizations: 'lto' + + # - target_triple: 'mips-unknown-linux-gnu' + # py: 'cpython-3.12' + # optimizations: 'debug' + # - target_triple: 'mips-unknown-linux-gnu' + # py: 'cpython-3.12' + # optimizations: 'noopt' + # - target_triple: 'mips-unknown-linux-gnu' + # py: 'cpython-3.12' + # optimizations: 'lto' - target_triple: 'mips-unknown-linux-gnu' py: 'cpython-3.13' @@ -339,96 +339,96 @@ jobs: optimizations: 'lto' # Cross-compiles can't do PGO and require Python 3.9. - - target_triple: 'mipsel-unknown-linux-gnu' - py: 'cpython-3.9' - optimizations: 'debug' - - target_triple: 'mipsel-unknown-linux-gnu' - py: 'cpython-3.9' - optimizations: 'noopt' - - target_triple: 'mipsel-unknown-linux-gnu' - py: 'cpython-3.9' - optimizations: 'lto' - - - target_triple: 'mipsel-unknown-linux-gnu' - py: 'cpython-3.10' - optimizations: 'debug' - - target_triple: 'mipsel-unknown-linux-gnu' - py: 'cpython-3.10' - optimizations: 'noopt' - - target_triple: 'mipsel-unknown-linux-gnu' - py: 'cpython-3.10' - optimizations: 'lto' - - - target_triple: 'mipsel-unknown-linux-gnu' - py: 'cpython-3.11' - optimizations: 'debug' - - target_triple: 'mipsel-unknown-linux-gnu' - py: 'cpython-3.11' - optimizations: 'noopt' - - target_triple: 'mipsel-unknown-linux-gnu' - py: 'cpython-3.11' - optimizations: 'lto' - - - target_triple: 'mipsel-unknown-linux-gnu' - py: 'cpython-3.12' - optimizations: 'debug' - - target_triple: 'mipsel-unknown-linux-gnu' - py: 'cpython-3.12' - optimizations: 'noopt' - - target_triple: 'mipsel-unknown-linux-gnu' - py: 'cpython-3.12' - optimizations: 'lto' - - - target_triple: 'mipsel-unknown-linux-gnu' - py: 'cpython-3.13' - optimizations: 'debug' - - target_triple: 'mipsel-unknown-linux-gnu' - py: 'cpython-3.13' - optimizations: 'noopt' - - target_triple: 'mipsel-unknown-linux-gnu' - py: 'cpython-3.13' - optimizations: 'lto' - - # Cross-compiles can't do PGO and require Python 3.9. - - target_triple: 's390x-unknown-linux-gnu' - py: 'cpython-3.9' - optimizations: 'debug' - - target_triple: 's390x-unknown-linux-gnu' - py: 'cpython-3.9' - optimizations: 'noopt' - - target_triple: 's390x-unknown-linux-gnu' - py: 'cpython-3.9' - optimizations: 'lto' - - - target_triple: 's390x-unknown-linux-gnu' - py: 'cpython-3.10' - optimizations: 'debug' - - target_triple: 's390x-unknown-linux-gnu' - py: 'cpython-3.10' - optimizations: 'noopt' - - target_triple: 's390x-unknown-linux-gnu' - py: 'cpython-3.10' - optimizations: 'lto' - - - target_triple: 's390x-unknown-linux-gnu' - py: 'cpython-3.11' - optimizations: 'debug' - - target_triple: 's390x-unknown-linux-gnu' - py: 'cpython-3.11' - optimizations: 'noopt' - - target_triple: 's390x-unknown-linux-gnu' - py: 'cpython-3.11' - optimizations: 'lto' - - - target_triple: 's390x-unknown-linux-gnu' - py: 'cpython-3.12' - optimizations: 'debug' - - target_triple: 's390x-unknown-linux-gnu' - py: 'cpython-3.12' - optimizations: 'noopt' - - target_triple: 's390x-unknown-linux-gnu' - py: 'cpython-3.12' - optimizations: 'lto' + # - target_triple: 'mipsel-unknown-linux-gnu' + # py: 'cpython-3.9' + # optimizations: 'debug' + # - target_triple: 'mipsel-unknown-linux-gnu' + # py: 'cpython-3.9' + # optimizations: 'noopt' + # - target_triple: 'mipsel-unknown-linux-gnu' + # py: 'cpython-3.9' + # optimizations: 'lto' + + # - target_triple: 'mipsel-unknown-linux-gnu' + # py: 'cpython-3.10' + # optimizations: 'debug' + # - target_triple: 'mipsel-unknown-linux-gnu' + # py: 'cpython-3.10' + # optimizations: 'noopt' + # - target_triple: 'mipsel-unknown-linux-gnu' + # py: 'cpython-3.10' + # optimizations: 'lto' + + # - target_triple: 'mipsel-unknown-linux-gnu' + # py: 'cpython-3.11' + # optimizations: 'debug' + # - target_triple: 'mipsel-unknown-linux-gnu' + # py: 'cpython-3.11' + # optimizations: 'noopt' + # - target_triple: 'mipsel-unknown-linux-gnu' + # py: 'cpython-3.11' + # optimizations: 'lto' + + # - target_triple: 'mipsel-unknown-linux-gnu' + # py: 'cpython-3.12' + # optimizations: 'debug' + # - target_triple: 'mipsel-unknown-linux-gnu' + # py: 'cpython-3.12' + # optimizations: 'noopt' + # - target_triple: 'mipsel-unknown-linux-gnu' + # py: 'cpython-3.12' + # optimizations: 'lto' + + # - target_triple: 'mipsel-unknown-linux-gnu' + # py: 'cpython-3.13' + # optimizations: 'debug' + # - target_triple: 'mipsel-unknown-linux-gnu' + # py: 'cpython-3.13' + # optimizations: 'noopt' + # - target_triple: 'mipsel-unknown-linux-gnu' + # py: 'cpython-3.13' + # optimizations: 'lto' + + # # Cross-compiles can't do PGO and require Python 3.9. + # - target_triple: 's390x-unknown-linux-gnu' + # py: 'cpython-3.9' + # optimizations: 'debug' + # - target_triple: 's390x-unknown-linux-gnu' + # py: 'cpython-3.9' + # optimizations: 'noopt' + # - target_triple: 's390x-unknown-linux-gnu' + # py: 'cpython-3.9' + # optimizations: 'lto' + + # - target_triple: 's390x-unknown-linux-gnu' + # py: 'cpython-3.10' + # optimizations: 'debug' + # - target_triple: 's390x-unknown-linux-gnu' + # py: 'cpython-3.10' + # optimizations: 'noopt' + # - target_triple: 's390x-unknown-linux-gnu' + # py: 'cpython-3.10' + # optimizations: 'lto' + + # - target_triple: 's390x-unknown-linux-gnu' + # py: 'cpython-3.11' + # optimizations: 'debug' + # - target_triple: 's390x-unknown-linux-gnu' + # py: 'cpython-3.11' + # optimizations: 'noopt' + # - target_triple: 's390x-unknown-linux-gnu' + # py: 'cpython-3.11' + # optimizations: 'lto' + + # - target_triple: 's390x-unknown-linux-gnu' + # py: 'cpython-3.12' + # optimizations: 'debug' + # - target_triple: 's390x-unknown-linux-gnu' + # py: 'cpython-3.12' + # optimizations: 'noopt' + # - target_triple: 's390x-unknown-linux-gnu' + # py: 'cpython-3.12' + # optimizations: 'lto' - target_triple: 's390x-unknown-linux-gnu' py: 'cpython-3.13' @@ -441,108 +441,108 @@ jobs: optimizations: 'lto' # Cross-compiles can't do PGO and require Python 3.9. - - target_triple: 'ppc64le-unknown-linux-gnu' - py: 'cpython-3.9' - optimizations: 'debug' - - target_triple: 'ppc64le-unknown-linux-gnu' - py: 'cpython-3.9' - optimizations: 'noopt' - - target_triple: 'ppc64le-unknown-linux-gnu' - py: 'cpython-3.9' - optimizations: 'lto' - - - target_triple: 'ppc64le-unknown-linux-gnu' - py: 'cpython-3.10' - optimizations: 'debug' - - target_triple: 'ppc64le-unknown-linux-gnu' - py: 'cpython-3.10' - optimizations: 'noopt' - - target_triple: 'ppc64le-unknown-linux-gnu' - py: 'cpython-3.10' - optimizations: 'lto' - - - target_triple: 'ppc64le-unknown-linux-gnu' - py: 'cpython-3.11' - optimizations: 'debug' - - target_triple: 'ppc64le-unknown-linux-gnu' - py: 'cpython-3.11' - optimizations: 'noopt' - - target_triple: 'ppc64le-unknown-linux-gnu' - py: 'cpython-3.11' - optimizations: 'lto' - - - target_triple: 'ppc64le-unknown-linux-gnu' - py: 'cpython-3.12' - optimizations: 'debug' - - target_triple: 'ppc64le-unknown-linux-gnu' - py: 'cpython-3.12' - optimizations: 'noopt' - - target_triple: 'ppc64le-unknown-linux-gnu' - py: 'cpython-3.12' - optimizations: 'lto' - - - target_triple: 'ppc64le-unknown-linux-gnu' - py: 'cpython-3.13' - optimizations: 'debug' - - target_triple: 'ppc64le-unknown-linux-gnu' - py: 'cpython-3.13' - optimizations: 'noopt' - - target_triple: 'ppc64le-unknown-linux-gnu' - py: 'cpython-3.13' - optimizations: 'lto' - - # We don't publish noopt builds when PGO is available. - - target_triple: 'x86_64-unknown-linux-gnu' - py: 'cpython-3.8' - optimizations: 'debug' - run: true - - target_triple: 'x86_64-unknown-linux-gnu' - py: 'cpython-3.8' - optimizations: 'pgo' - run: true - - target_triple: 'x86_64-unknown-linux-gnu' - py: 'cpython-3.8' - optimizations: 'pgo+lto' - run: true - - - target_triple: 'x86_64-unknown-linux-gnu' - py: 'cpython-3.9' - optimizations: 'debug' - run: true - - target_triple: 'x86_64-unknown-linux-gnu' - py: 'cpython-3.9' - optimizations: 'pgo' - run: true - - target_triple: 'x86_64-unknown-linux-gnu' - py: 'cpython-3.9' - optimizations: 'pgo+lto' - run: true - - - target_triple: 'x86_64-unknown-linux-gnu' - py: 'cpython-3.10' - optimizations: 'debug' - run: true - - target_triple: 'x86_64-unknown-linux-gnu' - py: 'cpython-3.10' - optimizations: 'pgo' - run: true - - target_triple: 'x86_64-unknown-linux-gnu' - py: 'cpython-3.10' - optimizations: 'pgo+lto' - run: true - - - target_triple: 'x86_64-unknown-linux-gnu' - py: 'cpython-3.11' - optimizations: 'debug' - run: true - - target_triple: 'x86_64-unknown-linux-gnu' - py: 'cpython-3.11' - optimizations: 'pgo' - run: true - - target_triple: 'x86_64-unknown-linux-gnu' - py: 'cpython-3.11' - optimizations: 'pgo+lto' - run: true + # - target_triple: 'ppc64le-unknown-linux-gnu' + # py: 'cpython-3.9' + # optimizations: 'debug' + # - target_triple: 'ppc64le-unknown-linux-gnu' + # py: 'cpython-3.9' + # optimizations: 'noopt' + # - target_triple: 'ppc64le-unknown-linux-gnu' + # py: 'cpython-3.9' + # optimizations: 'lto' + + # - target_triple: 'ppc64le-unknown-linux-gnu' + # py: 'cpython-3.10' + # optimizations: 'debug' + # - target_triple: 'ppc64le-unknown-linux-gnu' + # py: 'cpython-3.10' + # optimizations: 'noopt' + # - target_triple: 'ppc64le-unknown-linux-gnu' + # py: 'cpython-3.10' + # optimizations: 'lto' + + # - target_triple: 'ppc64le-unknown-linux-gnu' + # py: 'cpython-3.11' + # optimizations: 'debug' + # - target_triple: 'ppc64le-unknown-linux-gnu' + # py: 'cpython-3.11' + # optimizations: 'noopt' + # - target_triple: 'ppc64le-unknown-linux-gnu' + # py: 'cpython-3.11' + # optimizations: 'lto' + + # - target_triple: 'ppc64le-unknown-linux-gnu' + # py: 'cpython-3.12' + # optimizations: 'debug' + # - target_triple: 'ppc64le-unknown-linux-gnu' + # py: 'cpython-3.12' + # optimizations: 'noopt' + # - target_triple: 'ppc64le-unknown-linux-gnu' + # py: 'cpython-3.12' + # optimizations: 'lto' + + # - target_triple: 'ppc64le-unknown-linux-gnu' + # py: 'cpython-3.13' + # optimizations: 'debug' + # - target_triple: 'ppc64le-unknown-linux-gnu' + # py: 'cpython-3.13' + # optimizations: 'noopt' + # - target_triple: 'ppc64le-unknown-linux-gnu' + # py: 'cpython-3.13' + # optimizations: 'lto' + + # # We don't publish noopt builds when PGO is available. + # - target_triple: 'x86_64-unknown-linux-gnu' + # py: 'cpython-3.8' + # optimizations: 'debug' + # run: true + # - target_triple: 'x86_64-unknown-linux-gnu' + # py: 'cpython-3.8' + # optimizations: 'pgo' + # run: true + # - target_triple: 'x86_64-unknown-linux-gnu' + # py: 'cpython-3.8' + # optimizations: 'pgo+lto' + # run: true + + # - target_triple: 'x86_64-unknown-linux-gnu' + # py: 'cpython-3.9' + # optimizations: 'debug' + # run: true + # - target_triple: 'x86_64-unknown-linux-gnu' + # py: 'cpython-3.9' + # optimizations: 'pgo' + # run: true + # - target_triple: 'x86_64-unknown-linux-gnu' + # py: 'cpython-3.9' + # optimizations: 'pgo+lto' + # run: true + + # - target_triple: 'x86_64-unknown-linux-gnu' + # py: 'cpython-3.10' + # optimizations: 'debug' + # run: true + # - target_triple: 'x86_64-unknown-linux-gnu' + # py: 'cpython-3.10' + # optimizations: 'pgo' + # run: true + # - target_triple: 'x86_64-unknown-linux-gnu' + # py: 'cpython-3.10' + # optimizations: 'pgo+lto' + # run: true + + # - target_triple: 'x86_64-unknown-linux-gnu' + # py: 'cpython-3.11' + # optimizations: 'debug' + # run: true + # - target_triple: 'x86_64-unknown-linux-gnu' + # py: 'cpython-3.11' + # optimizations: 'pgo' + # run: true + # - target_triple: 'x86_64-unknown-linux-gnu' + # py: 'cpython-3.11' + # optimizations: 'pgo+lto' + # run: true - target_triple: 'x86_64-unknown-linux-gnu' py: 'cpython-3.12' @@ -570,426 +570,426 @@ jobs: optimizations: 'pgo+lto' run: true - - target_triple: 'x86_64_v2-unknown-linux-gnu' - py: 'cpython-3.9' - optimizations: 'debug' - run: true - - target_triple: 'x86_64_v2-unknown-linux-gnu' - py: 'cpython-3.9' - optimizations: 'pgo' - run: true - - target_triple: 'x86_64_v2-unknown-linux-gnu' - py: 'cpython-3.9' - optimizations: 'pgo+lto' - run: true - - - target_triple: 'x86_64_v2-unknown-linux-gnu' - py: 'cpython-3.10' - optimizations: 'debug' - run: true - - target_triple: 'x86_64_v2-unknown-linux-gnu' - py: 'cpython-3.10' - optimizations: 'pgo' - run: true - - target_triple: 'x86_64_v2-unknown-linux-gnu' - py: 'cpython-3.10' - optimizations: 'pgo+lto' - run: true - - - target_triple: 'x86_64_v2-unknown-linux-gnu' - py: 'cpython-3.11' - optimizations: 'debug' - run: true - - target_triple: 'x86_64_v2-unknown-linux-gnu' - py: 'cpython-3.11' - optimizations: 'pgo' - run: true - - target_triple: 'x86_64_v2-unknown-linux-gnu' - py: 'cpython-3.11' - optimizations: 'pgo+lto' - run: true - - - target_triple: 'x86_64_v2-unknown-linux-gnu' - py: 'cpython-3.12' - optimizations: 'debug' - run: true - - target_triple: 'x86_64_v2-unknown-linux-gnu' - py: 'cpython-3.12' - optimizations: 'pgo' - run: true - - target_triple: 'x86_64_v2-unknown-linux-gnu' - py: 'cpython-3.12' - optimizations: 'pgo+lto' - run: true - - - target_triple: 'x86_64_v2-unknown-linux-gnu' - py: 'cpython-3.13' - optimizations: 'debug' - run: true - - target_triple: 'x86_64_v2-unknown-linux-gnu' - py: 'cpython-3.13' - optimizations: 'pgo' - run: true - - target_triple: 'x86_64_v2-unknown-linux-gnu' - py: 'cpython-3.13' - optimizations: 'pgo+lto' - run: true - - - target_triple: 'x86_64_v3-unknown-linux-gnu' - py: 'cpython-3.9' - optimizations: 'debug' - run: true - - target_triple: 'x86_64_v3-unknown-linux-gnu' - py: 'cpython-3.9' - optimizations: 'pgo' - run: true - - target_triple: 'x86_64_v3-unknown-linux-gnu' - py: 'cpython-3.9' - optimizations: 'pgo+lto' - run: true - - - target_triple: 'x86_64_v3-unknown-linux-gnu' - py: 'cpython-3.10' - optimizations: 'debug' - run: true - - target_triple: 'x86_64_v3-unknown-linux-gnu' - py: 'cpython-3.10' - optimizations: 'pgo' - run: true - - target_triple: 'x86_64_v3-unknown-linux-gnu' - py: 'cpython-3.10' - optimizations: 'pgo+lto' - run: true - - - target_triple: 'x86_64_v3-unknown-linux-gnu' - py: 'cpython-3.11' - optimizations: 'debug' - run: true - - target_triple: 'x86_64_v3-unknown-linux-gnu' - py: 'cpython-3.11' - optimizations: 'pgo' - run: true - - target_triple: 'x86_64_v3-unknown-linux-gnu' - py: 'cpython-3.11' - optimizations: 'pgo+lto' - run: true - - - target_triple: 'x86_64_v3-unknown-linux-gnu' - py: 'cpython-3.12' - optimizations: 'debug' - run: true - - target_triple: 'x86_64_v3-unknown-linux-gnu' - py: 'cpython-3.12' - optimizations: 'pgo' - run: true - - target_triple: 'x86_64_v3-unknown-linux-gnu' - py: 'cpython-3.12' - optimizations: 'pgo+lto' - run: true - - - target_triple: 'x86_64_v3-unknown-linux-gnu' - py: 'cpython-3.13' - optimizations: 'debug' - run: true - - target_triple: 'x86_64_v3-unknown-linux-gnu' - py: 'cpython-3.13' - optimizations: 'pgo' - run: true - - target_triple: 'x86_64_v3-unknown-linux-gnu' - py: 'cpython-3.13' - optimizations: 'pgo+lto' - run: true - - # GitHub Actions runners don't support x86-64-v4 so we can't PGO. - - target_triple: 'x86_64_v4-unknown-linux-gnu' - py: 'cpython-3.9' - optimizations: 'debug' - - target_triple: 'x86_64_v4-unknown-linux-gnu' - py: 'cpython-3.9' - optimizations: 'noopt' - - target_triple: 'x86_64_v4-unknown-linux-gnu' - py: 'cpython-3.9' - optimizations: 'lto' - - # GitHub Actions runners don't support x86-64-v4 so we can't PGO. - - target_triple: 'x86_64_v4-unknown-linux-gnu' - py: 'cpython-3.10' - optimizations: 'debug' - - target_triple: 'x86_64_v4-unknown-linux-gnu' - py: 'cpython-3.10' - optimizations: 'noopt' - - target_triple: 'x86_64_v4-unknown-linux-gnu' - py: 'cpython-3.10' - optimizations: 'lto' - - - target_triple: 'x86_64_v4-unknown-linux-gnu' - py: 'cpython-3.11' - optimizations: 'debug' - - target_triple: 'x86_64_v4-unknown-linux-gnu' - py: 'cpython-3.11' - optimizations: 'noopt' - - target_triple: 'x86_64_v4-unknown-linux-gnu' - py: 'cpython-3.11' - optimizations: 'lto' - - - target_triple: 'x86_64_v4-unknown-linux-gnu' - py: 'cpython-3.12' - optimizations: 'debug' - - target_triple: 'x86_64_v4-unknown-linux-gnu' - py: 'cpython-3.12' - optimizations: 'noopt' - - target_triple: 'x86_64_v4-unknown-linux-gnu' - py: 'cpython-3.12' - optimizations: 'lto' - - - target_triple: 'x86_64_v4-unknown-linux-gnu' - py: 'cpython-3.13' - optimizations: 'debug' - - target_triple: 'x86_64_v4-unknown-linux-gnu' - py: 'cpython-3.13' - optimizations: 'noopt' - - target_triple: 'x86_64_v4-unknown-linux-gnu' - py: 'cpython-3.13' - optimizations: 'lto' - - # musl doesn't support PGO. - - target_triple: 'x86_64-unknown-linux-musl' - py: 'cpython-3.8' - optimizations: 'debug' - run: true - - target_triple: 'x86_64-unknown-linux-musl' - py: 'cpython-3.8' - optimizations: 'noopt' - run: true - - target_triple: 'x86_64-unknown-linux-musl' - py: 'cpython-3.8' - optimizations: 'lto' - run: true - - - target_triple: 'x86_64-unknown-linux-musl' - py: 'cpython-3.9' - optimizations: 'debug' - run: true - - target_triple: 'x86_64-unknown-linux-musl' - py: 'cpython-3.9' - optimizations: 'noopt' - run: true - - target_triple: 'x86_64-unknown-linux-musl' - py: 'cpython-3.9' - optimizations: 'lto' - run: true - - - target_triple: 'x86_64-unknown-linux-musl' - py: 'cpython-3.10' - optimizations: 'debug' - run: true - - target_triple: 'x86_64-unknown-linux-musl' - py: 'cpython-3.10' - optimizations: 'noopt' - run: true - - target_triple: 'x86_64-unknown-linux-musl' - py: 'cpython-3.10' - optimizations: 'lto' - run: true - - - target_triple: 'x86_64-unknown-linux-musl' - py: 'cpython-3.11' - optimizations: 'debug' - run: true - - target_triple: 'x86_64-unknown-linux-musl' - py: 'cpython-3.11' - optimizations: 'noopt' - run: true - - target_triple: 'x86_64-unknown-linux-musl' - py: 'cpython-3.11' - optimizations: 'lto' - run: true - - - target_triple: 'x86_64-unknown-linux-musl' - py: 'cpython-3.12' - optimizations: 'debug' - run: true - - target_triple: 'x86_64-unknown-linux-musl' - py: 'cpython-3.12' - optimizations: 'noopt' - run: true - - target_triple: 'x86_64-unknown-linux-musl' - py: 'cpython-3.12' - optimizations: 'lto' - run: true - - - target_triple: 'x86_64-unknown-linux-musl' - py: 'cpython-3.13' - optimizations: 'debug' - run: true - - target_triple: 'x86_64-unknown-linux-musl' - py: 'cpython-3.13' - optimizations: 'noopt' - run: true - - target_triple: 'x86_64-unknown-linux-musl' - py: 'cpython-3.13' - optimizations: 'lto' - run: true - - - target_triple: 'x86_64_v2-unknown-linux-musl' - py: 'cpython-3.9' - optimizations: 'debug' - run: true - - target_triple: 'x86_64_v2-unknown-linux-musl' - py: 'cpython-3.9' - optimizations: 'noopt' - run: true - - target_triple: 'x86_64_v2-unknown-linux-musl' - py: 'cpython-3.9' - optimizations: 'lto' - run: true - - - target_triple: 'x86_64_v2-unknown-linux-musl' - py: 'cpython-3.10' - optimizations: 'debug' - run: true - - target_triple: 'x86_64_v2-unknown-linux-musl' - py: 'cpython-3.10' - optimizations: 'noopt' - run: true - - target_triple: 'x86_64_v2-unknown-linux-musl' - py: 'cpython-3.10' - optimizations: 'lto' - run: true - - - target_triple: 'x86_64_v2-unknown-linux-musl' - py: 'cpython-3.11' - optimizations: 'debug' - run: true - - target_triple: 'x86_64_v2-unknown-linux-musl' - py: 'cpython-3.11' - optimizations: 'noopt' - run: true - - target_triple: 'x86_64_v2-unknown-linux-musl' - py: 'cpython-3.11' - optimizations: 'lto' - run: true - - - target_triple: 'x86_64_v2-unknown-linux-musl' - py: 'cpython-3.12' - optimizations: 'debug' - run: true - - target_triple: 'x86_64_v2-unknown-linux-musl' - py: 'cpython-3.12' - optimizations: 'noopt' - run: true - - target_triple: 'x86_64_v2-unknown-linux-musl' - py: 'cpython-3.12' - optimizations: 'lto' - run: true - - - target_triple: 'x86_64_v2-unknown-linux-musl' - py: 'cpython-3.13' - optimizations: 'debug' - run: true - - target_triple: 'x86_64_v2-unknown-linux-musl' - py: 'cpython-3.13' - optimizations: 'noopt' - run: true - - target_triple: 'x86_64_v2-unknown-linux-musl' - py: 'cpython-3.13' - optimizations: 'lto' - run: true - - - target_triple: 'x86_64_v3-unknown-linux-musl' - py: 'cpython-3.9' - optimizations: 'debug' - run: true - - target_triple: 'x86_64_v3-unknown-linux-musl' - py: 'cpython-3.9' - optimizations: 'noopt' - run: true - - target_triple: 'x86_64_v3-unknown-linux-musl' - py: 'cpython-3.9' - optimizations: 'lto' - run: true - - - target_triple: 'x86_64_v3-unknown-linux-musl' - py: 'cpython-3.10' - optimizations: 'debug' - run: true - - target_triple: 'x86_64_v3-unknown-linux-musl' - py: 'cpython-3.10' - optimizations: 'noopt' - run: true - - target_triple: 'x86_64_v3-unknown-linux-musl' - py: 'cpython-3.10' - optimizations: 'lto' - run: true - - - target_triple: 'x86_64_v3-unknown-linux-musl' - py: 'cpython-3.11' - optimizations: 'debug' - run: true - - target_triple: 'x86_64_v3-unknown-linux-musl' - py: 'cpython-3.11' - optimizations: 'noopt' - run: true - - target_triple: 'x86_64_v3-unknown-linux-musl' - py: 'cpython-3.11' - optimizations: 'lto' - run: true - - - target_triple: 'x86_64_v3-unknown-linux-musl' - py: 'cpython-3.12' - optimizations: 'debug' - run: true - - target_triple: 'x86_64_v3-unknown-linux-musl' - py: 'cpython-3.12' - optimizations: 'noopt' - run: true - - target_triple: 'x86_64_v3-unknown-linux-musl' - py: 'cpython-3.12' - optimizations: 'lto' - run: true - - - target_triple: 'x86_64_v3-unknown-linux-musl' - py: 'cpython-3.13' - optimizations: 'debug' - run: true - - target_triple: 'x86_64_v3-unknown-linux-musl' - py: 'cpython-3.13' - optimizations: 'noopt' - run: true - - target_triple: 'x86_64_v3-unknown-linux-musl' - py: 'cpython-3.13' - optimizations: 'lto' - run: true - - - target_triple: 'x86_64_v4-unknown-linux-musl' - py: 'cpython-3.9' - optimizations: 'debug' - - target_triple: 'x86_64_v4-unknown-linux-musl' - py: 'cpython-3.9' - optimizations: 'noopt' - - target_triple: 'x86_64_v4-unknown-linux-musl' - py: 'cpython-3.9' - optimizations: 'lto' - - - target_triple: 'x86_64_v4-unknown-linux-musl' - py: 'cpython-3.10' - optimizations: 'debug' - - target_triple: 'x86_64_v4-unknown-linux-musl' - py: 'cpython-3.10' - optimizations: 'noopt' - - target_triple: 'x86_64_v4-unknown-linux-musl' - py: 'cpython-3.10' - optimizations: 'lto' - - - target_triple: 'x86_64_v4-unknown-linux-musl' - py: 'cpython-3.11' - optimizations: 'debug' - - target_triple: 'x86_64_v4-unknown-linux-musl' - py: 'cpython-3.11' - optimizations: 'noopt' - - target_triple: 'x86_64_v4-unknown-linux-musl' - py: 'cpython-3.11' - optimizations: 'lto' + # - target_triple: 'x86_64_v2-unknown-linux-gnu' + # py: 'cpython-3.9' + # optimizations: 'debug' + # run: true + # - target_triple: 'x86_64_v2-unknown-linux-gnu' + # py: 'cpython-3.9' + # optimizations: 'pgo' + # run: true + # - target_triple: 'x86_64_v2-unknown-linux-gnu' + # py: 'cpython-3.9' + # optimizations: 'pgo+lto' + # run: true + + # - target_triple: 'x86_64_v2-unknown-linux-gnu' + # py: 'cpython-3.10' + # optimizations: 'debug' + # run: true + # - target_triple: 'x86_64_v2-unknown-linux-gnu' + # py: 'cpython-3.10' + # optimizations: 'pgo' + # run: true + # - target_triple: 'x86_64_v2-unknown-linux-gnu' + # py: 'cpython-3.10' + # optimizations: 'pgo+lto' + # run: true + + # - target_triple: 'x86_64_v2-unknown-linux-gnu' + # py: 'cpython-3.11' + # optimizations: 'debug' + # run: true + # - target_triple: 'x86_64_v2-unknown-linux-gnu' + # py: 'cpython-3.11' + # optimizations: 'pgo' + # run: true + # - target_triple: 'x86_64_v2-unknown-linux-gnu' + # py: 'cpython-3.11' + # optimizations: 'pgo+lto' + # run: true + + # - target_triple: 'x86_64_v2-unknown-linux-gnu' + # py: 'cpython-3.12' + # optimizations: 'debug' + # run: true + # - target_triple: 'x86_64_v2-unknown-linux-gnu' + # py: 'cpython-3.12' + # optimizations: 'pgo' + # run: true + # - target_triple: 'x86_64_v2-unknown-linux-gnu' + # py: 'cpython-3.12' + # optimizations: 'pgo+lto' + # run: true + + # - target_triple: 'x86_64_v2-unknown-linux-gnu' + # py: 'cpython-3.13' + # optimizations: 'debug' + # run: true + # - target_triple: 'x86_64_v2-unknown-linux-gnu' + # py: 'cpython-3.13' + # optimizations: 'pgo' + # run: true + # - target_triple: 'x86_64_v2-unknown-linux-gnu' + # py: 'cpython-3.13' + # optimizations: 'pgo+lto' + # run: true + + # - target_triple: 'x86_64_v3-unknown-linux-gnu' + # py: 'cpython-3.9' + # optimizations: 'debug' + # run: true + # - target_triple: 'x86_64_v3-unknown-linux-gnu' + # py: 'cpython-3.9' + # optimizations: 'pgo' + # run: true + # - target_triple: 'x86_64_v3-unknown-linux-gnu' + # py: 'cpython-3.9' + # optimizations: 'pgo+lto' + # run: true + + # - target_triple: 'x86_64_v3-unknown-linux-gnu' + # py: 'cpython-3.10' + # optimizations: 'debug' + # run: true + # - target_triple: 'x86_64_v3-unknown-linux-gnu' + # py: 'cpython-3.10' + # optimizations: 'pgo' + # run: true + # - target_triple: 'x86_64_v3-unknown-linux-gnu' + # py: 'cpython-3.10' + # optimizations: 'pgo+lto' + # run: true + + # - target_triple: 'x86_64_v3-unknown-linux-gnu' + # py: 'cpython-3.11' + # optimizations: 'debug' + # run: true + # - target_triple: 'x86_64_v3-unknown-linux-gnu' + # py: 'cpython-3.11' + # optimizations: 'pgo' + # run: true + # - target_triple: 'x86_64_v3-unknown-linux-gnu' + # py: 'cpython-3.11' + # optimizations: 'pgo+lto' + # run: true + + # - target_triple: 'x86_64_v3-unknown-linux-gnu' + # py: 'cpython-3.12' + # optimizations: 'debug' + # run: true + # - target_triple: 'x86_64_v3-unknown-linux-gnu' + # py: 'cpython-3.12' + # optimizations: 'pgo' + # run: true + # - target_triple: 'x86_64_v3-unknown-linux-gnu' + # py: 'cpython-3.12' + # optimizations: 'pgo+lto' + # run: true + + # - target_triple: 'x86_64_v3-unknown-linux-gnu' + # py: 'cpython-3.13' + # optimizations: 'debug' + # run: true + # - target_triple: 'x86_64_v3-unknown-linux-gnu' + # py: 'cpython-3.13' + # optimizations: 'pgo' + # run: true + # - target_triple: 'x86_64_v3-unknown-linux-gnu' + # py: 'cpython-3.13' + # optimizations: 'pgo+lto' + # run: true + + # # GitHub Actions runners don't support x86-64-v4 so we can't PGO. + # - target_triple: 'x86_64_v4-unknown-linux-gnu' + # py: 'cpython-3.9' + # optimizations: 'debug' + # - target_triple: 'x86_64_v4-unknown-linux-gnu' + # py: 'cpython-3.9' + # optimizations: 'noopt' + # - target_triple: 'x86_64_v4-unknown-linux-gnu' + # py: 'cpython-3.9' + # optimizations: 'lto' + + # # GitHub Actions runners don't support x86-64-v4 so we can't PGO. + # - target_triple: 'x86_64_v4-unknown-linux-gnu' + # py: 'cpython-3.10' + # optimizations: 'debug' + # - target_triple: 'x86_64_v4-unknown-linux-gnu' + # py: 'cpython-3.10' + # optimizations: 'noopt' + # - target_triple: 'x86_64_v4-unknown-linux-gnu' + # py: 'cpython-3.10' + # optimizations: 'lto' + + # - target_triple: 'x86_64_v4-unknown-linux-gnu' + # py: 'cpython-3.11' + # optimizations: 'debug' + # - target_triple: 'x86_64_v4-unknown-linux-gnu' + # py: 'cpython-3.11' + # optimizations: 'noopt' + # - target_triple: 'x86_64_v4-unknown-linux-gnu' + # py: 'cpython-3.11' + # optimizations: 'lto' + + # - target_triple: 'x86_64_v4-unknown-linux-gnu' + # py: 'cpython-3.12' + # optimizations: 'debug' + # - target_triple: 'x86_64_v4-unknown-linux-gnu' + # py: 'cpython-3.12' + # optimizations: 'noopt' + # - target_triple: 'x86_64_v4-unknown-linux-gnu' + # py: 'cpython-3.12' + # optimizations: 'lto' + + # - target_triple: 'x86_64_v4-unknown-linux-gnu' + # py: 'cpython-3.13' + # optimizations: 'debug' + # - target_triple: 'x86_64_v4-unknown-linux-gnu' + # py: 'cpython-3.13' + # optimizations: 'noopt' + # - target_triple: 'x86_64_v4-unknown-linux-gnu' + # py: 'cpython-3.13' + # optimizations: 'lto' + + # # musl doesn't support PGO. + # - target_triple: 'x86_64-unknown-linux-musl' + # py: 'cpython-3.8' + # optimizations: 'debug' + # run: true + # - target_triple: 'x86_64-unknown-linux-musl' + # py: 'cpython-3.8' + # optimizations: 'noopt' + # run: true + # - target_triple: 'x86_64-unknown-linux-musl' + # py: 'cpython-3.8' + # optimizations: 'lto' + # run: true + + # - target_triple: 'x86_64-unknown-linux-musl' + # py: 'cpython-3.9' + # optimizations: 'debug' + # run: true + # - target_triple: 'x86_64-unknown-linux-musl' + # py: 'cpython-3.9' + # optimizations: 'noopt' + # run: true + # - target_triple: 'x86_64-unknown-linux-musl' + # py: 'cpython-3.9' + # optimizations: 'lto' + # run: true + + # - target_triple: 'x86_64-unknown-linux-musl' + # py: 'cpython-3.10' + # optimizations: 'debug' + # run: true + # - target_triple: 'x86_64-unknown-linux-musl' + # py: 'cpython-3.10' + # optimizations: 'noopt' + # run: true + # - target_triple: 'x86_64-unknown-linux-musl' + # py: 'cpython-3.10' + # optimizations: 'lto' + # run: true + + # - target_triple: 'x86_64-unknown-linux-musl' + # py: 'cpython-3.11' + # optimizations: 'debug' + # run: true + # - target_triple: 'x86_64-unknown-linux-musl' + # py: 'cpython-3.11' + # optimizations: 'noopt' + # run: true + # - target_triple: 'x86_64-unknown-linux-musl' + # py: 'cpython-3.11' + # optimizations: 'lto' + # run: true + + # - target_triple: 'x86_64-unknown-linux-musl' + # py: 'cpython-3.12' + # optimizations: 'debug' + # run: true + # - target_triple: 'x86_64-unknown-linux-musl' + # py: 'cpython-3.12' + # optimizations: 'noopt' + # run: true + # - target_triple: 'x86_64-unknown-linux-musl' + # py: 'cpython-3.12' + # optimizations: 'lto' + # run: true + + # - target_triple: 'x86_64-unknown-linux-musl' + # py: 'cpython-3.13' + # optimizations: 'debug' + # run: true + # - target_triple: 'x86_64-unknown-linux-musl' + # py: 'cpython-3.13' + # optimizations: 'noopt' + # run: true + # - target_triple: 'x86_64-unknown-linux-musl' + # py: 'cpython-3.13' + # optimizations: 'lto' + # run: true + + # - target_triple: 'x86_64_v2-unknown-linux-musl' + # py: 'cpython-3.9' + # optimizations: 'debug' + # run: true + # - target_triple: 'x86_64_v2-unknown-linux-musl' + # py: 'cpython-3.9' + # optimizations: 'noopt' + # run: true + # - target_triple: 'x86_64_v2-unknown-linux-musl' + # py: 'cpython-3.9' + # optimizations: 'lto' + # run: true + + # - target_triple: 'x86_64_v2-unknown-linux-musl' + # py: 'cpython-3.10' + # optimizations: 'debug' + # run: true + # - target_triple: 'x86_64_v2-unknown-linux-musl' + # py: 'cpython-3.10' + # optimizations: 'noopt' + # run: true + # - target_triple: 'x86_64_v2-unknown-linux-musl' + # py: 'cpython-3.10' + # optimizations: 'lto' + # run: true + + # - target_triple: 'x86_64_v2-unknown-linux-musl' + # py: 'cpython-3.11' + # optimizations: 'debug' + # run: true + # - target_triple: 'x86_64_v2-unknown-linux-musl' + # py: 'cpython-3.11' + # optimizations: 'noopt' + # run: true + # - target_triple: 'x86_64_v2-unknown-linux-musl' + # py: 'cpython-3.11' + # optimizations: 'lto' + # run: true + + # - target_triple: 'x86_64_v2-unknown-linux-musl' + # py: 'cpython-3.12' + # optimizations: 'debug' + # run: true + # - target_triple: 'x86_64_v2-unknown-linux-musl' + # py: 'cpython-3.12' + # optimizations: 'noopt' + # run: true + # - target_triple: 'x86_64_v2-unknown-linux-musl' + # py: 'cpython-3.12' + # optimizations: 'lto' + # run: true + + # - target_triple: 'x86_64_v2-unknown-linux-musl' + # py: 'cpython-3.13' + # optimizations: 'debug' + # run: true + # - target_triple: 'x86_64_v2-unknown-linux-musl' + # py: 'cpython-3.13' + # optimizations: 'noopt' + # run: true + # - target_triple: 'x86_64_v2-unknown-linux-musl' + # py: 'cpython-3.13' + # optimizations: 'lto' + # run: true + + # - target_triple: 'x86_64_v3-unknown-linux-musl' + # py: 'cpython-3.9' + # optimizations: 'debug' + # run: true + # - target_triple: 'x86_64_v3-unknown-linux-musl' + # py: 'cpython-3.9' + # optimizations: 'noopt' + # run: true + # - target_triple: 'x86_64_v3-unknown-linux-musl' + # py: 'cpython-3.9' + # optimizations: 'lto' + # run: true + + # - target_triple: 'x86_64_v3-unknown-linux-musl' + # py: 'cpython-3.10' + # optimizations: 'debug' + # run: true + # - target_triple: 'x86_64_v3-unknown-linux-musl' + # py: 'cpython-3.10' + # optimizations: 'noopt' + # run: true + # - target_triple: 'x86_64_v3-unknown-linux-musl' + # py: 'cpython-3.10' + # optimizations: 'lto' + # run: true + + # - target_triple: 'x86_64_v3-unknown-linux-musl' + # py: 'cpython-3.11' + # optimizations: 'debug' + # run: true + # - target_triple: 'x86_64_v3-unknown-linux-musl' + # py: 'cpython-3.11' + # optimizations: 'noopt' + # run: true + # - target_triple: 'x86_64_v3-unknown-linux-musl' + # py: 'cpython-3.11' + # optimizations: 'lto' + # run: true + + # - target_triple: 'x86_64_v3-unknown-linux-musl' + # py: 'cpython-3.12' + # optimizations: 'debug' + # run: true + # - target_triple: 'x86_64_v3-unknown-linux-musl' + # py: 'cpython-3.12' + # optimizations: 'noopt' + # run: true + # - target_triple: 'x86_64_v3-unknown-linux-musl' + # py: 'cpython-3.12' + # optimizations: 'lto' + # run: true + + # - target_triple: 'x86_64_v3-unknown-linux-musl' + # py: 'cpython-3.13' + # optimizations: 'debug' + # run: true + # - target_triple: 'x86_64_v3-unknown-linux-musl' + # py: 'cpython-3.13' + # optimizations: 'noopt' + # run: true + # - target_triple: 'x86_64_v3-unknown-linux-musl' + # py: 'cpython-3.13' + # optimizations: 'lto' + # run: true + + # - target_triple: 'x86_64_v4-unknown-linux-musl' + # py: 'cpython-3.9' + # optimizations: 'debug' + # - target_triple: 'x86_64_v4-unknown-linux-musl' + # py: 'cpython-3.9' + # optimizations: 'noopt' + # - target_triple: 'x86_64_v4-unknown-linux-musl' + # py: 'cpython-3.9' + # optimizations: 'lto' + + # - target_triple: 'x86_64_v4-unknown-linux-musl' + # py: 'cpython-3.10' + # optimizations: 'debug' + # - target_triple: 'x86_64_v4-unknown-linux-musl' + # py: 'cpython-3.10' + # optimizations: 'noopt' + # - target_triple: 'x86_64_v4-unknown-linux-musl' + # py: 'cpython-3.10' + # optimizations: 'lto' + + # - target_triple: 'x86_64_v4-unknown-linux-musl' + # py: 'cpython-3.11' + # optimizations: 'debug' + # - target_triple: 'x86_64_v4-unknown-linux-musl' + # py: 'cpython-3.11' + # optimizations: 'noopt' + # - target_triple: 'x86_64_v4-unknown-linux-musl' + # py: 'cpython-3.11' + # optimizations: 'lto' - target_triple: 'x86_64_v4-unknown-linux-musl' py: 'cpython-3.12' diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index 413cdd3f..bdbdfe86 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -49,10 +49,10 @@ jobs: fail-fast: false matrix: py: - - 'cpython-3.8' - - 'cpython-3.9' - - 'cpython-3.10' - - 'cpython-3.11' + # - 'cpython-3.8' + # - 'cpython-3.9' + # - 'cpython-3.10' + # - 'cpython-3.11' - 'cpython-3.12' - 'cpython-3.13' vcvars: From 7c3c95d4d96c18266ac17294e66218854908ea4e Mon Sep 17 00:00:00 2001 From: Zanie Blue Date: Thu, 5 Sep 2024 08:46:19 -0500 Subject: [PATCH 12/33] Apply multiarch patch more broadly --- cpython-unix/build-cpython-host.sh | 5 +++++ cpython-unix/build-cpython.sh | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/cpython-unix/build-cpython-host.sh b/cpython-unix/build-cpython-host.sh index 459558bb..be44b6a8 100755 --- a/cpython-unix/build-cpython-host.sh +++ b/cpython-unix/build-cpython-host.sh @@ -45,6 +45,11 @@ if [ "${CC}" = "clang" ]; then else patch -p1 -i ${ROOT}/patch-disable-multiarch-legacy.patch fi +elif [ "${CC}" = "musl-clang" ]; then + # This appears to also be a problem for musl builds on 3.13. + if [ -n "${PYTHON_MEETS_MINIMUM_VERSION_3_13}" ]; then + patch -p1 -i ${ROOT}/patch-disable-multiarch-13.patch + fi fi autoconf diff --git a/cpython-unix/build-cpython.sh b/cpython-unix/build-cpython.sh index c01475e7..badf18e8 100755 --- a/cpython-unix/build-cpython.sh +++ b/cpython-unix/build-cpython.sh @@ -117,6 +117,11 @@ if [ "${CC}" = "clang" ]; then else patch -p1 -i ${ROOT}/patch-disable-multiarch-legacy.patch fi +elif [ "${CC}" = "musl-clang" ]; then + # This appears to also be a problem for musl builds on 3.13. + if [ -n "${PYTHON_MEETS_MINIMUM_VERSION_3_13}" ]; then + patch -p1 -i ${ROOT}/patch-disable-multiarch-13.patch + fi fi # Python 3.11 supports using a provided Python to use during bootstrapping From 931009e30839afae10371ab3eb84328f496bb1a0 Mon Sep 17 00:00:00 2001 From: Zanie Blue Date: Thu, 5 Sep 2024 10:04:25 -0500 Subject: [PATCH 13/33] Attempt to set multiarch to a constant instead of disabling --- cpython-unix/build-cpython.sh | 2 +- cpython-unix/build.py | 1 + cpython-unix/patch-musl-multiarch-13.patch | 17 +++++++++++++++++ 3 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 cpython-unix/patch-musl-multiarch-13.patch diff --git a/cpython-unix/build-cpython.sh b/cpython-unix/build-cpython.sh index badf18e8..3c14dec0 100755 --- a/cpython-unix/build-cpython.sh +++ b/cpython-unix/build-cpython.sh @@ -120,7 +120,7 @@ if [ "${CC}" = "clang" ]; then elif [ "${CC}" = "musl-clang" ]; then # This appears to also be a problem for musl builds on 3.13. if [ -n "${PYTHON_MEETS_MINIMUM_VERSION_3_13}" ]; then - patch -p1 -i ${ROOT}/patch-disable-multiarch-13.patch + patch -p1 -i ${ROOT}/patch-musl-multiarch-13.patch fi fi diff --git a/cpython-unix/build.py b/cpython-unix/build.py index e3570054..affca25c 100755 --- a/cpython-unix/build.py +++ b/cpython-unix/build.py @@ -436,6 +436,7 @@ def build_cpython_host( "build-cpython-host.sh", "patch-disable-multiarch.patch", "patch-disable-multiarch-13.patch", + "patch-musl-multiarch-13.patch", "patch-disable-multiarch-legacy.patch", } for s in sorted(support): diff --git a/cpython-unix/patch-musl-multiarch-13.patch b/cpython-unix/patch-musl-multiarch-13.patch new file mode 100644 index 00000000..5816488b --- /dev/null +++ b/cpython-unix/patch-musl-multiarch-13.patch @@ -0,0 +1,17 @@ +diff -u 13-a/configure.ac 13-b/configure.ac +--- 13-a/configure.ac 2024-05-08 05:21:00.000000000 -0400 ++++ 13-b/configure.ac 2024-05-19 07:42:23.294762624 -0400 +@@ -1090,12 +1090,7 @@ + dnl architecture. PLATFORM_TRIPLET will be a pair or single value for these + dnl platforms. + AC_MSG_CHECKING([for multiarch]) +-AS_CASE([$ac_sys_system], +- [Darwin*], [MULTIARCH=""], +- [iOS], [MULTIARCH=""], +- [FreeBSD*], [MULTIARCH=""], +- [MULTIARCH=$($CC --print-multiarch 2>/dev/null)] +-) ++MULTIARCH=x86_64-linux-musl + AC_SUBST([MULTIARCH]) + + if test x$PLATFORM_TRIPLET != x && test x$MULTIARCH != x; then From 1d8da173c88b0cab47ea4d5b1efafb3ae3504baf Mon Sep 17 00:00:00 2001 From: Zanie Blue Date: Thu, 5 Sep 2024 10:33:20 -0500 Subject: [PATCH 14/33] Fix libpython symlink on `x86_64-unknown-linux-musl` --- cpython-unix/build-cpython.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cpython-unix/build-cpython.sh b/cpython-unix/build-cpython.sh index 3c14dec0..dc42f92e 100755 --- a/cpython-unix/build-cpython.sh +++ b/cpython-unix/build-cpython.sh @@ -757,6 +757,9 @@ ppc64le-unknown-linux-gnu) s390x-unknown-linux-gnu) PYTHON_ARCH="s390x-linux-gnu" ;; +x86_64-unknown-linux-musl) + PYTHON_ARCH="x86_64-linux-musl" + ;; x86_64-unknown-linux-*) PYTHON_ARCH="x86_64-linux-gnu" ;; From f126b0aab8c6f3c5566bc64fb68fa238268995ce Mon Sep 17 00:00:00 2001 From: Zanie Blue Date: Thu, 5 Sep 2024 10:51:23 -0500 Subject: [PATCH 15/33] TMP: Display target triple --- cpython-unix/build-cpython.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/cpython-unix/build-cpython.sh b/cpython-unix/build-cpython.sh index dc42f92e..372840ba 100755 --- a/cpython-unix/build-cpython.sh +++ b/cpython-unix/build-cpython.sh @@ -761,6 +761,7 @@ x86_64-unknown-linux-musl) PYTHON_ARCH="x86_64-linux-musl" ;; x86_64-unknown-linux-*) + echo "TARGET_TRIPLE=${TARGET_TRIPLE}" PYTHON_ARCH="x86_64-linux-gnu" ;; *) From 4a78a31b1675e10bde333071347c8c7c35aee9de Mon Sep 17 00:00:00 2001 From: Zanie Blue Date: Thu, 5 Sep 2024 11:21:35 -0500 Subject: [PATCH 16/33] Fix `PYTHON_ARCH` for `x86_64-unknown-linux` musl-clang cross compiles --- cpython-unix/build-cpython.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/cpython-unix/build-cpython.sh b/cpython-unix/build-cpython.sh index 372840ba..baaa9347 100755 --- a/cpython-unix/build-cpython.sh +++ b/cpython-unix/build-cpython.sh @@ -757,12 +757,12 @@ ppc64le-unknown-linux-gnu) s390x-unknown-linux-gnu) PYTHON_ARCH="s390x-linux-gnu" ;; -x86_64-unknown-linux-musl) - PYTHON_ARCH="x86_64-linux-musl" - ;; x86_64-unknown-linux-*) - echo "TARGET_TRIPLE=${TARGET_TRIPLE}" - PYTHON_ARCH="x86_64-linux-gnu" + if [ "${CC}" = "musl-clang" ]; then + PYTHON_ARCH="x86_64-linux-musl" + else + PYTHON_ARCH="x86_64-linux-gnu" + fi ;; *) echo "unhandled target triple: ${TARGET_TRIPLE}" From 2110d43257e2763844b5b8683b1f9dd6263875d4 Mon Sep 17 00:00:00 2001 From: Zanie Blue Date: Thu, 5 Sep 2024 11:21:56 -0500 Subject: [PATCH 17/33] Build `mpdecimal` on Windows and fix Python 3.13 validation (#7) * Attempt to download and build `mpdecimal` on Windows * Patch `mpdecimal` in `python.props` * Remove `_msi` from expected global extensions * Allow `_msi` to be missing during `collect_python_build_artifacts` * Add `_testclinic_limited` and `_testlimitedcapi` to ignored extensions * Add `python313.dll` to allowed libraries * Fix expected global extensions for 3.13 * Allow `_PyWarnings_Init` to be missing on 3.13 * Include 3.8 in `_PyWarnings_Init` case * Include `_xxsubinterpreters` in 3.8 extensions --- cpython-windows/build.py | 31 +++++++++++++++++++++++-------- src/validation.rs | 24 +++++++++++++++++------- 2 files changed, 40 insertions(+), 15 deletions(-) diff --git a/cpython-windows/build.py b/cpython-windows/build.py index 9195e071..74fc2422 100644 --- a/cpython-windows/build.py +++ b/cpython-windows/build.py @@ -65,7 +65,10 @@ "_lzma": { "ignore_additional_depends": {"$(OutDir)liblzma$(PyDebugExt).lib"}, }, - "_msi": {}, + "_msi": { + # Removed in 3.13. + "ignore_missing": True, + }, "_overlapped": {}, "_multiprocessing": {}, "_socket": {}, @@ -352,6 +355,7 @@ def hack_props( xz_version = DOWNLOADS["xz"]["version"] zlib_version = DOWNLOADS["zlib"]["version"] tcltk_commit = DOWNLOADS["tk-windows-bin"]["git_commit"] + mpdecimal_version = DOWNLOADS["mpdecimal"]["version"] sqlite_path = td / ("sqlite-autoconf-%s" % sqlite_version) bzip2_path = td / ("bzip2-%s" % bzip2_version) @@ -359,6 +363,7 @@ def hack_props( tcltk_path = td / ("cpython-bin-deps-%s" % tcltk_commit) xz_path = td / ("xz-%s" % xz_version) zlib_path = td / ("zlib-%s" % zlib_version) + mpdecimal_path = td / ("mpdecimal-%s" % mpdecimal_version) openssl_root = td / "openssl" / arch openssl_libs_path = openssl_root / "lib" @@ -398,6 +403,9 @@ def hack_props( elif b"%s\\" % zlib_path + elif b"%s\\" % mpdecimal_path + lines.append(line) with python_props_path.open("wb") as fh: @@ -1155,15 +1163,17 @@ def collect_python_build_artifacts( "_ctypes_test", "_testbuffer", "_testcapi", + "_testclinic_limited", "_testclinic", "_testconsole", "_testembed", "_testimportmultiple", "_testinternalcapi", - "_testsinglephase", + "_testlimitedcapi", "_testmultiphase", - "xxlimited", + "_testsinglephase", "xxlimited_35", + "xxlimited", } other_projects = {"pythoncore"} @@ -1409,6 +1419,12 @@ def build_cpython( setuptools_wheel = download_entry("setuptools", BUILD) pip_wheel = download_entry("pip", BUILD) + # CPython 3.13+ no longer uses a bundled version by default + if meets_python_minimum_version(python_version, "3.13"): + mpdecimal_archive = download_entry("mpdecimal", BUILD) + else: + mpdecimal_archive = None + if arch == "amd64": build_platform = "x64" build_directory = "amd64" @@ -1426,12 +1442,16 @@ def build_cpython( for a in ( python_archive, bzip2_archive, + mpdecimal_archive, openssl_archive, sqlite_archive, tk_bin_archive, xz_archive, zlib_archive, ): + if a is None: + continue + log("extracting %s to %s" % (a, td)) fs.append(e.submit(extract_tar_to_directory, a, td)) @@ -1599,11 +1619,6 @@ def build_cpython( if not meets_python_minimum_version(python_version, "3.12"): args.append("--include-distutils") - # CPython 3.13+ no longer uses a bundled libmpdec by default - # TODO(zanieb): We should use the system libmpdec as we do for Unix builds - if meets_python_minimum_version(python_version, "3.13"): - args.append("--with-system-libmpdec=no") - args.extend(["--include-idle", "--include-stable", "--include-tcltk"]) exec_and_log( diff --git a/src/validation.rs b/src/validation.rs index af94f7c6..434c1a32 100644 --- a/src/validation.rs +++ b/src/validation.rs @@ -125,6 +125,7 @@ const PE_ALLOWED_LIBRARIES: &[&str] = &[ "python310.dll", "python311.dll", "python312.dll", + "python313.dll", "sqlite3.dll", "tcl86t.dll", "tk86t.dll", @@ -679,7 +680,13 @@ const GLOBAL_EXTENSIONS: &[&str] = &[ // We didn't build ctypes_test until 3.9. // We didn't build some test extensions until 3.9. -const GLOBAL_EXTENSIONS_PYTHON_3_8: &[&str] = &["audioop", "_sha256", "_sha512", "parser"]; +const GLOBAL_EXTENSIONS_PYTHON_3_8: &[&str] = &[ + "audioop", + "_sha256", + "_sha512", + "parser", + "_xxsubinterpreters", +]; const GLOBAL_EXTENSIONS_PYTHON_3_9: &[&str] = &[ "audioop", @@ -727,9 +734,7 @@ const GLOBAL_EXTENSIONS_PYTHON_3_13: &[&str] = &[ "_interpqueues", "_interpreters", "_sha2", - "_suggestions", "_sysconfig", - "_testexternalinspection", "_tokenize", "_typing", "_zoneinfo", @@ -759,16 +764,16 @@ const GLOBAL_EXTENSIONS_POSIX: &[&str] = &[ const GLOBAL_EXTENSIONS_LINUX_PRE_3_13: &[&str] = &["spwd"]; const GLOBAL_EXTENSIONS_WINDOWS: &[&str] = &[ - "_msi", "_overlapped", "_winapi", - "_xxsubinterpreters", "msvcrt", "nt", "winreg", "winsound", ]; +const GLOBAL_EXTENSIONS_WINDOWS_PRE_3_13: &[&str] = &["_msi"]; + /// Extension modules not present in Windows static builds. const GLOBAL_EXTENSIONS_WINDOWS_NO_STATIC: &[&str] = &["_testinternalcapi", "_tkinter"]; @@ -1494,6 +1499,10 @@ fn validate_extension_modules( if is_windows { wanted.extend(GLOBAL_EXTENSIONS_WINDOWS); + if matches!(python_major_minor, "3.8" | "3.9" | "3.10" | "3.11" | "3.12") { + wanted.extend(GLOBAL_EXTENSIONS_WINDOWS_PRE_3_13); + } + if static_crt { for x in GLOBAL_EXTENSIONS_WINDOWS_NO_STATIC { wanted.remove(*x); @@ -1949,9 +1958,10 @@ fn validate_distribution( // Static distributions never export symbols. let wanted = if is_static { false - // For some strange reason _PyWarnings_Init is exported as part of the ABI. + // For some strange reason _PyWarnings_Init is exported as part of the ABI before + // Python 3.13. } else if name == "_warnings" { - true + matches!(python_major_minor, "3.8" | "3.9" | "3.10" | "3.11" | "3.12") // Windows dynamic doesn't export extension module init functions. } else if triple.contains("-windows-") { false From 32da092779c2ba054040875a5dc290b9259f7bc2 Mon Sep 17 00:00:00 2001 From: Zanie Blue Date: Thu, 5 Sep 2024 11:44:05 -0500 Subject: [PATCH 18/33] Allow `_suggestsions` and `_testexternalinspection` during Python 3.13 validation --- src/validation.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/validation.rs b/src/validation.rs index 434c1a32..e752be1a 100644 --- a/src/validation.rs +++ b/src/validation.rs @@ -1539,6 +1539,10 @@ fn validate_extension_modules( ]); } + if (is_linux) && python_major_minor == "3.13" { + wanted.extend(["_suggestions", "_testexternalinspection"]); + } + if (is_linux || is_macos) && matches!(python_major_minor, "3.12" | "3.13") { wanted.insert("_testsinglephase"); } From 3a69e627e060a0cab87318f7bdc2628b13fd0b80 Mon Sep 17 00:00:00 2001 From: Zanie Blue Date: Thu, 5 Sep 2024 11:48:17 -0500 Subject: [PATCH 19/33] Fix handling of `_PyWarnings_Init` on non-Windows --- src/validation.rs | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/validation.rs b/src/validation.rs index e752be1a..433d27df 100644 --- a/src/validation.rs +++ b/src/validation.rs @@ -1962,10 +1962,14 @@ fn validate_distribution( // Static distributions never export symbols. let wanted = if is_static { false - // For some strange reason _PyWarnings_Init is exported as part of the ABI before - // Python 3.13. + // For some strange reason _PyWarnings_Init is exported as part of the ABI } else if name == "_warnings" { - matches!(python_major_minor, "3.8" | "3.9" | "3.10" | "3.11" | "3.12") + // But not on Python 3.13 on Windows + if triple.contains("-windows-") { + matches!(python_major_minor, "3.8" | "3.9" | "3.10" | "3.11" | "3.12") + } else { + true + } // Windows dynamic doesn't export extension module init functions. } else if triple.contains("-windows-") { false From 4a3d3680d0c0b21b31b786814ee527162ce5983f Mon Sep 17 00:00:00 2001 From: Zanie Blue Date: Thu, 5 Sep 2024 12:23:59 -0500 Subject: [PATCH 20/33] Only apply `PYTHON_ARCH` change on 3.13 --- cpython-unix/build-cpython.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cpython-unix/build-cpython.sh b/cpython-unix/build-cpython.sh index baaa9347..8cb47aee 100755 --- a/cpython-unix/build-cpython.sh +++ b/cpython-unix/build-cpython.sh @@ -758,7 +758,7 @@ s390x-unknown-linux-gnu) PYTHON_ARCH="s390x-linux-gnu" ;; x86_64-unknown-linux-*) - if [ "${CC}" = "musl-clang" ]; then + if [ "${CC}" = "musl-clang" ] && [ "${PYTHON_MAJMIN_VERSION}" = "3.13" ]; then PYTHON_ARCH="x86_64-linux-musl" else PYTHON_ARCH="x86_64-linux-gnu" From e919753cc4e0dc7e0f578896f541f63bbf00d1cd Mon Sep 17 00:00:00 2001 From: Zanie Blue Date: Thu, 5 Sep 2024 12:32:37 -0500 Subject: [PATCH 21/33] Allow `_suggestsions` and `_testexternalinspection` during Python 3.13 validation on macOS --- src/validation.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/validation.rs b/src/validation.rs index 433d27df..f77c44cd 100644 --- a/src/validation.rs +++ b/src/validation.rs @@ -1539,7 +1539,7 @@ fn validate_extension_modules( ]); } - if (is_linux) && python_major_minor == "3.13" { + if (is_linux || is_macos) && python_major_minor == "3.13" { wanted.extend(["_suggestions", "_testexternalinspection"]); } From f442d4db98c3c41aa0f3c07ca844d2fa8d4563c2 Mon Sep 17 00:00:00 2001 From: Zanie Blue Date: Thu, 5 Sep 2024 12:34:59 -0500 Subject: [PATCH 22/33] Bump expected macOS version tag --- src/validation.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/validation.rs b/src/validation.rs index f77c44cd..d30200f2 100644 --- a/src/validation.rs +++ b/src/validation.rs @@ -461,7 +461,7 @@ static PLATFORM_TAG_BY_TRIPLE: Lazy> = Lazy: ("mips64el-unknown-linux-gnuabi64", "todo"), ("ppc64le-unknown-linux-gnu", "linux-powerpc64le"), ("s390x-unknown-linux-gnu", "linux-s390x"), - ("x86_64-apple-darwin", "macosx-10.9-x86_64"), + ("x86_64-apple-darwin", "macosx-10.13-x86_64"), ("x86_64-apple-ios", "iOS-x86_64"), ("x86_64-pc-windows-msvc", "win-amd64"), ("x86_64-unknown-linux-gnu", "linux-x86_64"), From 4c7b4a5540c93ba184fd0f8f2392ff568c549c3f Mon Sep 17 00:00:00 2001 From: Zanie Blue Date: Thu, 5 Sep 2024 12:35:17 -0500 Subject: [PATCH 23/33] Bump target minimum macOS version from 10.13.0 to 10.13.4 --- cpython-unix/targets.yml | 4 ++-- src/validation.rs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cpython-unix/targets.yml b/cpython-unix/targets.yml index 140fed67..d27d23d0 100644 --- a/cpython-unix/targets.yml +++ b/cpython-unix/targets.yml @@ -566,7 +566,7 @@ x86_64-apple-darwin: target_cflags: - '-arch' - 'x86_64' - - '-mmacosx-version-min=10.13' + - '-mmacosx-version-min=10.13.4' # Suppress extremely verbose warnings we see with LLVM 10. - '-Wno-nullability-completeness' - '-Wno-expansion-to-defined' @@ -581,7 +581,7 @@ x86_64-apple-darwin: target_ldflags: - '-arch' - 'x86_64' - - '-mmacosx-version-min=10.13' + - '-mmacosx-version-min=10.13.4' needs: - autoconf - bzip2 diff --git a/src/validation.rs b/src/validation.rs index d30200f2..420e27a4 100644 --- a/src/validation.rs +++ b/src/validation.rs @@ -1100,7 +1100,7 @@ fn validate_macho>( bytes: &[u8], ) -> Result<()> { let advertised_target_version = - semver::Version::parse(&format!("{}.0", advertised_target_version))?; + semver::Version::parse(&format!("{}", advertised_target_version))?; let advertised_sdk_version = semver::Version::parse(&format!("{}.0", advertised_sdk_version))?; let endian = header.endian()?; From 520e9d33ce12462758d8d4d8deb38706e91307b9 Mon Sep 17 00:00:00 2001 From: Zanie Blue Date: Thu, 5 Sep 2024 16:58:42 -0500 Subject: [PATCH 24/33] Disable BOLT on 3.13+ --- cpython-unix/build-cpython.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cpython-unix/build-cpython.sh b/cpython-unix/build-cpython.sh index 8cb47aee..1c547264 100755 --- a/cpython-unix/build-cpython.sh +++ b/cpython-unix/build-cpython.sh @@ -352,7 +352,9 @@ fi if [ -n "${CPYTHON_OPTIMIZED}" ]; then CONFIGURE_FLAGS="${CONFIGURE_FLAGS} --enable-optimizations" - if [[ -n "${PYTHON_MEETS_MINIMUM_VERSION_3_12}" && -n "${BOLT_CAPABLE}" ]]; then + if [[ -n "${PYTHON_MEETS_MINIMUM_VERSION_3_13}" && -n "${BOLT_CAPABLE}" ]]; then + echo "BOLT is disabled on Python 3.13+ due to a SEGFAULT when running `test_embed`." + elif [[ -n "${PYTHON_MEETS_MINIMUM_VERSION_3_12}" && -n "${BOLT_CAPABLE}" ]]; then CONFIGURE_FLAGS="${CONFIGURE_FLAGS} --enable-bolt" fi fi From 367e0f61377a9b1e1734be2e4a87daa57dd8b822 Mon Sep 17 00:00:00 2001 From: Zanie Blue Date: Thu, 5 Sep 2024 22:03:15 -0500 Subject: [PATCH 25/33] Fix Python 3.13 builds on macOS (#8) --- cpython-unix/build-cpython.sh | 12 ++++++++++++ cpython-unix/patch-make-testembed-nolink-tcltk.patch | 10 ++++++++++ cpython-unix/targets.yml | 6 +++--- src/validation.rs | 4 ++-- 4 files changed, 27 insertions(+), 5 deletions(-) create mode 100644 cpython-unix/patch-make-testembed-nolink-tcltk.patch diff --git a/cpython-unix/build-cpython.sh b/cpython-unix/build-cpython.sh index 1c547264..614f6b4c 100755 --- a/cpython-unix/build-cpython.sh +++ b/cpython-unix/build-cpython.sh @@ -146,6 +146,12 @@ if [ -n "${PYTHON_MEETS_MAXIMUM_VERSION_3_10}" ]; then patch -p1 -i ${ROOT}/patch-makesetup-deduplicate-objs.patch fi +# testembed links against Tcl/Tk and libpython which already has Tcl/Tk leading +# duplicate symbols and warnings from objc (which causes test failures). +if [ -n "${PYTHON_MEETS_MAXIMUM_VERSION_3_13}" ]; then + patch -p1 -i ${ROOT}/patch-make-testembed-nolink-tcltk.patch +fi + # The default build rule for the macOS dylib doesn't pick up libraries # from modules / makesetup. So patch it accordingly. if [ -n "${PYTHON_MEETS_MINIMUM_VERSION_3_13}" ]; then @@ -444,6 +450,12 @@ if [ "${PYBUILD_PLATFORM}" = "macos" ]; then export MACOSX_DEPLOYMENT_TARGET="${APPLE_MIN_DEPLOYMENT_TARGET}" fi +# ptsrname_r is only available in SDK 13.4+ +if [ "${PYBUILD_PLATFORM}" = "macos" ]; then + echo "Disabling ptsname_r due to macOS SDK 13.4+ requirement." + CONFIGURE_FLAGS="${CONFIGURE_FLAGS} ac_cv_func_ptsname_r=no" +fi + # We use ndbm on macOS and BerkeleyDB elsewhere. if [ "${PYBUILD_PLATFORM}" = "macos" ]; then CONFIGURE_FLAGS="${CONFIGURE_FLAGS} --with-dbmliborder=ndbm" diff --git a/cpython-unix/patch-make-testembed-nolink-tcltk.patch b/cpython-unix/patch-make-testembed-nolink-tcltk.patch new file mode 100644 index 00000000..65c1989f --- /dev/null +++ b/cpython-unix/patch-make-testembed-nolink-tcltk.patch @@ -0,0 +1,10 @@ +diff --git a/Makefile.pre.in b/Makefile.pre.in +--- a/Makefile.pre.in ++++ b/Makefile.pre.in +@@ -1432,6 +1432,8 @@ + $(RUNSHARED) ./$(BUILDPYTHON) $(srcdir)/Tools/build/generate_re_casefix.py $(srcdir)/Lib/re/_casefix.py + + Programs/_testembed: Programs/_testembed.o $(LINK_PYTHON_DEPS) ++ $(eval MODLIBS := $(subst -Xlinker -hidden-ltcl8.6, , $(MODLIBS))) ++ $(eval MODLIBS := $(subst -Xlinker -hidden-ltk8.6, , $(MODLIBS))) + $(LINKCC) $(PY_CORE_LDFLAGS) $(LINKFORSHARED) -o $@ Programs/_testembed.o $(LINK_PYTHON_OBJS) $(LIBS) $(MODLIBS) $(SYSLIBS) diff --git a/cpython-unix/targets.yml b/cpython-unix/targets.yml index d27d23d0..02e41311 100644 --- a/cpython-unix/targets.yml +++ b/cpython-unix/targets.yml @@ -546,7 +546,7 @@ thumb7k-apple-watchos: # Intel macOS. # -# We target compatibility with macOS 10.13+ for compatibility with older Apple +# We target compatibility with macOS 10.9+ for compatibility with older Apple # machines. x86_64-apple-darwin: host_platforms: @@ -566,7 +566,7 @@ x86_64-apple-darwin: target_cflags: - '-arch' - 'x86_64' - - '-mmacosx-version-min=10.13.4' + - '-mmacosx-version-min=10.9' # Suppress extremely verbose warnings we see with LLVM 10. - '-Wno-nullability-completeness' - '-Wno-expansion-to-defined' @@ -581,7 +581,7 @@ x86_64-apple-darwin: target_ldflags: - '-arch' - 'x86_64' - - '-mmacosx-version-min=10.13.4' + - '-mmacosx-version-min=10.9' needs: - autoconf - bzip2 diff --git a/src/validation.rs b/src/validation.rs index 420e27a4..f77c44cd 100644 --- a/src/validation.rs +++ b/src/validation.rs @@ -461,7 +461,7 @@ static PLATFORM_TAG_BY_TRIPLE: Lazy> = Lazy: ("mips64el-unknown-linux-gnuabi64", "todo"), ("ppc64le-unknown-linux-gnu", "linux-powerpc64le"), ("s390x-unknown-linux-gnu", "linux-s390x"), - ("x86_64-apple-darwin", "macosx-10.13-x86_64"), + ("x86_64-apple-darwin", "macosx-10.9-x86_64"), ("x86_64-apple-ios", "iOS-x86_64"), ("x86_64-pc-windows-msvc", "win-amd64"), ("x86_64-unknown-linux-gnu", "linux-x86_64"), @@ -1100,7 +1100,7 @@ fn validate_macho>( bytes: &[u8], ) -> Result<()> { let advertised_target_version = - semver::Version::parse(&format!("{}", advertised_target_version))?; + semver::Version::parse(&format!("{}.0", advertised_target_version))?; let advertised_sdk_version = semver::Version::parse(&format!("{}.0", advertised_sdk_version))?; let endian = header.endian()?; From 0eadea0b47d87ee0308145f04fa2902cb1afc20c Mon Sep 17 00:00:00 2001 From: Zanie Blue Date: Fri, 6 Sep 2024 07:15:29 -0500 Subject: [PATCH 26/33] Update fixme --- cpython-unix/build-cpython.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cpython-unix/build-cpython.sh b/cpython-unix/build-cpython.sh index 614f6b4c..233f6d07 100755 --- a/cpython-unix/build-cpython.sh +++ b/cpython-unix/build-cpython.sh @@ -73,7 +73,7 @@ pushd Python-${PYTHON_VERSION} # configure doesn't support cross-compiling on Apple. Teach it. if [ "${PYTHON_MAJMIN_VERSION}" = "3.13" ]; then - # FIXME: new patch may be required + # TODO: Add support for cross-compiling on 3.13 : elif [ "${PYTHON_MAJMIN_VERSION}" = "3.12" ]; then patch -p1 -i ${ROOT}/patch-apple-cross-3.12.patch From 5cf66568ca88b3c3367bce9c212828f5df61c782 Mon Sep 17 00:00:00 2001 From: Zanie Blue Date: Fri, 6 Sep 2024 07:15:53 -0500 Subject: [PATCH 27/33] Try using disable patch instead of musl-specific one --- cpython-unix/build-cpython.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cpython-unix/build-cpython.sh b/cpython-unix/build-cpython.sh index 233f6d07..e776263a 100755 --- a/cpython-unix/build-cpython.sh +++ b/cpython-unix/build-cpython.sh @@ -120,7 +120,7 @@ if [ "${CC}" = "clang" ]; then elif [ "${CC}" = "musl-clang" ]; then # This appears to also be a problem for musl builds on 3.13. if [ -n "${PYTHON_MEETS_MINIMUM_VERSION_3_13}" ]; then - patch -p1 -i ${ROOT}/patch-musl-multiarch-13.patch + patch -p1 -i ${ROOT}/patch-disable-multiarch-13.patch fi fi From a3453e0074fcdd7cb2a28e802fc57fe64cce0eed Mon Sep 17 00:00:00 2001 From: Zanie Blue Date: Fri, 6 Sep 2024 07:24:04 -0500 Subject: [PATCH 28/33] Update comment --- cpython-unix/build-cpython.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cpython-unix/build-cpython.sh b/cpython-unix/build-cpython.sh index e776263a..ba76cd80 100755 --- a/cpython-unix/build-cpython.sh +++ b/cpython-unix/build-cpython.sh @@ -146,8 +146,8 @@ if [ -n "${PYTHON_MEETS_MAXIMUM_VERSION_3_10}" ]; then patch -p1 -i ${ROOT}/patch-makesetup-deduplicate-objs.patch fi -# testembed links against Tcl/Tk and libpython which already has Tcl/Tk leading -# duplicate symbols and warnings from objc (which causes test failures). +# testembed links against Tcl/Tk and libpython which already includes Tcl/Tk leading duplicate +# symbols and warnings from objc (which then causes failures in `test_embed` during PGO). if [ -n "${PYTHON_MEETS_MAXIMUM_VERSION_3_13}" ]; then patch -p1 -i ${ROOT}/patch-make-testembed-nolink-tcltk.patch fi From c0199119d41693322ecc918fc34913423edc8965 Mon Sep 17 00:00:00 2001 From: Zanie Blue Date: Fri, 6 Sep 2024 07:28:02 -0500 Subject: [PATCH 29/33] Update comment --- cpython-unix/build-cpython.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/cpython-unix/build-cpython.sh b/cpython-unix/build-cpython.sh index ba76cd80..c922b5f7 100755 --- a/cpython-unix/build-cpython.sh +++ b/cpython-unix/build-cpython.sh @@ -359,7 +359,10 @@ fi if [ -n "${CPYTHON_OPTIMIZED}" ]; then CONFIGURE_FLAGS="${CONFIGURE_FLAGS} --enable-optimizations" if [[ -n "${PYTHON_MEETS_MINIMUM_VERSION_3_13}" && -n "${BOLT_CAPABLE}" ]]; then - echo "BOLT is disabled on Python 3.13+ due to a SEGFAULT when running `test_embed`." + # Due to a SEGFAULT when running `test_embed` with BOLT instrumented binaries, we can't use + # BOLT on Python 3.13+. + # TODO: Find a fix for this or consider skipping these tests specifically + echo "BOLT is disabled on Python 3.13+" elif [[ -n "${PYTHON_MEETS_MINIMUM_VERSION_3_12}" && -n "${BOLT_CAPABLE}" ]]; then CONFIGURE_FLAGS="${CONFIGURE_FLAGS} --enable-bolt" fi From ec025d54c6a14bd719ade15b15f25185f8dfb282 Mon Sep 17 00:00:00 2001 From: Zanie Blue Date: Fri, 6 Sep 2024 07:28:45 -0500 Subject: [PATCH 30/33] Update comment --- cpython-unix/build-cpython.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/cpython-unix/build-cpython.sh b/cpython-unix/build-cpython.sh index c922b5f7..68978928 100755 --- a/cpython-unix/build-cpython.sh +++ b/cpython-unix/build-cpython.sh @@ -453,9 +453,8 @@ if [ "${PYBUILD_PLATFORM}" = "macos" ]; then export MACOSX_DEPLOYMENT_TARGET="${APPLE_MIN_DEPLOYMENT_TARGET}" fi -# ptsrname_r is only available in SDK 13.4+ +# ptsrname_r is only available in SDK 13.4+, but we target a lower version for compatibility. if [ "${PYBUILD_PLATFORM}" = "macos" ]; then - echo "Disabling ptsname_r due to macOS SDK 13.4+ requirement." CONFIGURE_FLAGS="${CONFIGURE_FLAGS} ac_cv_func_ptsname_r=no" fi From aef600bf0d2dc166724ff3edbb555f3944c73ee5 Mon Sep 17 00:00:00 2001 From: Zanie Blue Date: Fri, 6 Sep 2024 07:35:18 -0500 Subject: [PATCH 31/33] Update 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 68978928..9cbbe6fb 100755 --- a/cpython-unix/build-cpython.sh +++ b/cpython-unix/build-cpython.sh @@ -774,6 +774,8 @@ s390x-unknown-linux-gnu) PYTHON_ARCH="s390x-linux-gnu" ;; x86_64-unknown-linux-*) + # In Python 3.13+, the musl target is identified in cross compiles and the output directory + # is named accordingly. if [ "${CC}" = "musl-clang" ] && [ "${PYTHON_MAJMIN_VERSION}" = "3.13" ]; then PYTHON_ARCH="x86_64-linux-musl" else From c5349cccfd77ee7285c2d137fe7796a1420b27e5 Mon Sep 17 00:00:00 2001 From: Zanie Blue Date: Fri, 6 Sep 2024 07:42:19 -0500 Subject: [PATCH 32/33] Update comment --- cpython-windows/build.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cpython-windows/build.py b/cpython-windows/build.py index 74fc2422..d69fb6ad 100644 --- a/cpython-windows/build.py +++ b/cpython-windows/build.py @@ -1419,10 +1419,12 @@ def build_cpython( setuptools_wheel = download_entry("setuptools", BUILD) pip_wheel = download_entry("pip", BUILD) - # CPython 3.13+ no longer uses a bundled version by default + # CPython 3.13+ no longer uses a bundled `mpdecimal` version so we build it if meets_python_minimum_version(python_version, "3.13"): mpdecimal_archive = download_entry("mpdecimal", BUILD) else: + # TODO: Consider using the built mpdecimal for earlier versions as well, + # as we do for Unix builds. mpdecimal_archive = None if arch == "amd64": From dbd279bcdc12e37ca1374b6a04048980ad789162 Mon Sep 17 00:00:00 2001 From: Zanie Blue Date: Fri, 6 Sep 2024 08:17:11 -0500 Subject: [PATCH 33/33] Include `run_tests.py` on 3.13 --- cpython-unix/build-cpython.sh | 5 ++++- cpython-unix/build.py | 1 + cpython-unix/run_tests-13.py | 30 ++++++++++++++++++++++++++++++ cpython-windows/build.py | 10 +++++----- cpython-windows/run_tests-13.py | 30 ++++++++++++++++++++++++++++++ 5 files changed, 70 insertions(+), 6 deletions(-) create mode 100644 cpython-unix/run_tests-13.py create mode 100644 cpython-windows/run_tests-13.py diff --git a/cpython-unix/build-cpython.sh b/cpython-unix/build-cpython.sh index 9cbbe6fb..0c9ae2b9 100755 --- a/cpython-unix/build-cpython.sh +++ b/cpython-unix/build-cpython.sh @@ -933,7 +933,10 @@ cp -av Python/frozen.c ${ROOT}/out/python/build/Python/ cp -av Modules/Setup* ${ROOT}/out/python/build/Modules/ # Copy the test hardness runner for convenience. -if [ -d Tools/scripts/run_tests.py ]; then +# As of Python 3.13, the test harness runner has been removed so we provide a compatibility script +if [ -n "${PYTHON_MEETS_MINIMUM_VERSION_3_13}" ]; then + cp -av ${ROOT}/run_tests-13.py ${ROOT}/out/python/build/run_tests.py +else cp -av Tools/scripts/run_tests.py ${ROOT}/out/python/build/ fi diff --git a/cpython-unix/build.py b/cpython-unix/build.py index affca25c..cba6dbc9 100755 --- a/cpython-unix/build.py +++ b/cpython-unix/build.py @@ -747,6 +747,7 @@ def build_cpython( setuptools_archive, pip_archive, SUPPORT / "build-cpython.sh", + SUPPORT / "run_tests-13.py", ): build_env.copy_file(p) diff --git a/cpython-unix/run_tests-13.py b/cpython-unix/run_tests-13.py new file mode 100644 index 00000000..a78210cc --- /dev/null +++ b/cpython-unix/run_tests-13.py @@ -0,0 +1,30 @@ +""" +Run Python's test suite. + +As of Python 3.13, this script is no longer included in Python itself. +Instead, use: + + $ python -m test --slow-ci + +""" + +import os +import sys + + +def main(regrtest_args): + args = [ + sys.executable, + "-m", + "test", + "--slow-ci", + ] + + args.extend(regrtest_args) + print(" ".join(args)) + + os.execv(sys.executable, args) + + +if __name__ == "__main__": + main(sys.argv[1:]) diff --git a/cpython-windows/build.py b/cpython-windows/build.py index d69fb6ad..88bcf6e0 100644 --- a/cpython-windows/build.py +++ b/cpython-windows/build.py @@ -1722,13 +1722,13 @@ def build_cpython( log("copying %s to %s" % (source, dest)) shutil.copyfile(source, dest) - # CPython 3.13 removed `run_tests.py`. + # CPython 3.13 removed `run_tests.py`, we provide a compatibility script + # for now. if meets_python_minimum_version(python_version, "3.13"): - # TODO(zanieb): Write a script to invoke `python -m test --slow-ci` - # or update the metadata to not require `run_tests.py` - pathlib.Path( + shutil.copyfile( + SUPPORT / "run_tests-13.py", out_dir / "python" / "build" / "run_tests.py", - ).touch() + ) else: shutil.copyfile( cpython_source_path / "Tools" / "scripts" / "run_tests.py", diff --git a/cpython-windows/run_tests-13.py b/cpython-windows/run_tests-13.py new file mode 100644 index 00000000..f3c165fb --- /dev/null +++ b/cpython-windows/run_tests-13.py @@ -0,0 +1,30 @@ +""" +Run Python's test suite. + +As of Python 3.13, this script is no longer included in Python itself. +Instead, use: + + $ python -m test --slow-ci + +""" + +import sys +from subprocess import call + + +def main(regrtest_args): + args = [ + sys.executable, + "-m", + "test", + "--slow-ci", + ] + + args.extend(regrtest_args) + print(" ".join(args)) + + sys.exit(call(args)) + + +if __name__ == "__main__": + main(sys.argv[1:])