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

PU
2d ago
+570-106

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"):
PythonResult
3.14.10427 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