Repository navigation
feat: support Python 3.14 (default in Ubuntu 26.04 LTS) - #4814
Open
pulse-mind wants to merge 1 commit into
Open
pulse-mind wants to merge 1 commit into
pulse-mind wants to merge 1 commit into
Conversation
- Raise requires-python to <3.15 and add the 3.14 classifier. - Add 3.14 to the CI matrices that already cover 3.11-3.13. - Exclude the paddleocr extra on 3.14: paddlepaddle publishes no cp314 wheels. - Relock: existing versions are kept for 3.11-3.13; only onnx (1.21.0 -> 1.23.2, first release with cp314 wheels) moves for all versions, and spacy 3.8.16 is used on 3.14 only. - Tests: adapt two assertions to Python 3.14 json behavior (exception notes on circular references; deeper serialization in the C encoder). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
Author
|
Companion PR for |
cragwolfe
enabled auto-merge
November 19, 2026 22:21
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Python 3.14 is the default system Python of Ubuntu 26.04 LTS, so today
pip install unstructuredfails out of the box there (requires-python = ">=3.11, <3.14"). The blockers that used to justify the cap are gone:llvmlite/numba,torch,onnxruntime,scipy,spacy,pikepdf,pi-heif,psycopg2-binary… all publish cp314 (or abi3) wheels for Linux x86_64/aarch64, macOS arm64 and Windows.This PR is intentionally minimal and limited to 3.14 support:
pyproject.toml:requires-python = ">=3.11, <3.15"and theProgramming Language :: Python :: 3.14classifier.paddleocrextra: not installed on 3.14 (paddlepaddlepublishes no cp314 wheels on any platform). Same pattern as the existing Windows/3.13 markers. The paddle OCR agent imports lazily, so nothing else changes.ci.yml:3.14added to the matrices that already cover 3.11–3.13. Light jobs onubuntu-latestalready run on theubuntu-26.04image.uv.lock: 3.11–3.13 resolutions are unchanged exceptonnx1.21.0 → 1.23.2 (1.21.0 has no cp314 wheels).spacy3.8.16 is used on 3.14 only. Most of the lock diff is the new cp314 wheel entries.jsonchanges. No library code change:test_streamed_orig_elements.py: 3.14 attacheswhen serializing …notes to the "Circular reference detected"ValueError, andpytest.raises(match=…)also matches the notes. The test now comparesstr(exc), which is just as strict on every version.test_json.py/test_ndjson.py: the "too deep to pretty-print" case is skipped on 3.14+ because the json encoder no longer raisesRecursionErrorat that depth.pretty_json_text()keeps itsRecursionErrorguard.This supersedes the older #4312 in a smaller form: no dependency forks, no lint-target bump, and existing users' pins are untouched.
Validation
uv lock --check(uv 0.13.9, same version as CI) passes for 3.11, 3.12, 3.13 and 3.14, on macOS and in alinux/amd64container.uv sync --locked --all-extras --all-groupson 3.14 installs from wheels only (just a few pure-Python sdists are built).make check: clean.make teston 3.14 (macOS arm64): 5717 passed. The only failures were the 2 json cases above (now handled), the 12 circular-reference parametrizations (now handled), andtest_weaviate_schema_is_valid, which timed out starting embedded Weaviate under-n autoload and passes when run alone. The modified test files also pass on 3.13.scripts/performance/quick_partition_bench.py, warm, median of 3, macOS arm64). No regression, identical element counts:Notes for maintainers
uv lockcan no longer re-resolve the currentmainlockfile incrementally. Evenuv lock --upgrade-package emojion an untouchedmainfails on apython_full_version == '3.12.*' and platform_machine == 's390x' and sys_platform == 'win32'split, becausepypandoc-binaryhas no wheel for it.uv lock --checkstill passes, so CI is green. A from-scratch lock resolves but upgrades ~300 packages. So this lock was produced from a fresh resolution constrained to the existing versions, and only the packages that need cp314 wheels moved. The resulting lockfile re-resolves incrementally again.unstructured-inference(used by thepdf/imageextras) andunstructured-ingeststill declarerequires-python <3.14. uv ignores upper bounds of dependencies, but pip does not, sopip install "unstructured[pdf]"on 3.14 will also need a release of those two packages with the cap lifted. Happy to open the matching PRs.Checklist
enhancement,bug, or an appropriate existing label), or ask a maintainer to apply it. (external contributor: could a maintainer please applyenhancement?)!in the title and explain impact and migration above. (not a breaking change)🤖 Generated with Claude Code