Skip to content

feat: support Python 3.14 (default in Ubuntu 26.04 LTS) - #537

Open
pulse-mind wants to merge 1 commit into
Unstructured-IO:mainfrom
pulse-mind:feat/python-3.14-support
Open

pulse-mind wants to merge 1 commit into
Unstructured-IO:mainfrom
pulse-mind:feat/python-3.14-support

Conversation

@pulse-mind

@pulse-mind pulse-mind commented Nov 19, 2026 •

Copy link
Copy Markdown

Summary

Python 3.14 is the default Python of Ubuntu 26.04 LTS. unstructured-inference currently declares requires-python = ">=3.11, <3.14", so pip install unstructured-inference (and therefore pip install "unstructured[pdf]") refuses to install there unless users pass --ignore-requires-python.

This PR mirrors the 3.13 enablement in #511, one version up:

  • Relax requires-python from <3.14 to <3.15
  • Add the Programming Language :: Python :: 3.14 classifier
  • Add Python 3.14 to the CI lint and test matrices
  • Update the README's stated Python range
  • Relock uv.lock (incremental uv lock, no --upgrade): only new 3.14 resolution markers / cp314 wheels, plus ipython (dev group only) collapsed from 9.12.0/9.13.0 to 9.13.0
  • CHANGELOG entry under the unreleased 1.6.18

No library code changes and no dependency floor bumps were needed: every compiled dependency in the lock (torch, onnxruntime, onnx, opencv-python, scipy, rapidfuzz, pandas, matplotlib, …) already publishes cp314 or abi3 wheels.

Companion PR in unstructured: Unstructured-IO/unstructured#4814. Both are needed for pip users: pip enforces the requires-python upper bound of every package in the dependency tree, so unstructured[pdf] stays uninstallable on 3.14 until this package allows it too.

Validation

Run locally (macOS arm64, uv 0.13.9 — same uv as CI's setup-uv@v5), following the Makefile targets:

  • uv lock --check: OK
  • uv sync --locked --all-groups -p 3.14: OK, no source builds
  • make check-ruff on 3.14: OK
  • make test (pytest -n auto -m "not slow"):
Python Result
3.14.10 427 passed, 1 skipped (test_elements.py:601 "Not implemented"), coverage 95 %
3.13.18 (baseline) 427 passed, 1 skipped (same test), coverage 95 %

Identical results on both versions; the only warning (TT_TABLE_CONF int env var in test_config.py) is pre-existing and shows up on 3.13 too.

The test model fetched from S3 in CI (test_ci_model.onnx) is not available outside CI, so the 3.14 CI job will be the final word on the tests that use it.

Downstream check: unstructured[pdf] hi_res / OCR partitioning on 3.14 (installed with --ignore-requires-python) gives the same output as on 3.12 on a private 38-case OCR regression suite of scanned PDFs (same results, 38/38).

🤖 Generated with Claude Code

View guided diff

- requires-python <3.15 and Python 3.14 classifier
- add 3.14 to CI lint and test matrices
- README Python range
- relock uv.lock (incremental, no --upgrade)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@pulse-mind

Copy link
Copy Markdown
Author

The test jobs fail at Configure AWS credentials because repository secrets aren't exposed to fork PRs (same on #534). The step before it, make install, passes on all four versions including 3.14, so the lockfile resolves on Linux. Locally, make test gives 427 passed / 1 skipped on both 3.13 and 3.14. Could a maintainer run the test job with secrets (e.g. from a branch on this repo)?

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.

1 participant