Add Python 3.15 and 3.15t to Linux nightly wheel builds#8148
Open
atalman wants to merge 5 commits into
Open
Conversation
|
@atalman is attempting to deploy a commit to the Meta Open Source Team on Vercel. A member of the Team first needs to authorize it. |
2828c87 to
61a4d33
Compare
malfet
approved these changes
Jun 5, 2026
Add 3.15 and 3.15t (free-threaded) to the binary build matrix for Linux
wheels on the nightly channel. 3.15 is brand new and only the Linux
manywheel builders are ready for it, so:
- The versions are added to the "nightly" entry of PYTHON_ARCHES_DICT
only; "test" and "release" stay at 3.10-3.14t until 3.15 is releasable.
- generate_wheels_matrix skips any 3.15* version when the OS is not
linux or linux-aarch64, mirroring the per-OS exclusion previously used
for 3.14 on Windows. macOS, Windows, and Windows arm64 are unaffected.
The reference matrices under tools/tests/assets were regenerated for the
four Linux wheel configurations; macOS/Windows references are unchanged.
The interpreter setup for 3.15 (build against the manylinux python.org
interpreter rather than conda) is handled in a follow-up commit.
Test Plan:
cd tools/tests
python3 -m tools.tests.test_generate_binary_build_matrix
7bca1e4 to
d730129
Compare
… conda) Python 3.15 is still in pre-release and its C-API/ABI is not frozen. conda-forge's python=3.15.0a* does not match the python.org alpha that the torch nightly cp315 wheels are built against, so importing torch under a conda 3.15 interpreter segfaults during module init (observed as 'python setup.py clean' crashing with SIGSEGV / exit 139 in the torchvision and torchaudio cp315 builds). For 3.15/3.15t, skip conda and build against the manylinux python.org interpreter that produced the torch wheels (/opt/python/cp315-cp315[t]). pkg-helpers already prepends that interpreter's bin to PATH via BUILD_ENV_FILE, so setting CONDA_RUN='' makes the whole build and smoke test resolve to it -- no ABI skew. Build tooling (cmake/ninja/wheel) is pip installed; libpng/libjpeg/libwebp/pkg-config come from the manylinux image's system packages. All other Python versions keep the conda path.
PR builds normally limit to python_versions[0] (3.10); override that to ["3.15", "3.15t"] for linux and linux-aarch64 so this PR's CI actually exercises the new versions (macOS/Windows keep 3.10 to avoid an empty matrix). Revert this commit before merging.
torchvision-extra-decoders is a torch C++ extension (CppExtension over torch.utils.cpp_extension, install_requires=[], no torchvision needed), so it's a good probe for whether the binary build path works on a new Python such as 3.15/3.15t -- it actually compiles against libtorch for cp315 rather than just installing a pure-python package. Mirrors meta-pytorch/torchvision-extra-decoders' linux_wheel.yaml: cpu-only matrix, setup-py build, packaging/pre_build_script.sh (auditwheel + conda libavif/libheif), post_build_script.sh, and the fake smoke test. On PR CI the matrix is limited to 3.15/3.15t by the temporary force commit.
5c21ca1 to
7699d22
Compare
The 3.15/3.15t wheels build fine, but the smoke test installs the built wheel, which pulls required runtime deps that have no cp315 wheels yet and fail to build from sdist -- e.g. pillow, a hard install_requires dependency of torchvision (pip: 'Collecting pillow!=8.3.*,>=5.3.0 (from torchvision)'). The cascade is purely ecosystem readiness, not a defect in the build path this PR delivers. Skip the smoke step for 3.15* until cp315 wheels are published. Other Python versions are unaffected.
7699d22 to
1eb5779
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds Python 3.15 and 3.15t (free-threaded) to the binary build matrix for Linux wheels on the nightly channel, and wires up the conda env to install them from conda-forge.
3.15 is brand new and only the Linux manywheel builders are ready for it, so the rollout is intentionally scoped:
nightlyentry ofPYTHON_ARCHES_DICTonly.testandreleasestay at3.10-3.14tuntil 3.15 is releasable.generate_wheels_matrixskips any3.15*version when the OS is notlinuxorlinux-aarch64(mirrors the per-OS exclusion previously used for 3.14 on Windows). macOS / Windows / Windows-arm64 are unaffected.conda env (setup-binary-builds)
3.15 is not on the default Anaconda channel yet; conda-forge ships it under the
python_devlabel (currently3.15.0a8), and thepython-freethreadingmetapackage for 3.15 is published there too. Sosetup-binary-builds/action.ymlinstalls:3.15->python=3.15.0a8 -c conda-forge/label/python_dev -c conda-forge3.15t->python=3.15.0a8 python-freethreading -c conda-forge/label/python_dev -c conda-forgeThis mirrors how 3.14 was first brought up via
conda-forge/label/python_rc(commit 7351b79) before being switched to the default channel once it shipped (commit 13ca4ea). The pinned alpha should be bumped as newer 3.15 pre-releases are published.Scope verification
Test Plan
All 7 tests pass. Per-OS/per-channel scoping additionally verified by generating the matrix for each OS and channel.
The top commit
[DO NOT MERGE] Temporarily force PR builds to test 3.15/3.15t on Linuxoverrides the PR-build version limiter (normallypython_versions[0]= 3.10) so this PR's CI actually builds 3.15/3.15t on Linux. Drop this commit before merging.This PR was authored with the assistance of an AI assistant.