Skip to content

build: add support for python 3.14#19254

Open
CandiedCode wants to merge 1 commit intopytorch:mainfrom
CandiedCode:python_314
Open

build: add support for python 3.14#19254
CandiedCode wants to merge 1 commit intopytorch:mainfrom
CandiedCode:python_314

Conversation

@CandiedCode
Copy link
Copy Markdown

Summary

Fixes #16750

While scanning my docker images for CVE's there are several that are being found due to python 3.13

NAME                INSTALLED                     FIXED IN     TYPE    VULNERABILITY        SEVERITY    EPSS           RISK 
python              3.13.13                                    binary  CVE-2025-12781       Medium      < 0.1% (4th)   < 0.1  
python              3.13.13                                    binary  CVE-2026-1502        Medium      < 0.1% (18th)  < 0.1  
python              3.13.13                                    binary  CVE-2026-3298        High        < 0.1% (20th)  < 0.1  
python              3.13.13                                    binary  CVE-2026-4786        High        < 0.1% (5th)   < 0.1  
python              3.13.13                                    binary  CVE-2026-6019        Low         < 0.1% (15th)  < 0.1  
python              3.13.13                                    binary  CVE-2026-6100        Critical    0.2% (35th)    0.1    

Pytorch and vllm support python 3.14, but I'm unable to upgrade until Executorch supports 3.14 as well.

Test plan

I added 3.14 to CI for it to run all the tests

Copilot AI review requested due to automatic review settings May 1, 2026 12:42
@pytorch-bot
Copy link
Copy Markdown

pytorch-bot Bot commented May 1, 2026

🔗 Helpful Links

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

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

⚠️ 13 Awaiting Approval, 1 Unrelated Failure

As of commit f0f1bb7 with merge base 3be4546 (image):

AWAITING APPROVAL - The following workflows need approval before CI can run:

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 May 1, 2026
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 1, 2026

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.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR updates ExecuTorch’s packaging metadata, documentation, and CI matrices to recognize/support Python 3.14 (issue #16750), primarily by widening the declared supported Python range and running CI/wheel builds against 3.14.

Changes:

  • Expand supported Python range in packaging metadata (requires-python, classifiers) and formatting config (Black target versions).
  • Update multiple docs/READMEs to advertise Python 3.14 support.
  • Add Python 3.14 to GitHub Actions test and wheel build matrices.

Reviewed changes

Copilot reviewed 15 out of 15 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
pyproject.toml Add Python 3.14 classifier; widen requires-python to <3.15; include py314 for Black.
docs/source/using-executorch-building-from-source.md Update documented supported Python range to 3.10–3.14.
docs/source/raspberry_pi_llama_tutorial.md Update prerequisite Python range and version-check guidance to 3.10–3.14.
docs/source/quick-start-section.md Update prerequisite Python range to 3.10–3.14.
docs/source/pathway-quickstart.md Update virtualenv Python range guidance to 3.10–3.14.
docs/source/pathway-beginner.md Update prerequisites to 3.10–3.14.
docs/source/getting-started.md Update system requirements to 3.10–3.14.
README-wheel.md Update supported Python versions list to include 3.14.
.github/workflows/pull.yml Add 3.14 to the test-qnn-wheel-packages-linux matrix.
.github/workflows/build-wheels-windows.yml Add 3.14 to wheel build matrix.
.github/workflows/build-wheels-macos.yml Add 3.14 to wheel build matrix.
.github/workflows/build-wheels-linux.yml Add 3.14 to wheel build matrix.
.github/workflows/build-wheels-aarch64-linux.yml Add 3.14 to wheel build matrix.
.claude/skills/building/SKILL.md Update Python version guidance to include 3.14.
.ci/scripts/test_coreml_bc.sh Update comment about Python compatibility for backward-compat CoreML test script.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

fail-fast: false
matrix:
python-version: [ "3.10", "3.11", "3.12", "3.13" ]
python-version: [ "3.10", "3.11", "3.12", "3.13", "3.14" ]
Copy link

Copilot AI May 1, 2026

Choose a reason for hiding this comment

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

The QNN wheel test job now runs on Python 3.14, but the repo’s QNN backend rules document that Python 3.13+ (NumPy 2.x) is incompatible with the PyQnnManagerAdaptor pybind11 layer and breaks QNN compilation. Unless that constraint has been lifted, consider excluding 3.14 from this QNN-specific matrix (or pinning the job to Python 3.12 + numpy<2.0 / updating the QNN pybind layer) so CI doesn’t add a known-failing configuration.

Suggested change
python-version: [ "3.10", "3.11", "3.12", "3.13", "3.14" ]
python-version: [ "3.10", "3.11", "3.12" ]

Copilot uses AI. Check for mistakes.
Comment on lines +26 to +28
# Find a compatible Python (3.10–3.14). On macOS with only Homebrew Python 3.14+,
# install a compatible version first: brew install python@3.12
python3.12 -m venv .executorch-venv # or python3.11, python3.10, python3.13
python3.12 -m venv .executorch-venv # or python3.11, python3.10, python3.13, python3.14
Copy link

Copilot AI May 1, 2026

Choose a reason for hiding this comment

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

This note is internally inconsistent now: it says Python 3.10–3.14 is compatible, but then implies Homebrew Python 3.14+ is incompatible and suggests installing 3.12. Please update the example to match the supported range (e.g., only suggest installing an older Python if the user has 3.15+), so readers aren’t told to downgrade unnecessarily.

Copilot uses AI. Check for mistakes.
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

3 participants