From 39f8e288614c05987ea8e083e39a7e25a3b5fb73 Mon Sep 17 00:00:00 2001 From: Andrew Morgan <1342360+anoadragon453@users.noreply.github.com> Date: Mon, 10 Nov 2025 13:05:03 +0000 Subject: [PATCH] Update `cibuildwheel` config to stop building Python 3.9 and free-threaded wheels (#19154) --- .github/workflows/release-artifacts.yml | 12 +++++++----- changelog.d/19154.misc | 1 + pyproject.toml | 22 ++++++++++++++++------ 3 files changed, 24 insertions(+), 11 deletions(-) create mode 100644 changelog.d/19154.misc diff --git a/.github/workflows/release-artifacts.yml b/.github/workflows/release-artifacts.yml index d346aeb59..c88546c3b 100644 --- a/.github/workflows/release-artifacts.yml +++ b/.github/workflows/release-artifacts.yml @@ -150,12 +150,14 @@ jobs: - name: Build wheels run: python -m cibuildwheel --output-dir wheelhouse env: - # Skip testing for platforms which various libraries don't have wheels - # for, and so need extra build deps. + # The platforms that we build for are determined by the + # `tool.cibuildwheel.skip` option in `pyproject.toml`. + + # We skip testing wheels for the following platforms in CI: # - # cp39-*: Python 3.9 is EOL. - # cp3??t-*: Free-threaded builds are not currently supported. - CIBW_TEST_SKIP: pp3*-* cp39-* cp3??t-* *i686* *musl* + # pp3*-* (PyPy wheels) broke in CI (TODO: investigate). + # musl: (TODO: investigate). + CIBW_TEST_SKIP: pp3*-* *musl* - uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0 with: diff --git a/changelog.d/19154.misc b/changelog.d/19154.misc new file mode 100644 index 000000000..7d865a1ac --- /dev/null +++ b/changelog.d/19154.misc @@ -0,0 +1 @@ +Properly stop building wheels for Python 3.9 and free-threaded CPython. \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index f81c1e6ba..f6289cf51 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -392,13 +392,23 @@ build-backend = "poetry.core.masonry.api" [tool.cibuildwheel] # Skip unsupported platforms (by us or by Rust). -# See https://cibuildwheel.readthedocs.io/en/stable/options/#build-skip for the list of build targets. +# +# See https://cibuildwheel.readthedocs.io/en/stable/options/#build-skip for the +# list of supported build targets. +# +# Also see `.github/workflows/release-artifacts.yml` for the list of +# architectures we build for (based on the runner OS types we use), as well as +# the platforms we exclude from testing in CI. +# # We skip: -# - CPython 3.8: EOLed -# - musllinux i686: excluded to reduce number of wheels we build. -# c.f. https://github.com/matrix-org/synapse/pull/12595#discussion_r963107677 -skip = "cp38* *-musllinux_i686" -# Enable non-default builds. +# - free-threaded cpython builds: these are not currently supported. +# - cp38: Python 3.8 is end-of-life. +# - cp39: Python 3.9 is end-of-life. +# - i686: We don't support 32-bit platforms. +skip = "cp3??t-* cp38-* cp39-* *i686*" +# Enable non-default builds. See the list of available options: +# https://cibuildwheel.pypa.io/en/stable/options#enable +# # "pypy" used to be included by default up until cibuildwheel 3. enable = "pypy"