MAINT Add Python 3.14 support#1130
Conversation
|
Looks like it's failing right now. There may be a few dependencies that aren't yet 3.14 compatible, of course. |
|
Yes. The blockers I see so far are:
Are there others? |
Agreed. |
|
Heads up I'll leave this open until everything works fine in 3.14 and 3.14t because people expect things to work. |
|
%
|
|
I'm about to remove semantic-kernel in #1005 but the others are all important. |
|
@cclauss are you still interested in continuing with this? No pressure, just wanted to check in since it's been a while since we checked in on this. |
- Bump requires-python upper bound from <3.14 to <3.15 - Add Python 3.14 classifier - Add Python 3.14 to CI test matrix - Add python_version < 3.14 marker for gradio (blocked by pydantic-core) - Bump actions/checkout v3->v5, actions/setup-python v3->v6, actions/cache v3->v4 Blockers resolved since PR microsoft#1130 was opened: - datasets/PyArrow: supported since PyArrow 22+ - pyodbc: supported since v5.3.0 - spacy: supported since v3.8.10 - torch: supported since PyTorch 2.10 - semantic-kernel: removed from dependencies Remaining blocker (optional extra only): - gradio: blocked by pydantic-core missing 3.14 wheels Relates to microsoft#1130 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Bump requires-python upper bound from <3.14 to <3.15 - Add Python 3.14 classifier - Add Python 3.14 to CI test matrix - Add python_version < 3.14 marker for gradio (blocked by pydantic-core) - Bump actions/checkout v3->v5, actions/setup-python v3->v6, actions/cache v3->v4 Blockers resolved since PR microsoft#1130 was opened: - datasets/PyArrow: supported since PyArrow 22+ - pyodbc: supported since v5.3.0 - spacy: supported since v3.8.10 - torch: supported since PyTorch 2.10 - semantic-kernel: removed from dependencies Remaining blocker (optional extra only): - gradio: blocked by pydantic-core missing 3.14 wheels Relates to microsoft#1130 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Bump requires-python upper bound from <3.14 to <3.15 - Add Python 3.14 classifier - Add Python 3.14 to CI test matrix - Add python_version < 3.14 marker for gradio (blocked by pydantic-core) - Bump actions/checkout v3->v5, actions/setup-python v3->v6, actions/cache v3->v4 Blockers resolved since PR microsoft#1130 was opened: - datasets/PyArrow: supported since PyArrow 22+ - pyodbc: supported since v5.3.0 - spacy: supported since v3.8.10 - torch: supported since PyTorch 2.10 - semantic-kernel: removed from dependencies Remaining blocker (optional extra only): - gradio: blocked by pydantic-core missing 3.14 wheels Relates to microsoft#1130 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Bump requires-python upper bound from <3.14 to <3.15 - Add Python 3.14 classifier - Add Python 3.14 to CI test matrix - Add python_version < 3.14 marker for gradio (blocked by pydantic-core) - Bump actions/checkout v3->v5, actions/setup-python v3->v6, actions/cache v3->v4 Blockers resolved since PR microsoft#1130 was opened: - datasets/PyArrow: supported since PyArrow 22+ - pyodbc: supported since v5.3.0 - spacy: supported since v3.8.10 - torch: supported since PyTorch 2.10 - semantic-kernel: removed from dependencies Remaining blocker (optional extra only): - gradio: blocked by pydantic-core missing 3.14 wheels Relates to microsoft#1130 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
uv lock --upgrade-package numpy resolves numpy 2.4.4 for Python 3.14, which includes cp314 Windows wheels. numpy 2.2.6 had no Python 3.14 wheels, causing a source build that segfaulted on Windows. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
Note: for v0.13.0 we're removing gradio as a dependency. I suggest we wait until 0.12.2 is released so that we can remove gradio for 0.13.0 which will simplify some of the py3.14-related concerns. |
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
spacy 3.8.14 has the 3.14 classifier on PyPI but still crashes at runtime due to pydantic v1 incompatibility (ConfigError on REGEX). Also broaden the except clause in is_spacy_installed() to catch non-ImportError failures during import. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
spacy 3.8.12+ migrated off pydantic v1 via confection v1.3 + thinc v8.3.13, providing full Python 3.14 support. The lockfile was pinning 3.8.11 which still used pydantic v1 and crashed on 3.14. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
spacy 3.8.12 and 3.8.13 have cp314 wheels but 3.8.14 dropped them. Pin to >=3.8.13,!=3.8.14 so the resolver picks 3.8.13 for Python 3.14 until a fixed release is available. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
numpy 2.2.x has no cp314 wheels and segfaults on Windows 3.14. Use environment markers to require numpy>=2.3.0 on Python 3.14+ while keeping >=1.26.0 for older Pythons. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
hannahwestra25
left a comment
There was a problem hiding this comment.
could you update:
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
## Description Adds Python 3.14 to RAMPART's officially supported/tested versions. ### Changes - `pyproject.toml`: added `Programming Language :: Python :: 3.14` classifier. `requires-python = ">=3.11"` already permitted 3.14, no constraint change needed. - `.github/workflows/ci.yml`: added `3.14` to the test matrix. - `.github/ISSUE_TEMPLATE/bug_report.yml`: added `3.14` to the Python version dropdown. - `uv.lock`: refreshed (no resolution changes). ### Verification - `uv lock` resolves all 163 transitive dependencies cleanly on 3.14. - `uv sync --python 3.14` installs cleanly - Full test suite passes locally on CPython 3.14.3 ### Notes on what we deliberately did *not* change - No upper cap on `requires-python` — per [PyPA guidance](https://iscinumpy.dev/post/bound-version-constraints/), capping propagates pain to downstream consumers. - Pyright `pythonVersion` stays pinned to the floor (`3.11`) so type-checks catch code that wouldn't run on the oldest supported version. - Ruff has no explicit `target-version`; it derives from `requires-python`, which is correct. ### Related PyRIT added 3.14 support in microsoft/PyRIT#1130, which is what unblocked picking it up here (pyrit is our heaviest transitive constraint). ## Breaking changes None ## Checklist - [X] `pre-commit run --all-files` passes - [X] Tests added or updated for changes - [X] Documentation updated
https://www.python.org/downloads/release/python-3140/
Changes
CI matrix
main-job: strategy: matrix: - python: ["3.10", "3.11", "3.12", "3.13"] + python: ["3.10", "3.11", "3.12", "3.13", "3.14"]requires-pythonupper bound to<3.15Programming Language :: Python :: 3.14classifierfail-fast: falseso all matrix jobs run even if one failsgradioandspacywithpython_version < '3.14'(not yet compatible)uv sync --python=3.14blockerspyodbctorchnumpypython_version < '3.14'python_version < '3.14'(pydantic v1 incompatible)Also bumped (could be automated by Dependabot):
Tests and Documentation
No new tests needed — this is a CI/packaging change. Existing unit tests validate Python 3.14 compatibility.