Migrate HTTP client from httpx to httpx2 #26

Merged
coding-agent-marvin8 merged 0 commits from refs/pull/26/head into main 2026-06-21 04:32:31 +00:00
coding-agent-marvin8 commented 2026-06-21 03:14:16 +00:00 (Migrated from codeberg.org)

Replaces httpx with Pydantic's actively maintained fork httpx2 (v2.4.0). The original httpx project saw limited upstream activity; httpx2 provides the same API surface with a commitment to timely security updates.

Changes:

  • Runtime dep: httpx[http2]~=0.28.1httpx2[http2]~=2.4.0
  • All import httpximport httpx2 in source and tests
  • Test HTTP mocking: replaced pytest-httpx fixture with httpx2.MockTransport — no external mocking library needed, uses httpx2's own transport injection API
  • Removed pytest-httpx from the pytest dependency group entirely

The noxfile is unchanged; the MockTransport approach requires only the packages already installed by nox.

254 tests pass across Python 3.11–3.14t.

Closes #25

Replaces httpx with Pydantic's actively maintained fork httpx2 (v2.4.0). The original httpx project saw limited upstream activity; httpx2 provides the same API surface with a commitment to timely security updates. Changes: - Runtime dep: `httpx[http2]~=0.28.1` → `httpx2[http2]~=2.4.0` - All `import httpx` → `import httpx2` in source and tests - Test HTTP mocking: replaced `pytest-httpx` fixture with `httpx2.MockTransport` — no external mocking library needed, uses httpx2's own transport injection API - Removed `pytest-httpx` from the pytest dependency group entirely The noxfile is unchanged; the `MockTransport` approach requires only the packages already installed by nox. 254 tests pass across Python 3.11–3.14t. Closes #25
Sign in to join this conversation.
No description provided.