-
Notifications
You must be signed in to change notification settings - Fork 106
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
Add overall timeout support #936
base: master
Are you sure you want to change the base?
Conversation
ba26418
to
f97c976
Compare
@tomchristie Any thoughts? |
Thanks @karpetrosyan...
|
74e30c5
to
6e698d7
Compare
I guess that's all from our side. The remaining documentation will be available in the HTTPX docs. |
@karpetrosyan this looks great! Unfortunately this doesn't quit solve my use case as I want to exclude
|
I'm really looking forward to this feature. Could you please ping me after PR is ready? |
@brosoul there is a "subscribe" button at the top right of the page, click it to get notified for updates to this issue. |
Thanks so much for your work on this @karpetrosyan. I've been spending a little time thinking about this and I reckon there's a more fundamental improvement we could be making here. Design discussion over at #982. |
Todo
Hi! It seems we have received many requests for adding total timeout support.
In each place where we are using the operation (read, write, pool, connect) timeout, we should take the minimum value of the operation timeout (timeouts['pool'], for example) and the total timeout value (timeouts['total']). We should also measure the time of each operation and adjust the value of the total timeout accordingly, so we always have the correct total timeout value within the scope of the request.
I'v used the context manager syntax to simplify time measuring, also have added a simple api level test for total timeout, as we don't have any tests for the concrete timeouts