Drop Python 3.9 support, add Python 3.14

Merged
KL
5mo ago
+69-1324

Summary

Shifts the supported Python range from 3.9-3.13 to 3.10-3.14.

Changes:

  • requires-python: >=3.9 -> >=3.10 in src/httpx2/pyproject.toml. src/httpcore2/pyproject.toml was >=3.8, also raised to >=3.10.
  • Classifiers: dropped Python :: 3.8 (httpcore2) and Python :: 3.9 (httpx2), added Python :: 3.14 to both.
  • CI matrix in .github/workflows/main.yml: ["3.9", "3.10", "3.11", "3.12", "3.13"] -> ["3.10", "3.11", "3.12", "3.13", "3.14"].
  • tests/httpx2/conftest.py: asyncio.get_event_loop() -> asyncio.get_running_loop() inside the TestServer.serve coroutine. get_event_loop() was removed in 3.14 when no loop is running; the new call is correct since serve is always invoked from within a running loop.
  • uvicorn pin: relaxed uvicorn==0.35.0 -> uvicorn>=0.35 (lockfile now resolves to 0.46.0). 0.35 hangs on 3.14; 0.46 supports 3.14 cleanly.

Test plan

  • UV_PYTHON=3.13 uv run pytest: 1637 passed, 1 skipped, 0 failed.
  • UV_PYTHON=3.14 uv run pytest: 1637 passed, 1 skipped, 0 failed.
  • scripts/check clean.
  • CI green across the new matrix.

AI Disclaimer

This PR was developed with the assistance of either Claude or Codex. I've reviewed and verified the changes.