Skip to content

Allow Python 3.15 / 3.15t builds#21235

Open
atalman wants to merge 1 commit into
pytorch:mainfrom
atalman:atalman/allow-python-3.15
Open

Allow Python 3.15 / 3.15t builds#21235
atalman wants to merge 1 commit into
pytorch:mainfrom
atalman:atalman/allow-python-3.15

Conversation

@atalman

@atalman atalman commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

Bumps the supported Python upper bound to <3.16 so ExecuTorch can be built and installed on Python 3.15 (including free-threaded 3.15t, which reports version 3.15).

Two changes are needed, not just the version bump:

  • pyproject.toml: requires-python >=3.10,<3.15 -> >=3.10,<3.16.
  • install_utils.py: python_is_compatible() used the default in operator on the SpecifierSet, which excludes pre-releases, so a pre-release interpreter like 3.15.0b4 was rejected even once 3.15 is in range. Switched to SpecifierSet.contains(..., prereleases=True) (3.16 pre-releases stay excluded by the <3.16 bound).

Surfaced while enabling Python 3.15 / 3.15t Linux wheel builds in pytorch/test-infra#8148.

Authored with assistance from Claude Code (AI assistant).

Bump the supported Python upper bound to <3.16 so ExecuTorch can be built and
installed on Python 3.15 (including the free-threaded 3.15t build, which
reports version 3.15).

Two changes are needed, not just the version bump:
  - pyproject.toml: requires-python ">=3.10,<3.15" -> ">=3.10,<3.16".
  - install_utils.py: python_is_compatible() compared the interpreter against
    the SpecifierSet with the default `in` operator, which excludes
    pre-releases. A pre-release interpreter such as 3.15.0b4 was therefore
    rejected even once 3.15 is in range. Use
    SpecifierSet.contains(..., prereleases=True) so in-range pre-release
    interpreters are accepted (3.16 pre-releases remain excluded by the <3.16
    bound).

Surfaced while enabling Python 3.15 / 3.15t Linux wheel builds in
pytorch/test-infra#8148.

Test Plan:

    python -c "import packaging.specifiers as S, packaging.version as V; \
      ss=S.SpecifierSet('>=3.10,<3.16'); \
      print(ss.contains(V.parse('3.15.0b4'), prereleases=True))"   # True
    # 3.9 and 3.16 pre-releases still report False.

Authored with assistance from Claude Code (AI assistant).
@pytorch-bot

pytorch-bot Bot commented Jul 23, 2026

Copy link
Copy Markdown

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/21235

Note: Links to docs will display an error until the docs builds have been completed.

❌ 12 New Failures, 16 Unrelated Failures

As of commit a9843d8 with merge base 3802831 (image):

NEW FAILURES - The following jobs have failed:

FLAKY - The following jobs failed but were likely due to flakiness present on trunk:

BROKEN TRUNK - The following jobs failed but were present on the merge base:

👉 Rebase onto the `viable/strict` branch to avoid these failures

This comment was automatically generated by Dr. CI and updates every 15 minutes.

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Jul 23, 2026
@github-actions

Copy link
Copy Markdown

This PR needs a release notes: label

If your change should be included in the release notes (i.e. would users of this library care about this change?), please use a label starting with release notes:. This helps us keep track and include your important work in the next release notes.

To add a label, you can comment to pytorchbot, for example
@pytorchbot label "release notes: none"

For more information, see
https://github.com/pytorch/pytorch/wiki/PyTorch-AutoLabel-Bot#why-categorize-for-release-notes-and-how-does-it-work.

atalman added a commit to atalman/test-infra that referenced this pull request Jul 23, 2026
Point the "Test Build Linux Wheels on only selected python versions" self-test
at 3.15 / 3.15t (was 3.10 / 3.11) so it exercises the new preview versions.
This builds pytorch/executorch, which requires the matching Python support
landing in executorch first (pytorch/executorch#21235).

Authored with assistance from Claude Code (AI assistant).
@atalman
atalman marked this pull request as ready for review July 23, 2026 00:33

@albanD albanD 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.

SGTM!

@digantdesai digantdesai left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM. Is trying the no-GIL version is the main motivation?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ciflow/cuda ciflow/mlx ciflow/trunk CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants