Skip to content

MAINT Add Python 3.14 support#1130

Open
cclauss wants to merge 13 commits intomicrosoft:mainfrom
cclauss:patch-1
Open

MAINT Add Python 3.14 support#1130
cclauss wants to merge 13 commits intomicrosoft:mainfrom
cclauss:patch-1

Conversation

@cclauss
Copy link
Copy Markdown
Contributor

@cclauss cclauss commented Oct 14, 2025

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"]

Note: 3.14t (free-threaded / no-GIL build) is not yet included — too many dependencies lack free-threaded wheels.

  • Add Python 3.14 to CI test matrix
  • Bump requires-python upper bound to <3.15
  • Add Programming Language :: Python :: 3.14 classifier
  • Bump GitHub Actions (checkout v5, setup-python v6, cache v4)
  • Set fail-fast: false so all matrix jobs run even if one fails
  • Gate gradio and spacy with python_version < '3.14' (not yet compatible)
  • Upgrade numpy in lockfile (2.2.6 → 2.4.4 for Python 3.14) to fix Windows segfault

uv sync --python=3.14 blockers

Package Issue Status
pyodbc mkleehammer/pyodbc#1444 ✅ Solved in pyodbc v5.3.0
torch pytorch/pytorch#156856 ✅ Solved — cp314 wheels available since torch 2.9+
numpy No cp314 Windows wheels in 2.2.x ✅ Solved — lockfile upgraded, resolves numpy 2.4.4 for 3.14
gradio gradio-app/gradio#12118 ❌ Gated with python_version < '3.14'
spacy explosion/spaCy#13870 ❌ Gated with python_version < '3.14' (pydantic v1 incompatible)
semantic-kernel microsoft/semantic-kernel#13261 ⚠️ Not a PyRIT dependency
datasets apache/arrow#47438 ⚠️ Pure Python — installs fine, underlying pyarrow may have issues

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.

Comment thread .github/workflows/build_and_test.yml Outdated
@romanlutz
Copy link
Copy Markdown
Contributor

Looks like it's failing right now. There may be a few dependencies that aren't yet 3.14 compatible, of course.

@cclauss
Copy link
Copy Markdown
Contributor Author

cclauss commented Oct 15, 2025

@romanlutz
Copy link
Copy Markdown
Contributor

romanlutz commented Oct 15, 2025

Yes. The blockers I see so far are:

Are there others?

Agreed. I'm checking to see what pulls in spaCy anyway since that's a decent-sized dependency we don't use (I think)
Spacy is part of a recent extra addition.

@romanlutz
Copy link
Copy Markdown
Contributor

Heads up I'll leave this open until everything works fine in 3.14 and 3.14t because people expect things to work.

@cclauss cclauss marked this pull request as draft October 16, 2025 05:51
@cclauss cclauss changed the title TEST: GitHub Actions: Add Python 3.14 and 3.14t to the testing [DRAFT] TEST: GitHub Actions: Add Python 3.14 and 3.14t to the testing Oct 16, 2025
@romanlutz
Copy link
Copy Markdown
Contributor

I'm about to remove semantic-kernel in #1005 but the others are all important.

@romanlutz romanlutz self-assigned this Jan 3, 2026
@romanlutz
Copy link
Copy Markdown
Contributor

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

romanlutz added a commit to romanlutz/PyRIT that referenced this pull request Feb 27, 2026
- 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>
@romanlutz romanlutz changed the title [DRAFT] TEST: GitHub Actions: Add Python 3.14 and 3.14t to the testing MAINT Add Python 3.14 and 3.14t support Feb 27, 2026
romanlutz added a commit to cclauss/PyRIT that referenced this pull request Feb 28, 2026
- 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>
romanlutz added a commit to cclauss/PyRIT that referenced this pull request Feb 28, 2026
- 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>
romanlutz and others added 2 commits April 13, 2026 16:11
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>
@romanlutz romanlutz changed the title MAINT Add Python 3.14 and 3.14t support MAINT Add Python 3.14 support Apr 15, 2026
@cclauss cclauss marked this pull request as ready for review April 15, 2026 13:22
Comment thread tests/unit/executor/benchmark/test_fairness_bias.py
@romanlutz
Copy link
Copy Markdown
Contributor

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.

romanlutz and others added 6 commits April 15, 2026 11:18
romanlutz and others added 3 commits April 22, 2026 15:20
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants