Skip to content

Add Python 3.15 and 3.15t wheels, drop Python 3.8 - #2406

Merged
Devarsh Patel (Devarsh010) merged 8 commits into
masterfrom
python-3.15-wheels
Nov 16, 2026
Merged

Devarsh Patel (Devarsh010) merged 8 commits into
masterfrom
python-3.15-wheels

Conversation

@Devarsh010

@Devarsh010 Devarsh Patel (Devarsh010) commented Oct 28, 2026 •

Copy link
Copy Markdown
Member

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).

  • cibuildwheel 3.2.1 → 4.3.5. cibuildwheel 4 is needed for 3.15 and no longer builds 3.8, so requires-python becomes >=3.9.
  • The macOS 3.9–3.12 jobs stay on cibuildwheel 2.16.2: newer versions would raise those wheels' minimum macOS to 13.
  • Wheels: 48 → 54 (−6 cp38, +12 cp315/cp315t). All other wheel names and tags are unchanged.
  • CI: a new Python 3.15 PR-CI job (unit + integration). "Verify free threaded" now also checks cp315t (macOS x86_64 stays on 3.14t: no cryptography 3.15t wheel there).
  • On 3.15 the tests skip the rules extra: tink and google-re2 publish no 3.15 wheels yet.

No C changes are needed for 3.15.

Checklist

  • Contains customer facing changes? Including API/behavior changes
    • New cp315/cp315t wheels; Python 3.8 dropped; the rules extra can't be installed on 3.15 yet (noted in the CHANGELOG).
  • Did you add sufficient unit test and/or integration test coverage for this PR?
    • New 3.15 PR-CI job; cp315t added to the release-time free-threaded checks.

References

Test & Review

Tested locally:

  • cibuildwheel --print-build-identifiers for each wheel job: 48 identifiers on master, 54 on this branch (exactly −cp38, +cp315/cp315t).
  • Linux aarch64 cibuildwheel 4.3.5 build: all 9 wheels pass. Rebuilt wheels match the published 2.16.1 ones (files, bundled librdkafka, tags).
  • macOS arm64 cp313–cp315t wheels build and pass.
  • verify-free-threaded-job.sh with 3.14t and 3.15t: 0 failures.
  • Python 3.15: unit tests 0 failures. Integration tests: one intermittent share-consumer failure per protocol; both tests pass 10/10 on rerun on 3.15 and 3.11.

Open questions / Follow-ups

  • Remove the 3.15 rules skips once tink and google-re2 publish 3.15 wheels.

- 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
Copilot AI balanced review requested due to automatic review settings October 28, 2026 10:51
@confluent-cla-assistant

Copy link
Copy Markdown

🎉 All Contributor License Agreements have been signed. Ready to merge.
Please push an empty commit if you would like to re-run the checks to verify CLA status for all contributors.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 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 rules dependencies 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

@sonarqube-confluent

Copy link
Copy Markdown

@pylaterreur

Copy link
Copy Markdown
Contributor

overlaps with #2400 ?

@Devarsh010

Copy link
Copy Markdown
Member Author

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.

Comment thread .semaphore/semaphore.yml Resolved
Comment thread .semaphore/semaphore.yml Outdated
Comment on lines +79 to +80
- name: CIBW_SKIP
value: cp36-* cp37-* cp38-*

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment thread .semaphore/semaphore.yml Resolved
Comment thread .semaphore/semaphore.yml Outdated
Comment on lines +504 to +509
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.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread .semaphore/semaphore.yml Outdated
Comment on lines +534 to +539
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.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment thread .semaphore/semaphore.yml Outdated
Comment on lines +564 to +569
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.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment thread .semaphore/semaphore.yml Outdated
Comment on lines +605 to +606
# 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.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread .semaphore/semaphore.yml Outdated
Comment on lines 261 to 281

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please bump this to 3.15t as well.

Comment thread .semaphore/semaphore.yml Outdated
Comment on lines +647 to +652
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.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same

Comment thread .semaphore/semaphore.yml Outdated
Comment on lines +689 to +697
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

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same

Comment thread .semaphore/semaphore.yml Outdated
Comment on lines +705 to +710
- 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'

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Were you able to check this?

Comment thread tools/wheels/build-wheels.sh Outdated
# 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"

@ojasvajain Ojasva Jain (ojasvajain) Nov 4, 2026 •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ojasvajain

Ojasva Jain (ojasvajain) commented Nov 4, 2026 •

Copy link
Copy Markdown
Member

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.

Comment thread pyproject.toml Resolved
- 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.
Comment thread tools/mingw-w64/semaphore_commands.sh Outdated
Comment on lines 2 to 9
@@ -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

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Creating a new file for every new Python version can create a lot of clutter. Here's what I suggest:

  1. Remove this file and rename free-threaded-enable-314-macos.xml to free-threaded-enable-macos.xml. Keep the file generic.
  2. From install-macos-python-required-by-cibuildwheel, read this file and add the python version.

Comment thread CHANGELOG.md Outdated
(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)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.
@sonarqube-confluent

Copy link
Copy Markdown

@ojasvajain Ojasva Jain (ojasvajain) left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

@Devarsh010
Devarsh Patel (Devarsh010) merged commit 6872ac7 into master Nov 16, 2026
5 checks passed
@Devarsh010
Devarsh Patel (Devarsh010) deleted the python-3.15-wheels branch November 16, 2026 08:22
Ojasva Jain (ojasvajain) pushed a commit that referenced this pull request Nov 16, 2026
#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.
Devarsh Patel (Devarsh010) added a commit that referenced this pull request Nov 19, 2026
* 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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants