Skip to content

Add HTTPX2 in-process mock support #3507

Description

@adamtheturtle

HTTPX2 is the maintained continuation of HTTPX under the Pydantic organization: https://httpx2.pydantic.dev/

MockVWS currently supports in-process Requests and HTTPX clients, with the HTTPX path implemented through RESPX. HTTPX2 request, response, exception, and transport classes are distinct from HTTPX, so VWS-Python's prospective HTTPX2 transports need a matching native mock path.

Add HTTPX2 support to the in-process mock backend.

Acceptance criteria:

  • Synchronous and asynchronous VWS-Python HTTPX2 transports can run against MockVWS without network access.
  • HTTPX2 requests and responses remain native HTTPX2 objects throughout that path.
  • Existing Requests and HTTPX mock backends continue to work.
  • Cross-backend endpoint tests include HTTPX2, including authentication, errors, uploads, timeouts, and representative VWS/VWQ operations.
  • Documentation includes an HTTPX2 example.
  • The library does not impose the process-wide alias_httpx() application escape hatch.

This should be coordinated with the VWS-Python HTTPX2 transport work. HTTPX2 migration notes: https://httpx2.pydantic.dev/migration/

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions