Skip to content

build: enable Python 3.15 wheels - #2109

Open
shaanmajid wants to merge 2 commits into
OpenNMT:masterfrom
shaan-forks:ci/python-3.15
Open

shaanmajid wants to merge 2 commits into
OpenNMT:masterfrom
shaan-forks:ci/python-3.15

Conversation

@shaanmajid

Copy link
Copy Markdown

Update pybind11 to 3.1.0 and cibuildwheel to 4.2.1 so the existing wheel workflow builds wheels for Python 3.15. Add the Python 3.15 classifier. Build selection still includes Python 3.9.

AI assistance: I used Codex to inspect the build configuration, prepare the toolchain updates, and run local builds and tests.

Comment thread .github/workflows/ci.yml

- name: Build wheels
uses: pypa/cibuildwheel@v3.2.1
uses: pypa/cibuildwheel@v4.2.1

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Both Windows wheel jobs build the Python 3.9 wheel, then fail in delvewheel repair with Unable to find library: ctranslate2.dll, even though the logs show the DLL is included in the wheel.

The cibuildwheel upgrade enables this step by default, breaking both Windows builds.

Comment thread python/pyproject.toml
@@ -1,3 +1,3 @@
[build-system]
requires = ["setuptools", "wheel", "pybind11==2.11.1"]
requires = ["setuptools", "wheel", "pybind11==3.1.0"]

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Moving from pybind11 2 to 3 changes the bindings ABI and module initialization, so successful compilation alone isn’t enough.

For basic validation, we could run the existing translation and StorageView tests against the built Python 3.14/3.15 wheels. Those already cover callbacks, async results, and array ownership. A separate python -X dev -c 'import ctranslate2' check would catch shutdown allocator issues, and a small CUDA/ROCm inference test would cover GPU interoperability.

This branch has not been deployed

No deployments
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.

2 participants