Skip to content

chore!: drop support for Python 3.9 - #195

Merged
frostming merged 2 commits into
dep/httpx2from
dep/drop-py39
Oct 27, 2026
Merged

frostming merged 2 commits into
dep/httpx2from
dep/drop-py39

Conversation

@frostming

Copy link
Copy Markdown
Owner

What

Raise requires-python from >=3.9 to >=3.10.

Stacked on #194 (httpx2 migration) — merge that first.

Why

Two reasons:

  1. 3.9 is EOL (October 2025).
  2. It unblocks a current httpx2. chore: migrate from httpx to httpx2 #194 had to pin the lock to httpx2==2.0.0 because that's the last release supporting 3.9; the 3.9 dependency made CI exercise a two-year-stale client. With 3.10 as the floor, the lock resolves to httpx2==2.14.0 / httpcore2==2.14.0 — 13 minor releases of fixes that were previously unreachable.

Changes

  • requires-python: >=3.9 → >=3.10; drop the 3.9 classifier
  • CI matrix and noxfile.py: drop 3.9
  • ruff target-version: py39 → py310, then applied the pyupgrade fixes this now permits:
    • Callable imports from collections.abc (auth.py, utils.py)
    • Optional[...] → X | None (MaybeAuth in auth.py)
  • pdm.lock: httpx2 2.0.0 → 2.14.0, httpcore2 2.0.0 → 2.14.0. The latter switches from certifi to truststore, so default TLS verification now uses the OS trust store.
  • README.md: requirements line said >=3.8 — stale since 3.9 was adopted; corrected to >=3.10

Breaking

Yes for downstream users on 3.9, hence the ! and a news/*.remove.md entry is warranted. Flagging rather than deciding: if you'd rather keep 3.9 for a while, close this and #194 can stay pinned to httpx2==2.0.0.

Tests

  • Python 3.10 / 3.11 / 3.14: 287 passed with httpx2 2.14.0 / 2.16.0 (3.14 has the 2 pre-existing trustme skips)
  • ruff check / ruff format --check: clean
  • mypy: same 9 pre-existing errors as main, none new

Python 3.9 is EOL since October 2025. Dropping it also lets the
dependency on httpx2 resolve to a current release instead of being
pinned back to 2.0.0, the last version supporting 3.9.

- requires-python: >=3.9 -> >=3.10
- drop the 3.9 classifier and CI/nox matrix entry
- bump ruff target-version to py310 and apply the resulting pyupgrade
  fixes (Callable from collections.abc, X | None annotations)
- refresh pdm.lock: httpx2 2.0.0 -> 2.14.0, httpcore2 2.0.0 -> 2.14.0
@frostming
frostming merged commit 7341f34 into dep/httpx2 Oct 27, 2026
16 checks passed
@frostming
frostming deleted the dep/drop-py39 branch October 27, 2026 02:49
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