Skip to content

fix!: Support Python 3.10 through 3.14 - #119

Merged
robcaulk merged 2 commits into
mainfrom
em/py-version-support
Oct 31, 2026
Merged

robcaulk merged 2 commits into
mainfrom
em/py-version-support

Conversation

@emmy-devop

@emmy-devop emmy-devop commented Oct 31, 2026 •

Copy link
Copy Markdown
Collaborator

Requested by @drafty

🔴 Review tier: HIGH — human review required

  • CI: changes .github/workflows/ci.yml; branch/PR workflows execute on the canonical repository. Matrix is exactly Python 3.10–3.14.
  • Contract: drops Python 3.8/3.9 compatibility; Python 3.10 remains supported.
  • Release: merging to main triggers SDK release automation and publication to PyPI. Recommend a minor release (0.15.0), not a patch; the breaking conventional subject must be preserved when squashing. No version was manually bumped, and no tag/publication was performed.
  • Future release behavior: major_version_zero = true keeps breaking changes on 0.x until someone deliberately cuts 1.0. The current breaking subject previews 0.15.0 (MINOR).
  • Deps: regenerates the lock and refreshes native packages needed for Python 3.14 plus coverage and their transitive requirements.
  • Size: 16 files, predominantly minimal typing-import replacements and generated lock data.

What / why

  • Set requires-python = ">=3.10"; classifiers, README badge and CI explicitly cover 3.10, 3.11, 3.12, 3.13 and 3.14 only. No 3.15 job or classifier.
  • Set Ruff py310 and mypy 3.10. Replace obsolete typing backports with standard-library Annotated, TypeAlias, TypeGuard, TypeVar and TypedDict; no sweeping syntax modernization and no version guards were present.
  • Add the next-release compatibility note to README; leave generated CHANGELOG and package version untouched. The original baseline still advertised 3.8 as well as 3.9, so both are removed to match the requested minimum.
  • Regenerate with uv lock, then uv lock --upgrade-package orjson --upgrade-package pydantic --upgrade-package coverage. Original orjson 3.10.15 lacked a Python 3.14 wheel and its source build failed (missing C linker); old pydantic-core also needed a source build. Updated lock uses orjson 3.13.0, Pydantic 2.14.2/core 2.50.2, typing-extensions 4.16.0 and typing-inspection 0.4.4. Coverage resolves to 7.16.2 on Python 3.10 and 7.17.0 on newer versions. Unsupported-old-Python lock forks were removed. Published runtime metadata now uses Python-conditional minimums: Python >=3.14 requires orjson>=3.11.3 and pydantic[email]>=2.12; Python 3.10–3.13 retains orjson>=3.9.10 and pydantic[email]>=2.10.4. orjson 3.11.3 publishes CPython 3.14 wheels. The follow-up lock regeneration changes dependency markers only, not resolved package versions.

Release note

Python 3.8 and 3.9 are no longer supported. Upgrade to Python 3.10 or newer before upgrading this SDK. Python 3.13 and 3.14 now receive CI coverage. Recommend a minor version bump because this breaks installation compatibility for older Python users.

How tested

  • Locked dependency installation succeeded on all five CPython versions: 3.10.22, 3.11.18, 3.12.16, 3.13.18 and 3.14.10.
  • python -m coverage run -m pytest -q: 183 passed on each version (915 total).
  • ruff check asknews_sdk, ruff check ., git diff --check: passed.
  • uv build --wheel: passed; wheel Requires-Python and exact classifiers validated.
  • Optional mypy check reports the same three pre-existing assignment/implicit-Optional errors in dto/chat.py and api/wiki.py as an untouched main archive checked with the same tool and Python target. Not changed here; mypy is not a CI task.
  • The cookbook exclusion from fix: Add stream_sources_inline and typed deepnews source batch chunks #118 is already on the fetched main baseline, so the known cookbook lint issue does not reproduce. No cookbook edits.

Python 3.10 follow-up

No current locked runtime dependency requires Python >=3.11, and the full locked runtime/test environment succeeds on 3.10. Native dependencies orjson, pydantic-core and cffi now require >=3.10. Coverage 7.17.0 requires >=3.11, but it is development-only and the lock correctly selects 7.16.2 on 3.10. A future 3.10 removal should be mechanically straightforward (metadata/classifier/matrix/tool targets/README plus regenerated lock and full tests), but is a separate breaking support-policy change; it is not included here.

Risk / rollback

Human review required for CI and the release boundary. Published consumers resolve dependency ranges rather than this lock; Python 3.14 now has compatible declared minimums, while older supported Python bounds remain unchanged. Breaking changes remain minor 0.x releases until a deliberate 1.0 release; this changes future release behavior. Revert before merge to undo; after publication a corrective release is required. No release workflows, credentials, endpoint contracts or production systems were modified.

Review-blocker validation

  • Fresh lock-independent uv pip install . installations on Python 3.14 and 3.10 succeeded.
  • Python 3.14 --resolution lowest-direct selected orjson 3.11.3 and Pydantic 2.12.0.
  • All three unlocked environments passed 183 tests each (549 total); installed SDK imports also passed outside the checkout.
  • Ruff, git diff --check, wheel build and installed Requires-Dist marker inspection passed.
  • Non-mutating preview with current Commitizen 4.19.3 (the release workflow uses the current Commitizen action): cz bump --dry-run:
chore(release): Release 0.15.0
tag to create: 0.15.0
increment detected: MINOR
  • Locked development Commitizen 3.31.0 does not recognize the pre-existing uv version provider; the successful preview used current Commitizen in isolation. No version, changelog or tag was changed.

@robcaulk
robcaulk merged commit 9e9fe5a into main Oct 31, 2026
10 checks passed
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