Skip to content

Add Python 3.14 support#20452

Draft
rascani wants to merge 2 commits into
pytorch:mainfrom
rascani:python-3.14-support
Draft

Add Python 3.14 support#20452
rascani wants to merge 2 commits into
pytorch:mainfrom
rascani:python-3.14-support

Conversation

@rascani

@rascani rascani commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

Summary

Raise requires-python upper bound from <3.14 to <3.15 and add 3.14 to wheel build matrices and the pull request test matrix.

coremltools has no cp314 wheels yet, so its dependency gets a python_version < '3.14' marker — the CoreML backend is unavailable on 3.14 until Apple ships compatible wheels. scikit-learn is loosened from ==1.7.1 to >=1.7.1 since 1.7.2+ has cp314 wheels.

Bump black from 24.4.2 to 26.3.0 so the linter recognizes py314 as a valid target-version in pyproject.toml.

Fixes #16750

This PR was authored with Claude.

Test Plan

  • Built portable_lib, data_loader, selective_build, _llm_runner pybinding targets — all compiled clean on Python 3.13/macOS
  • Verified black 26.3.0 recognizes py314 target-version
  • lintrunner passes with updated black
  • Full CI validation on Python 3.14 will run via the updated wheel build and pull.yml workflows

@pytorch-bot

pytorch-bot Bot commented Jun 23, 2026

Copy link
Copy Markdown

🔗 Helpful Links

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

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

❌ 2 New Failures, 1 Pending, 1 Unrelated Failure

As of commit 935fef0 with merge base fa49f8f (image):

NEW FAILURES - The following jobs have failed:

FLAKY - The following job failed but was likely due to flakiness present on trunk:

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 Jun 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.

@rascani rascani force-pushed the python-3.14-support branch 2 times, most recently from c6f4bf3 to 0a8fd54 Compare June 25, 2026 21:18
Raise requires-python upper bound from <3.14 to <3.15 and add 3.14
to wheel build matrices.

coremltools has no cp314 wheels yet, so its dependency gets a
python_version < '3.14' marker — the CoreML backend is unavailable
on 3.14 until Apple ships compatible wheels. scikit-learn is
loosened from ==1.7.1 to >=1.7.1 since 1.7.2+ has cp314 wheels.

Bump black from 24.4.2 to 26.3.0 so the linter recognizes py314
as a valid target-version.

Python 3.14 is not added to the QNN wheel test matrix because
PyTorch's torch.export has a typing introspection bug on 3.14
(typing.Union.__module__). pybind11 stays at v2.13.6 — v3.0.x
is needed for pybinding support on 3.14 but currently causes
runtime segfaults. Both are tracked for follow-up.

This PR was authored with Claude.

Test Plan:
- cmake configure and pybinding build succeed (--preset pybind)
- lintrunner passes with updated black 26.3.0
- CI passes with zero new failures (DrCI: merge normally)
- Full CI validation on Python 3.14 will run via the updated
  wheel build workflows
@rascani rascani force-pushed the python-3.14-support branch from 7d0b246 to f69aa4b Compare June 26, 2026 16:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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.

Support Python 3.14

1 participant