Skip to content

Add HTTPX2 transports - #3195

Merged
adamtheturtle merged 1 commit into
mainfrom
adamtheturtle/vws-python-issue-3174
Sep 7, 2026
Merged

Add HTTPX2 transports#3195
adamtheturtle merged 1 commit into
mainfrom
adamtheturtle/vws-python-issue-3174

Conversation

@adamtheturtle

@adamtheturtle adamtheturtle commented Sep 7, 2026

Copy link
Copy Markdown
Member

Closes #3174.

Adds HTTPX2Transport and AsyncHTTPX2Transport to vws.transports, which make requests with httpx2, alongside the unchanged requests and httpx transports; httpx2 becomes a runtime dependency. The new transports use only httpx2 objects, so they raise httpx2 exceptions and never mix with httpx, and the module docstring plus a new "HTTP transports" docs section explain the distinction. Timeout conversion, response conversion, closing and exception behaviour are covered by unit tests, and the VWS, Cloud Reco, VuMark and Model Target clients are driven through the new transports against VWS Python Mock, which is bumped to 2026.9.6 (released for this) as it is the first version to intercept httpx2.

🤖 Generated with Claude Code


Note

Low Risk
Additive public API and dependency with broad test coverage; default transports unchanged, though callers choosing HTTPX2 must handle httpx2 exception types.

Overview
Adds optional HTTPX2Transport and AsyncHTTPX2Transport in vws.transports so VWS clients can use Pydantic’s httpx2 stack instead of default requests / httpx. httpx2>=2.12 is a new runtime dependency; existing requests and httpx transports are unchanged.

The new transports mirror the httpx ones (shared client pooling, context managers, timeout mapping, Response conversion) and surface httpx2 exceptions only—no mixing with httpx types. Docs gain an HTTP transports section with an HTTPX2Transport example; a towncrier fragment records the change.

Tests cover unit behaviour (timeouts, empty body, close, exception type) and end-to-end flows against vws-python-mock 2026.9.6 (bumped in dev deps for httpx2 interception) for VWS, Cloud Reco, VuMark, and Model Target sync/async clients.

Reviewed by Cursor Bugbot for commit 84c3ac0. Bugbot is set up for automated code reviews on this repo. Configure here.

Add HTTPX2Transport and AsyncHTTPX2Transport, which make requests with
httpx2, the continuation of httpx maintained by Pydantic.

httpx and httpx2 are separate packages with separate client, request,
response, timeout and exception classes. The new transports use only
httpx2 objects, so they raise httpx2 exceptions, and the existing
requests and httpx transports are unchanged.

The transports are covered by unit tests against an httpx2 mock
transport, and by tests which drive the VWS, Cloud Reco, VuMark and
Model Target clients through them against VWS Python Mock, which
gained httpx2 interception in 2026.9.6.

Closes #3174.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@adamtheturtle
adamtheturtle merged commit a45df11 into main Sep 7, 2026
14 of 21 checks passed
@adamtheturtle
adamtheturtle deleted the adamtheturtle/vws-python-issue-3174 branch September 7, 2026 14:30
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.

Add HTTPX2 transport support

1 participant