Repository navigation
Conversation
2.15 raises the minimum supported Python to 3.11, so stop building and
uploading cp310 nightly wheels.
Drops "3.10" from FULL_PYTHON_VERSIONS and regenerates the binary
workflows. Wheel configs per OS:
linux 56 -> 49
windows 40 -> 35
windows-arm64 4 -> 3
macos 4 -> 3
generate_libtorch_extraction_configs picked the py3.10 wheel as the
source for libtorch extraction (py3.11 only for windows-arm64, which
never built 3.10). Removing 3.10 without touching that would leave no
wheel config matching preferred_python, so arch_to_config would come out
empty and libtorch would silently stop being produced for every arch --
no error, just no packages. It now reads FULL_PYTHON_VERSIONS[0] so it
cannot drift out of the list again, with a note saying why.
Verified the libtorch extraction configs are byte-identical before and
after (same build_name set for all four OSes); only the 3.10 wheel
configs go away.
Left alone deliberately, all runner tooling or documented dummies rather
than shipped artifacts:
- macos_binary_build_workflow.yml.j2 setup-python "3.10.4", which runs
the libtorch extraction script on the runner.
- upload.yml.j2 DESIRED_PYTHON "3.10", commented in place as "a dummy
value for libtorch to work correctly with our batch scripts".
- windows_binary_build_workflow.yml.j2 default('3.10'), the same dummy
for configs that carry no python_version.
Side effect worth noting: get_ci_variable.py --min-python-version returns
FULL_PYTHON_VERSIONS[0], so lint's "Setup Min Python version" step moves
from 3.10 to 3.11. That matches the 2.15 minimum.
Regeneration is idempotent (second run produces no further diff), all
five regenerated workflows parse as YAML, and ruff check/format are clean.
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/198233
Note: Links to docs will display an error until the docs builds have been completed. ❗ 1 Active SEVsThere are 1 currently active SEVs. If your PR is affected, please view them below: ⏳ 60 Pending, 1 Unrelated FailureAs of commit eb8c9a4 with merge base 5d8cd49 ( 🟡 GREEN LIGHT - PR requires human review:
reason: CRCR (non-blocking) - The following CRCR downstream CI job failed but is non-blocking:
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
|
@pytorchmergebot merge -f "I believe we are ok on merging this" |
Merge startedYour change will be merged immediately since you used the force (-f) flag, bypassing any CI checks (ETA: 1-5 minutes). Please use Learn more about merging in the wiki. Questions? Feedback? Please reach out to the PyTorch DevX Team |
2.15 raises the minimum supported Python to 3.11, so move the `pull` and `trunk` lanes off 3.10. Companion to #198233, which drops 3.10 from the nightly binary matrix. Renames job ids, job names, `build-environment` labels and `python-version` inputs in `pull.yml` and `trunk.yml`, and provides the 3.11 docker images those jobs now reference. ## Images Three explicitly versioned images are referenced by the renamed jobs: | image | status | |---|---| | `pytorch-linux-jammy-py3.11-clang21` | already existed | | `pytorch-linux-jammy-aarch64-py3.11-gcc13` | **added** | | `pytorch-linux-jammy-cuda13.2-cudnn9-py3.11-clang20` | **added** | The aarch64 one needs an explicit case in `build.sh` — the catch-all would not set `ACL`/`OPENBLAS`. The clang20 one is fine on the catch-all, which is how its 3.10 counterpart is already built. Both are added to `docker-builds.yml` so they're actually built and pushed. ##⚠️ Not complete: six jobs still run 3.10 containers Worth a close look before merging. These carry a `py3.11` label but point at **unversioned** `py3` images whose `ANACONDA_PYTHON_VERSION` is still 3.10: | workflow | job | image | |---|---|---| | pull | `linux-jammy-rocm-py3.11` | `pytorch-linux-jammy-rocm-n-py3` | | pull | `linux-noble-xpu-n-py3.11` | `pytorch-linux-noble-xpu-n-py3` | | trunk | `libtorch-linux-jammy-cuda13.2-py3.11-gcc11` | `...cuda13.2-cudnn9-py3-gcc11` | | trunk | `linux-jammy-cuda13.2-py3.11-gcc11` | `...cuda13.2-cudnn9-py3-gcc11` | | trunk | `linux-jammy-cuda13.2-py3.11-gcc11-no-ops` | `...cuda13.2-cudnn9-py3-gcc11` | | trunk | `linux-jammy-py3.11-gcc11` (verify-cachebench) | `...py3-gcc11-inductor-benchmarks` | Completing these means bumping `ANACONDA_PYTHON_VERSION` on the shared images, which moves **inductor, periodic, nightly, docs-build and operator_benchmark** at the same time. That's a decision for the owners of those lanes rather than something to slip into a pull/trunk change, so I left it as follow-up. Happy to do it here instead if you'd rather. ## Test plan - All **13** `pytorch-linux-*` images referenced by `pull.yml`/`trunk.yml` after the rename resolve to something `build.sh` can build **and** `docker-builds.yml` builds. Verified programmatically, not by eye. - `pull.yml`, `trunk.yml`, `docker-builds.yml` all parse as YAML. - `build.sh` passes `bash -n`. - Zero `py3.10` / `py3_10` references remain in either workflow. ## Note on `viable_strict.md` Updated the `pull` required-check name to match. The `trunk` line there already referenced `linux-jammy-cuda13.0-py3.10-gcc11`, which doesn't exist in `trunk.yml` (it's cuda13.2 now) — that staleness predates this change, so I left it rather than guessing at the intended job. **Heads-up for reviewers:** this renames required check names (`pull / linux-jammy-py3.10-gcc11 / test` → `.../py3.11-gcc11 / test`), so branch-protection or merge-rule config referencing the old names may need updating in step. --- 🤖 Generated with [Claude Code](https://claude.com/claude-code) Pull Request resolved: #198271 Approved by: https://github.com/huydhn
Python 3.10 reaches EOL this month and was dropped from the nightly binary build matrix in #198233, but 13 of the 31 images in .ci/docker/build.sh were still pinned to it. Most did not say so: only two carry the version in their tag, so images like pytorch-linux-jammy-cuda13.2-cudnn9-py3-gcc11 -- 28 workflow references -- were quietly 3.10. Bumps the eleven whose tags do not encode a version, so no image is renamed and no consumer has to change: cuda12.8-cudnn9-py3-gcc11 cuda13.2-cudnn9-py3-gcc11 cuda13.2-cudnn9-py3-gcc11-inductor-benchmarks cuda13.4-cudnn9-py3-gcc11 cuda13.4-cudnn9-py3-gcc11-inductor-benchmarks jammy-rocm-n-py3 (and -benchmarks) jammy-xpu-n-1-py3 noble-xpu-n-py3 (and -client, -inductor-benchmarks) py3-gcc11-inductor-benchmarks py3-clang21-executorch jammy-linter The jammy/noble ROCm conditional collapses: it picked 3.10 for jammy and 3.11 for noble, and both are now 3.11. Two are deliberately left alone because they need more than a version bump: pytorch-linux-jammy-py3.10-clang21 is a duplicate -- py3.11-clang21 already exists, and the 3.10 image is only built by docker-builds.yml, never used by a test job. It should be deleted, not renamed. pytorch-linux-jammy-cuda13.2-cudnn9-py3.10-linter needs a tag rename plus updates in docker-builds.yml and lint.yml. Not touched: .ci/docker/common/install_cpython.sh and manywheel/Dockerfile_s390x still build CPython 3.10.1. Those feed release wheels, and test-infra still lists 3.10 in PYTHON_ARCHES_DICT for the test and release channels, so removing it there would break 2.14/2.15 release builds. Made with AI, Claude Pull Request resolved: #199535 Approved by: https://github.com/huydhn, https://github.com/Skylion007
Python 3.10 reaches EOL this month and was dropped from the nightly binary build matrix in #198233, but 13 of the 31 images in .ci/docker/build.sh were still pinned to it. Most did not say so: only two carry the version in their tag, so images like pytorch-linux-jammy-cuda13.2-cudnn9-py3-gcc11 -- 28 workflow references -- were quietly 3.10. Bumps the eleven whose tags do not encode a version, so no image is renamed and no consumer has to change: cuda12.8-cudnn9-py3-gcc11 cuda13.2-cudnn9-py3-gcc11 cuda13.2-cudnn9-py3-gcc11-inductor-benchmarks cuda13.4-cudnn9-py3-gcc11 cuda13.4-cudnn9-py3-gcc11-inductor-benchmarks jammy-rocm-n-py3 (and -benchmarks) jammy-xpu-n-1-py3 noble-xpu-n-py3 (and -client, -inductor-benchmarks) py3-gcc11-inductor-benchmarks py3-clang21-executorch jammy-linter The jammy/noble ROCm conditional collapses: it picked 3.10 for jammy and 3.11 for noble, and both are now 3.11. Two are deliberately left alone because they need more than a version bump: pytorch-linux-jammy-py3.10-clang21 is a duplicate -- py3.11-clang21 already exists, and the 3.10 image is only built by docker-builds.yml, never used by a test job. It should be deleted, not renamed. pytorch-linux-jammy-cuda13.2-cudnn9-py3.10-linter needs a tag rename plus updates in docker-builds.yml and lint.yml. Not touched: .ci/docker/common/install_cpython.sh and manywheel/Dockerfile_s390x still build CPython 3.10.1. Those feed release wheels, and test-infra still lists 3.10 in PYTHON_ARCHES_DICT for the test and release channels, so removing it there would break 2.14/2.15 release builds. Made with AI, Claude Pull Request resolved: #199535 Approved by: https://github.com/huydhn, https://github.com/Skylion007
Python 3.10 reaches EOL this month and was dropped from the nightly binary build matrix in pytorch#198233, but 13 of the 31 images in .ci/docker/build.sh were still pinned to it. Most did not say so: only two carry the version in their tag, so images like pytorch-linux-jammy-cuda13.2-cudnn9-py3-gcc11 -- 28 workflow references -- were quietly 3.10. Bumps the eleven whose tags do not encode a version, so no image is renamed and no consumer has to change: cuda12.8-cudnn9-py3-gcc11 cuda13.2-cudnn9-py3-gcc11 cuda13.2-cudnn9-py3-gcc11-inductor-benchmarks cuda13.4-cudnn9-py3-gcc11 cuda13.4-cudnn9-py3-gcc11-inductor-benchmarks jammy-rocm-n-py3 (and -benchmarks) jammy-xpu-n-1-py3 noble-xpu-n-py3 (and -client, -inductor-benchmarks) py3-gcc11-inductor-benchmarks py3-clang21-executorch jammy-linter The jammy/noble ROCm conditional collapses: it picked 3.10 for jammy and 3.11 for noble, and both are now 3.11. Two are deliberately left alone because they need more than a version bump: pytorch-linux-jammy-py3.10-clang21 is a duplicate -- py3.11-clang21 already exists, and the 3.10 image is only built by docker-builds.yml, never used by a test job. It should be deleted, not renamed. pytorch-linux-jammy-cuda13.2-cudnn9-py3.10-linter needs a tag rename plus updates in docker-builds.yml and lint.yml. Not touched: .ci/docker/common/install_cpython.sh and manywheel/Dockerfile_s390x still build CPython 3.10.1. Those feed release wheels, and test-infra still lists 3.10 in PYTHON_ARCHES_DICT for the test and release channels, so removing it there would break 2.14/2.15 release builds. Made with AI, Claude Pull Request resolved: pytorch#199535 Approved by: https://github.com/huydhn, https://github.com/Skylion007
Python 3.10 reaches EOL this month and was dropped from the nightly binary build matrix in pytorch#198233, but 13 of the 31 images in .ci/docker/build.sh were still pinned to it. Most did not say so: only two carry the version in their tag, so images like pytorch-linux-jammy-cuda13.2-cudnn9-py3-gcc11 -- 28 workflow references -- were quietly 3.10. Bumps the eleven whose tags do not encode a version, so no image is renamed and no consumer has to change: cuda12.8-cudnn9-py3-gcc11 cuda13.2-cudnn9-py3-gcc11 cuda13.2-cudnn9-py3-gcc11-inductor-benchmarks cuda13.4-cudnn9-py3-gcc11 cuda13.4-cudnn9-py3-gcc11-inductor-benchmarks jammy-rocm-n-py3 (and -benchmarks) jammy-xpu-n-1-py3 noble-xpu-n-py3 (and -client, -inductor-benchmarks) py3-gcc11-inductor-benchmarks py3-clang21-executorch jammy-linter The jammy/noble ROCm conditional collapses: it picked 3.10 for jammy and 3.11 for noble, and both are now 3.11. Two are deliberately left alone because they need more than a version bump: pytorch-linux-jammy-py3.10-clang21 is a duplicate -- py3.11-clang21 already exists, and the 3.10 image is only built by docker-builds.yml, never used by a test job. It should be deleted, not renamed. pytorch-linux-jammy-cuda13.2-cudnn9-py3.10-linter needs a tag rename plus updates in docker-builds.yml and lint.yml. Not touched: .ci/docker/common/install_cpython.sh and manywheel/Dockerfile_s390x still build CPython 3.10.1. Those feed release wheels, and test-infra still lists 3.10 in PYTHON_ARCHES_DICT for the test and release channels, so removing it there would break 2.14/2.15 release builds. Made with AI, Claude Pull Request resolved: pytorch#199535 Approved by: https://github.com/huydhn, https://github.com/Skylion007
I'm working on getting rid of 3.10 on Windows pytorch/test-infra#9178 and will try to roll out this new AMI today. |
## Summary Raise the minimum Python in the package metadata from 3.10 to 3.11, to match what 2.15 builds. - `pyproject.toml`: `requires-python = ">=3.11"`, and remove the `Programming Language :: Python :: 3.10` classifier. - `README.md`: the source-build prerequisite says "Python 3.11 or later". ## Why The binary build matrix no longer includes Python 3.10: `FULL_PYTHON_VERSIONS` in `.github/scripts/generate_binary_build_matrix.py` starts at `3.11`, and the 2.15.0 wheels on the test channel are `cp311` to `cp315` (plus `cp314t` and `cp315t`), with no `cp310`. `pyproject.toml` was not updated, so the 2.15.0 wheels carry: ``` Requires-Python: >=3.10 Classifier: Programming Language :: Python :: 3.10 ``` That tells PyPI and `pip show` that 3.10 is supported, and makes `uv` and Poetry try to resolve 2.15 for Python 3.10 and fail on a missing wheel instead of reporting that 3.11 is required. The PRs that dropped 3.10 from the builds (#198233, #199398) only changed build and CI config and did not touch `pyproject.toml`. ## Not changed - `[tool.ruff]` settings and the `# TODO: Remove Python-3.10 specific suppressions` comment. - The Python 3.10 code paths in dynamo; #199417 handles those. ## Testing `pyproject.toml` parses (`tomllib`), and `project.requires-python` is `>=3.11` with the classifiers `3 :: Only`, `3.11` to `3.15`. I did not build a wheel or an sdist from this change. Cherry-pick to `release/2.15` is a separate PR. Pull Request resolved: #202271 Approved by: https://github.com/huydhn, https://github.com/albanD
) ## Summary Raise the minimum Python in the package metadata from 3.10 to 3.11, to match what 2.15 builds. - `pyproject.toml`: `requires-python = ">=3.11"`, and remove the `Programming Language :: Python :: 3.10` classifier. - `README.md`: the source-build prerequisite says "Python 3.11 or later". - `[tool.ruff] target-version = "py310"`: pinned so lint does not change (see below). ## Why The binary build matrix no longer includes Python 3.10: `FULL_PYTHON_VERSIONS` in `.github/scripts/generate_binary_build_matrix.py` starts at `3.11`, and the 2.15.0 wheels on the test channel are `cp311` to `cp315` (plus `cp314t` and `cp315t`), with no `cp310`. `pyproject.toml` was not updated, so the 2.15.0 wheels carry: ``` Requires-Python: >=3.10 Classifier: Programming Language :: Python :: 3.10 ``` That tells PyPI and `pip show` that 3.10 is supported, and makes `uv` and Poetry try to resolve 2.15 for Python 3.10 and fail on a missing wheel instead of reporting that 3.11 is required. The PRs that dropped 3.10 from the builds (pytorch#198233, pytorch#199398) only changed build and CI config and did not touch `pyproject.toml`. ## Lint Ruff derives its target version from `requires-python`, so raising it to 3.11 enabled the pyupgrade rules for 3.11 and failed the Lint job: 257 findings in 162 files (UP036 obsolete `sys.version_info` checks 104, UP035 `typing_extensions` imports 101, UP044 `Unpack` 30, UP017 `datetime.UTC` 20, UP041 2). I reproduced the same counts locally with `ruff==0.14.4` and the repo config. 134 of the fixes need `--unsafe-fixes`, and they touch `torch/_dynamo` files that the Python 3.10 cleanup PRs (pytorch#199417) are editing, so they do not belong in a metadata change. This PR pins `target-version = "py310"` in `[tool.ruff]`, which restores the previous lint behavior: on the 162 files `ruff check` passes, and `ruff format --check` reports the same single file (`torch/utils/checkpoint.py`) as on the base commit. The pin should be removed together with the Python 3.10 code cleanup. ## Not changed - `[tool.ruff]` settings and the `# TODO: Remove Python-3.10 specific suppressions` comment. - The Python 3.10 code paths in dynamo; pytorch#199417 handles those. ## Testing `pyproject.toml` parses (`tomllib`), and `project.requires-python` is `>=3.11` with the classifiers `3 :: Only`, `3.11` to `3.15`. With the pin, `ruff check` (ruff 0.14.4, repo config) passes on all 162 files the Lint job had flagged. I did not build a wheel or an sdist from this change. Cherry-pick to `release/2.15` is a separate PR. Pull Request resolved: pytorch#202271 Approved by: https://github.com/huydhn, https://github.com/albanD
) ## Summary Raise the minimum Python in the package metadata from 3.10 to 3.11, to match what 2.15 builds. - `pyproject.toml`: `requires-python = ">=3.11"`, and remove the `Programming Language :: Python :: 3.10` classifier. - `README.md`: the source-build prerequisite says "Python 3.11 or later". ## Why The binary build matrix no longer includes Python 3.10: `FULL_PYTHON_VERSIONS` in `.github/scripts/generate_binary_build_matrix.py` starts at `3.11`, and the 2.15.0 wheels on the test channel are `cp311` to `cp315` (plus `cp314t` and `cp315t`), with no `cp310`. `pyproject.toml` was not updated, so the 2.15.0 wheels carry: ``` Requires-Python: >=3.10 Classifier: Programming Language :: Python :: 3.10 ``` That tells PyPI and `pip show` that 3.10 is supported, and makes `uv` and Poetry try to resolve 2.15 for Python 3.10 and fail on a missing wheel instead of reporting that 3.11 is required. The PRs that dropped 3.10 from the builds (pytorch#198233, pytorch#199398) only changed build and CI config and did not touch `pyproject.toml`. ## Not changed - `[tool.ruff]` settings and the `# TODO: Remove Python-3.10 specific suppressions` comment. - The Python 3.10 code paths in dynamo; pytorch#199417 handles those. ## Testing `pyproject.toml` parses (`tomllib`), and `project.requires-python` is `>=3.11` with the classifiers `3 :: Only`, `3.11` to `3.15`. I did not build a wheel or an sdist from this change. Cherry-pick to `release/2.15` is a separate PR. Pull Request resolved: pytorch#202271 Approved by: https://github.com/huydhn, https://github.com/albanD
) ## Summary Raise the minimum Python in the package metadata from 3.10 to 3.11, to match what 2.15 builds. - `pyproject.toml`: `requires-python = ">=3.11"`, and remove the `Programming Language :: Python :: 3.10` classifier. - `README.md`: the source-build prerequisite says "Python 3.11 or later". - `[tool.ruff] target-version = "py310"`: pinned so lint does not change (see below). ## Why The binary build matrix no longer includes Python 3.10: `FULL_PYTHON_VERSIONS` in `.github/scripts/generate_binary_build_matrix.py` starts at `3.11`, and the 2.15.0 wheels on the test channel are `cp311` to `cp315` (plus `cp314t` and `cp315t`), with no `cp310`. `pyproject.toml` was not updated, so the 2.15.0 wheels carry: ``` Requires-Python: >=3.10 Classifier: Programming Language :: Python :: 3.10 ``` That tells PyPI and `pip show` that 3.10 is supported, and makes `uv` and Poetry try to resolve 2.15 for Python 3.10 and fail on a missing wheel instead of reporting that 3.11 is required. The PRs that dropped 3.10 from the builds (pytorch#198233, pytorch#199398) only changed build and CI config and did not touch `pyproject.toml`. ## Lint Ruff derives its target version from `requires-python`, so raising it to 3.11 enabled the pyupgrade rules for 3.11 and failed the Lint job: 257 findings in 162 files (UP036 obsolete `sys.version_info` checks 104, UP035 `typing_extensions` imports 101, UP044 `Unpack` 30, UP017 `datetime.UTC` 20, UP041 2). I reproduced the same counts locally with `ruff==0.14.4` and the repo config. 134 of the fixes need `--unsafe-fixes`, and they touch `torch/_dynamo` files that the Python 3.10 cleanup PRs (pytorch#199417) are editing, so they do not belong in a metadata change. This PR pins `target-version = "py310"` in `[tool.ruff]`, which restores the previous lint behavior: on the 162 files `ruff check` passes, and `ruff format --check` reports the same single file (`torch/utils/checkpoint.py`) as on the base commit. The pin should be removed together with the Python 3.10 code cleanup. ## Not changed - `[tool.ruff]` settings and the `# TODO: Remove Python-3.10 specific suppressions` comment. - The Python 3.10 code paths in dynamo; pytorch#199417 handles those. ## Testing `pyproject.toml` parses (`tomllib`), and `project.requires-python` is `>=3.11` with the classifiers `3 :: Only`, `3.11` to `3.15`. With the pin, `ruff check` (ruff 0.14.4, repo config) passes on all 162 files the Lint job had flagged. I did not build a wheel or an sdist from this change. Cherry-pick to `release/2.15` is a separate PR. Pull Request resolved: pytorch#202271 Approved by: https://github.com/huydhn, https://github.com/albanD
) ## Summary Raise the minimum Python in the package metadata from 3.10 to 3.11, to match what 2.15 builds. - `pyproject.toml`: `requires-python = ">=3.11"`, and remove the `Programming Language :: Python :: 3.10` classifier. - `README.md`: the source-build prerequisite says "Python 3.11 or later". - `[tool.ruff] target-version = "py310"`: pinned so lint does not change (see below). ## Why The binary build matrix no longer includes Python 3.10: `FULL_PYTHON_VERSIONS` in `.github/scripts/generate_binary_build_matrix.py` starts at `3.11`, and the 2.15.0 wheels on the test channel are `cp311` to `cp315` (plus `cp314t` and `cp315t`), with no `cp310`. `pyproject.toml` was not updated, so the 2.15.0 wheels carry: ``` Requires-Python: >=3.10 Classifier: Programming Language :: Python :: 3.10 ``` That tells PyPI and `pip show` that 3.10 is supported, and makes `uv` and Poetry try to resolve 2.15 for Python 3.10 and fail on a missing wheel instead of reporting that 3.11 is required. The PRs that dropped 3.10 from the builds (pytorch#198233, pytorch#199398) only changed build and CI config and did not touch `pyproject.toml`. ## Lint Ruff derives its target version from `requires-python`, so raising it to 3.11 enabled the pyupgrade rules for 3.11 and failed the Lint job: 257 findings in 162 files (UP036 obsolete `sys.version_info` checks 104, UP035 `typing_extensions` imports 101, UP044 `Unpack` 30, UP017 `datetime.UTC` 20, UP041 2). I reproduced the same counts locally with `ruff==0.14.4` and the repo config. 134 of the fixes need `--unsafe-fixes`, and they touch `torch/_dynamo` files that the Python 3.10 cleanup PRs (pytorch#199417) are editing, so they do not belong in a metadata change. This PR pins `target-version = "py310"` in `[tool.ruff]`, which restores the previous lint behavior: on the 162 files `ruff check` passes, and `ruff format --check` reports the same single file (`torch/utils/checkpoint.py`) as on the base commit. The pin should be removed together with the Python 3.10 code cleanup. ## Not changed - `[tool.ruff]` settings and the `# TODO: Remove Python-3.10 specific suppressions` comment. - The Python 3.10 code paths in dynamo; pytorch#199417 handles those. ## Testing `pyproject.toml` parses (`tomllib`), and `project.requires-python` is `>=3.11` with the classifiers `3 :: Only`, `3.11` to `3.15`. With the pin, `ruff check` (ruff 0.14.4, repo config) passes on all 162 files the Lint job had flagged. I did not build a wheel or an sdist from this change. Cherry-pick to `release/2.15` is a separate PR. Pull Request resolved: pytorch#202271 Approved by: https://github.com/huydhn, https://github.com/albanD
2.15 raises the minimum supported Python to 3.11, so stop building and uploading cp310 nightly wheels.
What changes
Drops
"3.10"fromFULL_PYTHON_VERSIONSand regenerates the binary workflows. Wheel configs per OS:The one non-obvious part
generate_libtorch_extraction_configspicked the py3.10 wheel as the source for libtorch extraction (py3.11 only forwindows-arm64, which never built 3.10):Removing 3.10 without touching this would leave no wheel config matching
preferred_python, soarch_to_configcomes out empty and libtorch silently stops being produced for every arch — no error, no failed job, just no packages.It now reads
FULL_PYTHON_VERSIONS[0]so it can't drift out of the list again, with a comment saying why. Thewindows-arm64special case becomes unnecessary once 3.10 is gone, since 3.11 is then the first entry for every OS.I verified the libtorch extraction configs are byte-identical before and after — same
build_nameset for all four OSes — and that only the 3.10 wheel configs disappear.Left alone deliberately
These are runner tooling or documented dummies, not shipped artifacts:
macos_binary_build_workflow.yml.j2setup-python: "3.10.4"— runs the libtorch extraction script on the runner. This is the one remaining3.10string in the generated nightly workflows.upload.yml.j2DESIRED_PYTHON: "3.10"— commented in place as "a dummy value for libtorch to work correctly with our batch scripts".windows_binary_build_workflow.yml.j2default('3.10')— the same dummy, for configs that carry nopython_version.Happy to bump those in a follow-up if we'd rather not have a 3.10 reference anywhere, but they're independent of what we ship.
Side effect worth flagging
get_ci_variable.py --min-python-versionreturnsFULL_PYTHON_VERSIONS[0], so lint's "Setup Min Python version" step moves from 3.10 to 3.11. That matches the 2.15 minimum, but it is a change outside the CD path.Test plan
.github/regenerate.shproduces no further diff, confirming no generated file was hand-edited.ruff checkandruff format --checkclean on the changed script.cc @malfet @seemethere @ZainRizvi
🤖 Generated with Claude Code