Skip to content
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

Switch to more concise Timeout parameters #1111

Merged
merged 5 commits into from
Aug 1, 2020
Merged

Conversation

florimondmanca
Copy link
Member

@florimondmanca florimondmanca commented Aug 1, 2020

Fixes #1093

httpx.Timeout(read_timeout=1, write_timeout=1, connect_timeout=5, pool_timeout=10)

Becomes:

httpx.Timeout(read=1, write=1, connect=5, pool=10)

@florimondmanca florimondmanca added the user-experience Ensuring that users have a good experience using the library label Aug 1, 2020
@florimondmanca florimondmanca requested a review from a team August 1, 2020 09:29
httpx/_config.py Outdated Show resolved Hide resolved
@@ -374,16 +374,16 @@ HTTPX also allows you to specify the timeout behavior in more fine grained detai
There are four different types of timeouts that may occur. These are **connect**,
**read**, **write**, and **pool** timeouts.

* The **connect timeout** specifies the maximum amount of time to wait until
* The **connect** timeout specifies the maximum amount of time to wait until
Copy link
Member Author

Choose a reason for hiding this comment

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

This change in emphasis is so that it's clearer now that the usage is connect=.... :-)

Copy link
Member

Choose a reason for hiding this comment

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

Nicely done, yes.

Copy link
Member

@tomchristie tomchristie left a comment

Choose a reason for hiding this comment

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

Fantastic! Much neater. 😀

@tomchristie tomchristie merged commit 26cd4f5 into master Aug 1, 2020
@tomchristie tomchristie deleted the concise-timeout-params branch August 1, 2020 18:59
@tomchristie tomchristie mentioned this pull request Aug 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
user-experience Ensuring that users have a good experience using the library
Projects
None yet
Development

Successfully merging this pull request may close these issues.

More concise Timeout parameters.
2 participants