Repository navigation
Add Python 3.15 and 3.15t wheels, drop Python 3.8 - #2406
Conversation
- Build wheels with cibuildwheel 4.3.5, which adds CPython 3.15 and no longer builds 3.8. The macOS 3.9-3.12 jobs keep cibuildwheel 2.16.2, as newer versions would raise those wheels' minimum macOS to 13 - requires-python >=3.9 - Add a Python 3.15 PR-CI job and skip the rules-extra tests there (tink and google-re2 ship no 3.15 wheels yet) - Verify the cp315t wheels in the free-threaded wheel jobs
|
🎉 All Contributor License Agreements have been signed. Ready to merge. |
There was a problem hiding this comment.
🔵 Needs a closer look
The cibuildwheel major-version upgrade affects six release platforms, but reported builds cover only Linux aarch64 and macOS arm64, leaving the others—especially Windows and s390x—without end-to-end CI validation.
No open issues 🎉
What changed in this PR
Updates the client’s packaging and CI to support Python 3.15 and free-threaded 3.15t across six platforms, while dropping Python 3.8 support.
Changes:
- Upgrades wheel tooling to cibuildwheel 4.3.5, retaining 2.16.2 for macOS Python 3.9–3.12 compatibility.
- Adds Python 3.15 unit and integration CI jobs and extends free-threaded verification, except on macOS x86_64.
- Raises the minimum Python version to 3.9 and temporarily excludes unavailable
rulesdependencies from Python 3.15 tests.
| File | Description |
|---|---|
tools/wheels/install-macos-python-required-by-cibuildwheel.py |
Updates the cibuildwheel version named in a comment. |
tools/wheels/free-threaded-enable-315-macos.xml |
Enables installation of the macOS 3.15t framework. |
tools/wheels/build-wheels.sh |
Updates default cibuildwheel version and skip patterns. |
tools/wheels/build-wheels.bat |
Adds Windows 3.15/3.15t targets and removes 3.8. |
tools/verify-free-threaded-wheel.sh |
Generalizes the interpreter usage comment. |
tools/verify-free-threaded-job.sh |
Parameterizes the free-threaded interpreter and wheel selection. |
tools/test-released-wheels.sh |
Replaces Python 3.8 release checks with 3.15. |
tools/source-package-verification.sh |
Selects reduced test dependencies on Python 3.15. |
tools/requirements-manylinux.txt |
Pins cibuildwheel to 4.3.5. |
tools/mingw-w64/semaphore_commands.sh |
Updates the Windows cibuildwheel installation. |
tests/schema_registry/conftest.py |
Excludes rules-dependent unit modules on Python 3.15. |
tests/integration/schema_registry/conftest.py |
Excludes rules-dependent integration modules on Python 3.15. |
service.yml |
Raises the declared Python version to 3.9. |
requirements/requirements-tests-install-py315.txt |
Adds test dependencies without the rules extra. |
pyproject.toml |
Requires Python 3.9 or newer. |
DEVELOPER.md |
Updates the minimum Python prerequisite. |
CHANGELOG.md |
Documents new wheels, dropped 3.8 support, and rules limitations. |
.semaphore/semaphore.yml |
Updates wheel jobs and adds 3.15/3.15t verification coverage. |
Review effort: Balanced
|
|
overlaps with #2400 ? |
Thanks Pierre-Yves Le Borgne (@pylaterreur)! yes, it covers the same ground, and thanks for #2400 . The team decided to drop Python 3.8 (end of life since Oct 2024) together with adding 3.15, so every build can move to cibuildwheel 4 instead of running a second pass per job. This PR also adds a Python 3.15 CI job and cp315t free-threaded verification. |
| - name: CIBW_SKIP | ||
| value: cp36-* cp37-* cp38-* |
| matrix: | ||
| - env_var: FT_PYTHON | ||
| values: ["3.14t", "3.15t"] | ||
| commands: | ||
| - export ARCH=x64 | ||
| # sem-version only provides a pip to bootstrap uv; the wheel runs in the 3.14t venv uv creates. | ||
| # sem-version only provides a pip to bootstrap uv; the wheel runs in the $FT_PYTHON venv uv creates. |
There was a problem hiding this comment.
No need to verify on both 3.14t and 3.15t. We can just bump the version from 3.14t to 3.15t in verify-free-threaded-job.sh.
| matrix: | ||
| - env_var: FT_PYTHON | ||
| values: ["3.14t", "3.15t"] | ||
| commands: | ||
| - export ARCH=arm64 | ||
| # sem-version only provides a pip to bootstrap uv; the wheel runs in the 3.14t venv uv creates. | ||
| # sem-version only provides a pip to bootstrap uv; the wheel runs in the $FT_PYTHON venv uv creates. |
| matrix: | ||
| - env_var: FT_PYTHON | ||
| values: ["3.14t", "3.15t"] | ||
| commands: | ||
| - export ARCH=s390x | ||
| # sem-version only provides a pip to bootstrap uv; the wheel runs in the 3.14t venv uv creates. | ||
| # sem-version only provides a pip to bootstrap uv; the wheel runs in the $FT_PYTHON venv uv creates. |
| # 3.14t only: cryptography (via authlib) ships no free-threaded 3.15 wheel | ||
| # for macOS x86_64, so the 3.15t test install would need a Rust build. |
There was a problem hiding this comment.
I think cryptography already gets built from source (the agents have rust toolchain installed). So, as mentioned in other comments, you can skip 3.14t and only verify on 3.15t.
There was a problem hiding this comment.
Please bump this to 3.15t as well.
| matrix: | ||
| - env_var: FT_PYTHON | ||
| values: ["3.14t", "3.15t"] | ||
| commands: | ||
| - export ARCH=arm64 | ||
| # sem-version only provides a pip to bootstrap uv; the wheel runs in the 3.14t venv uv creates. | ||
| # sem-version only provides a pip to bootstrap uv; the wheel runs in the $FT_PYTHON venv uv creates. |
| matrix: | ||
| - env_var: FT_PYTHON | ||
| values: ["3.14t", "3.15t"] | ||
| commands: | ||
| # sem-version only provides a pip to bootstrap uv; the wheel runs in the 3.14t venv uv creates. | ||
| # sem-version only provides a pip to bootstrap uv; the wheel runs in the $FT_PYTHON venv uv creates. | ||
| - sem-version python 3.11 | ||
| - python -m pip install uv | ||
| - uv venv _venv314t --python 3.14t | ||
| - . .\_venv314t\Scripts\Activate.ps1 | ||
| - uv venv _venvft --python $env:FT_PYTHON | ||
| - . .\_venvft\Scripts\Activate.ps1 |
| - python -c "import glob, os, sys; tag = 'cp' + os.environ['FT_PYTHON'].replace('.', ''); found = glob.glob('artifacts/wheelhouse/*-' + tag + '-win_amd64.whl'); print(found); sys.exit(0 if found else 1)" | ||
| - python -m pip install --no-index --find-links artifacts\wheelhouse confluent-kafka | ||
| - ".\\tools\\mingw-w64\\setup-msys2.ps1" | ||
| # The Windows librdkafka build has no git tag in its version string (2.16.0, not 2.16.0-RC2) | ||
| # FIXME: add LIBRDKAFKA_GIT_VERSION when building Windows as well. | ||
| - C:\msys64\usr\bin\bash.exe -c 'LIBRDKAFKA_VERSION=${LIBRDKAFKA_VERSION%%-*} tools/verify-free-threaded-wheel.sh _venv314t/Scripts/python.exe' | ||
| - C:\msys64\usr\bin\bash.exe -c 'LIBRDKAFKA_VERSION=${LIBRDKAFKA_VERSION%%-*} tools/verify-free-threaded-wheel.sh _venvft/Scripts/python.exe' |
There was a problem hiding this comment.
As mentioned before, let's verify only for 3.15.
| python_versions=("3.8" "3.9" "3.10" "3.11" "3.12" "3.13" "3.14") | ||
| python_versions=("3.9" "3.10" "3.11" "3.12" "3.13" "3.14" "3.15") | ||
|
|
||
| if command -v sem-version &> /dev/null; then |
There was a problem hiding this comment.
Do we know if sem-version python 3.15 is supported, since it is a new version? If it is not, then post release verification will fail for 3.15.
There was a problem hiding this comment.
Were you able to check this?
| # pyproject.toml are skipped by cibuildwheel itself. cibuildwheel 4.x builds | ||
| # PyPy only when enabled (and warns about pp*), but the 2.x used for the macOS | ||
| # 3.9-3.12 wheels and install-macos-python-required-by-cibuildwheel.py need it. | ||
| export CIBW_SKIP="pp* *i686 *musllinux* $CIBW_SKIP" |
There was a problem hiding this comment.
As mentioned earlier, we can hardcode the older versions here and get rid of env variable that we are setting when cibuildwheel version is 2.x.
There was a problem hiding this comment.
As mentioned before, when we add support for a new python version, we don't bump the version in the "Source package verification and Integration tests with Python 3 (Linux x64)" block. So if we keep the python version in that block same as before, we don't need this change, right?
|
Devarsh Patel (@Devarsh010) Thanks for the PR. I have left a few comments. There are a few places where I have questions, we can take Emanuele's opinion on them. |
- Verify free-threaded wheels on 3.15t only, on all platforms. - Remove the Python 3.15 PR-CI block and the changes it needed. - Skip cp36-cp38 in build-wheels.sh. - Remove Python 3.8 leftovers (black, tox.ini, build-manylinux.sh) and reformat one test for black's py39 target.
# Conflicts: # CHANGELOG.md
| @@ -8,4 +8,4 @@ export MAKE=mingw32-make # so that Autotools can find it | |||
|
|
|||
| cmd /c mklink /D C:\Python38\python3.exe C:\Python38\python.exe | |||
There was a problem hiding this comment.
nit: This contains python38 references but I believe it is not used as we set python as 3.11 using sem-version before we trigger this script. It would be great if we could remove these references.
There was a problem hiding this comment.
Creating a new file for every new Python version can create a lot of clutter. Here's what I suggest:
- Remove this file and rename
free-threaded-enable-314-macos.xmltofree-threaded-enable-macos.xml. Keep the file generic. - From
install-macos-python-required-by-cibuildwheel, read this file and add the python version.
| (CSFLE and data quality rules) can't be installed on Python 3.15 yet, as | ||
| its `tink` and `google-re2` dependencies publish no Python 3.15 wheels (#2406) | ||
| - Drop Python 3.8 support. Python 3.8 reached end of life in October 2024; | ||
| pip on Python 3.8 keeps installing v2.16.x (#2406) |
There was a problem hiding this comment.
nit: You can remove the part after ;.
- Replace the per-version free-threaded-enable-3XX-macos.xml files with one free-threaded-enable-macos.xml; the macOS install helper fills in the Python version. - Remove the unused Python 3.8 setup from semaphore_commands.sh. - Shorten the CHANGELOG entry for dropping Python 3.8.
The macOS and s390x agent images put uv 0.11.17 first on PATH, which resolves 3.15t to 3.15.0b1. Use the uv the job installs with pip, and fail if the interpreter is not a final release.
|
Ojasva Jain (ojasvajain)
left a comment
There was a problem hiding this comment.
LGTM, thanks!
#2406 removed py38 from black's target-version, so black now wraps multiple context managers in parentheses. This file was formatted before that change and fails the style check on master.
* Add 2.16.2 to the CHANGELOG and the soak test versions 2.16.2 (Python 3.15 and 3.15t wheels, Python 3.8 dropped) was released from the 2.16.1-py315 branch. - CHANGELOG: move the two #2406 entries from "Unreleased" into a v2.16.2 section, the same as in tag v2.16.2 - Soak test version list: replace 2.16.1 with 2.16.2 * Set the version on master to 2.16.2 2.16.2 was released from the 2.16.1-py315 branch, so master still said 2.16.1 while the soak test version list now has 2.16.2. tools/pre-release-validation.sh requires the version to be in that list, so any tag from master, for example a dev tag, would fail until the next release. Set pyproject.toml and CFL_VERSION_STR to 2.16.2, the latest release.





What
Adds CPython 3.15 and free-threaded 3.15t wheels on all six platforms (Linux x86_64/aarch64/s390x, macOS x86_64/arm64, Windows x64) and drops Python 3.8 (end of life since October 2024).
requires-pythonbecomes>=3.9.rulesextra: tink and google-re2 publish no 3.15 wheels yet.No C changes are needed for 3.15.
Checklist
rulesextra can't be installed on 3.15 yet (noted in the CHANGELOG).References
Test & Review
Tested locally:
cibuildwheel --print-build-identifiersfor each wheel job: 48 identifiers on master, 54 on this branch (exactly −cp38, +cp315/cp315t).verify-free-threaded-job.shwith 3.14t and 3.15t: 0 failures.Open questions / Follow-ups
rulesskips once tink and google-re2 publish 3.15 wheels.