Skip to content

feat: add per-client HTTPX adapters - #191

Draft
parvahuja wants to merge 1 commit into
parv/sync-payment-transport-v0.13from
parv/httpx-client-adapters-v0.14
Draft

feat: add per-client HTTPX adapters#191
parvahuja wants to merge 1 commit into
parv/sync-payment-transport-v0.13from
parv/httpx-client-adapters-v0.14

Conversation

@parvahuja

@parvahuja parvahuja commented Jul 28, 2026

Copy link
Copy Markdown
Member

Runtime stack 4 of 5 · depends on #190 · next: #192

Summary

  • add wrap_client() and wrap_async_client() for existing HTTPX instances
  • preserve configured transports, auth, redirects, cookies, hooks, and streaming
  • enforce one payment across each complete public HTTPX send
  • fail before mutation on unsupported HTTPX versions or send seams
  • roll back partial client mutation transactionally

Review boundary

Explicit per-client opt-in only. One nested-safe context variable spans HTTPX auth and redirect flows; there is no task registry or thread bridge. Wrap clients before concurrent use.

Compatibility

Supported and tested: HTTPX 0.27.x and 0.28.x.

Validation

  • full suite: 923 passed, 41 skipped
  • adapter suite: 24 passed on HTTPX 0.27.0, 0.27.2, 0.28.0, and 0.28.1
  • custom multi-request auth, redirects, nested hooks, request reuse, cancellation, and uncertain-outcome smokes
  • Ruff, formatting, and Pyright pass

@parvahuja
parvahuja force-pushed the parv/httpx-client-adapters-v0.14 branch from 48fa4f6 to 247c2ac Compare July 28, 2026 18:26
@parvahuja
parvahuja force-pushed the parv/httpx-client-adapters-v0.14 branch from 247c2ac to 2a120e8 Compare July 28, 2026 23:25
@parvahuja
parvahuja force-pushed the parv/httpx-client-adapters-v0.14 branch from 2a120e8 to c821796 Compare July 29, 2026 00:43
@parvahuja
parvahuja force-pushed the parv/httpx-client-adapters-v0.14 branch 2 times, most recently from 79739ad to d9a6e31 Compare July 29, 2026 03:33
@parvahuja
parvahuja force-pushed the parv/httpx-client-adapters-v0.14 branch from d9a6e31 to 5bd7a18 Compare July 29, 2026 03:43
@parvahuja
parvahuja force-pushed the parv/httpx-client-adapters-v0.14 branch from 5bd7a18 to 6c1bc6f Compare July 29, 2026 03:50
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