-
-
Notifications
You must be signed in to change notification settings - Fork 861
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Getting to 1.0 #715
Comments
Alrighty, I wanted to check that there's no obvious blockers to 1.11, so pressed on with a draft PR to demonstate... #716 Anyways, yay, I reckon we're just about there! We may want to think about our review process, and address the changes bit by bit to make sure they get properly reviewed, but that PR demonstates how it'll look. |
That’s cool! But let’s hold off onto #716 for a bit, maybe? The approach taken here is to duplicate a bunch of code, and reintroduce the BaseClient construct we had before 0.8. Is that the final situation we’d like to end up in? I’m not sure… I’d really see unasync help us out a lot here. If we go that path, while it’s okay for us to duplicate code for now, I’m very much in favor of unasyncing the client for 1.0, and not after (if that was the strategy), for the sake of derisking and taking our time to actually achieve stability (beyond API stability). As for urllib3, my first reaction to eventually dropping it in favor of our own unasync’ed dispatchers was “why bother?”, though the main argument in favor of that might be to guarantee consistent behavior across sync and async. But if we’re able to get that with urllib3, then fine, maybe? Also, I’m not sure I get the idea of an |
Fair questions!... So, there’s a big difference from before:
Granted, we’ve got a bit of replication here, but it’s tightly limited in scope, and pretty tractable. I’d always been expecting that any unasync would only be targeted at the dispatch implementations. We can’t really unasync the Client in quite the same way since there are different function signatures in cases, and slightly different implementations in others. (Eg init-ing the dispatcher and proxy instances) Wrt. urllib3, I’m pretty happy on this. It’s not totally obvious if we would want to later switch it out to a native unasync’ed version or not. Doing so would give us more consistent sync/async behaviour and sync http/2 support, plus I think our native network handling is looking pretty sharp now, so my general thought at this point in time is that we probably would want to do so once we feel our async case is sufficiently mature to justify switching. If we do switch our underlying sync implementation at a later point it’d still be super valuable to provide a urllib3 option (ie requests users that want to switch over to httpx but want to ensure that their http behaviour stays as close as possible) |
Dropping this now in favour of #724, since that's our next step here. I think that's essentially our 1.0 prelease, differences from there to 1.0 might include:
Headline stuff that's not API breaking, that we may want to keep on our horizons...
|
An informal issue here to talk about one route of getting to 1.0, that I think makes a bunch of sense...
httpx.HTTPProxy
from the public API, in favor ofhttpx.Proxy
, which is an object that just holds the proxy config, rather than aDispatcher
instance. Prep for introducing SyncClient #713SyncClient
implementation, initially requiringdispatch=...
be passed, at this point we can introduce tests for the sync client.WSGIDispatcher
, and supportSyncClient(app=...)
.URLLib3ConnectionPool
, andURLLib3ProxyManager
implementations, and use those by default for the sync case. This gives usurllib3
backing for the sync case, and our own dispatch for the async case.At this point we're in great shape - we've got all our public API how we think we want it to look for 1.0, and we've got sync+async support.
(We won't have sync HTTP/2 support at that point, because we're backed by
urllib3
there.)We can then:
unasync
approach to provide a sync dispatch implementation.urllib3
dispatcher implementation.URLLib3Client
provided as an alternate case.What I think is compelling about this route is that it gets us to an "API complete" state as quickly as possible, while still allowing us to eventually switch to using a single unified dispatch implementation for the 1.0 release.
The text was updated successfully, but these errors were encountered: