Allow Python 3.15 / 3.15t builds#21235
Conversation
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).
🔗 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 FailuresAs of commit a9843d8 with merge base 3802831 ( 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. |
This PR needs a
|
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).
digantdesai
left a comment
There was a problem hiding this comment.
LGTM. Is trying the no-GIL version is the main motivation?
Bumps the supported Python upper bound to
<3.16so 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 defaultinoperator on theSpecifierSet, which excludes pre-releases, so a pre-release interpreter like3.15.0b4was rejected even once 3.15 is in range. Switched toSpecifierSet.contains(..., prereleases=True)(3.16 pre-releases stay excluded by the<3.16bound).Surfaced while enabling Python 3.15 / 3.15t Linux wheel builds in pytorch/test-infra#8148.
Authored with assistance from Claude Code (AI assistant).