Skip to content

Prep for introducing SyncClient - #713

Merged
lovelydinosaur merged 6 commits into
masterfrom
introduce-sync-client
Jan 7, 2020
Merged

lovelydinosaur merged 6 commits into
masterfrom
introduce-sync-client

Conversation

@lovelydinosaur

@lovelydinosaur lovelydinosaur commented Jan 2, 2020 •

Copy link
Copy Markdown
Member
  • Reorganize method ordering in client, with sync methods appearing first. Keeping all the I/O methods seperate will ensure that
  • Add init_dispatch, so that we can have seperate instantiation for the sync and async cases.
  • Use httpx.Proxy(...) for any fine-grained proxy configuration, rather than instantiating a dispatcher class directly. This ensures that proxy configuration looks the same in the API regardless of sync vs. async.

Eg...

proxies = httpx.Proxy("https://12.34.56.78:910", mode="CONNECT_ONLY")

I've ensured that the existing proxy API is currently still supported here, so that we'd be able to bring this change in without breaking API.

@lovelydinosaur
lovelydinosaur marked this pull request as ready for review January 2, 2020 15:39
@lovelydinosaur lovelydinosaur added the refactor Issues and PRs related to code refactoring label Jan 2, 2020
@lovelydinosaur lovelydinosaur mentioned this pull request Jan 2, 2020
@lovelydinosaur

Copy link
Copy Markdown
Member Author

Can potentially split this into a smaller set of PRs if helpful.

@florimondmanca florimondmanca left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep, looks good to me. 馃憤

Some conflicts due to the recent auth history PR.

@lovelydinosaur lovelydinosaur added this to the 0.11.0 milestone Jan 6, 2020
@lovelydinosaur lovelydinosaur mentioned this pull request Jan 6, 2020
8 of 10 tasks
@lovelydinosaur
lovelydinosaur merged commit f17ab37 into master Jan 7, 2020
@lovelydinosaur
lovelydinosaur deleted the introduce-sync-client branch January 7, 2020 10:27
Kludex referenced this pull request in pydantic/httpx2 May 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

refactor Issues and PRs related to code refactoring

Development

Successfully merging this pull request may close these issues.

2 participants