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
Use HTTPX exclusively, sender changes #139
Comments
HTTPX 1.0 has been pushed to "mid-2020", and they are now working on 0.13. We might want to release our 2.0 sooner. Our 3.0 will likely be less breaking than 2.0, so things should go a bit smoother that time around. Alternatively, we could simply adopt the current version. I'm not sure how mature they are, but our use case is pretty simple. I'll investigate a bit. At least 0.12 broke nothing for us. |
We'll stay with Requests and HTTPX for now. |
Looks like a |
We should also really consider whether all the different types of senders are necessary. There's something to be said about not even offering transient and singleton senders. I can not conjure an example where transient senders would be useful beyond debugging. Similarly, having multiple instances of Having senders is fine in my opinion, rather than using e.g. caching and retry arguments in the client directly, because that allows users to build their own. But this idea could be even expanded. Currently we pass |
So, given the absence of
Request
Response
Honestly, I'm not sure, but I think exposing |
I'm leaning towards using our own request and response wrappers, for simplicity. We could also get rid of sender options. Now they are a bit unintuitive. Again, having multiple senders instantiated is not really expected. And with the adoption of HTTPX, its |
Here's a summary of the proposed changes:
|
Upgrading the HTTPX dependency to 1.0 is the only thing left to be done now. It's a check in #202. |
From #131. When Httpx is stable, we could drop Requests and use it exclusively for senders. Currently it is used for async, which is beyond Requests' capability. There would be less hassle with converting between the two libraries.
The text was updated successfully, but these errors were encountered: