Add Python 3.14 support#20452
Conversation
🔗 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. ❗ 1 Active SEVsThere are 1 currently active SEVs. If your PR is affected, please view them below: ❌ 6 New Failures, 2 Unrelated Failures, 4 Unclassified FailuresAs of commit c6f4bf3 with merge base 1b726b2 ( NEW FAILURES - The following jobs have failed:
UNCLASSIFIED FAILURES - DrCI could not classify the following jobs because the workflow did not run on the merge base. The failures may be pre-existing on trunk or introduced by this PR:
FLAKY - The following job failed but was likely due to flakiness present on trunk:
BROKEN TRUNK - The following job failed but was 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
|
Bump pybind11 from v2.13.6 to v3.0.4, which adds Python 3.14 compatibility. Bridge the legacy PYTHON_EXECUTABLE cmake variable to Python_EXECUTABLE so pybind11 3.0's FindPython module picks up the correct interpreter. 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. py::enum_ usage in two pybinding files is deprecated in pybind11 3.0 but still functional; migration to py::native_enum can follow separately. This PR was authored with Claude. Test Plan: - cmake configure succeeded with pybind11 3.0.4 (--preset pybind) - 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
1aa78e5 to
c6f4bf3
Compare
Summary
Bump pybind11 from v2.13.6 to v3.0.4, which adds Python 3.14 compatibility. Bridge the legacy PYTHON_EXECUTABLE cmake variable to Python_EXECUTABLE so pybind11 3.0's FindPython module picks up the correct interpreter.
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.
py::enum_ usage in two pybinding files is deprecated in pybind11 3.0 but still functional; migration to py::native_enum can follow separately.
Fixes #16750
This PR was authored with Claude.
Test Plan