Repository navigation
Revamp docs on Client instances - #836
Conversation
yeraydiazdiaz
left a comment
There was a problem hiding this comment.
This is great, thanks @florimondmanca!
I think it all reads quite well just left a comment to improve the conciseness of a section. 馃憤
|
|
||
| Indeed, when using the top-level API, an HTTP connection has to be opened and closed _for every single request_. | ||
|
|
||
| So, if you are making 50 HTTP/1.1 requests per second to a host using the top-level API, then HTTPX needs to open and shutdown 50 connections per second. This is a lot of work! It can quickly become expensive, and slow down your programs. Reasons include higher latency due to handshaking, higher CPU usage due to repeated TLS handshakes, higher network congestion due to a higher number of TCP connections, etc. |
There was a problem hiding this comment.
I would use this paragraph in place of the above benefits and maybe use bulletpoints in the reasons.
There was a problem hiding this comment.
Yes, the bullets and the "Reasons include" here do essentially repeat the same thing, so +1 to keeping just one of them, and using bullets.
There was a problem hiding this comment.
Thanks! I gave this section a different wording altogether to reduce the repetition. Let me know what you think!
hugovk
left a comment
There was a problem hiding this comment.
Some minor typo and consistency suggestions
Co-Authored-By: Hugo van Kemenade <hugovk@users.noreply.github.com>
Co-Authored-By: Hugo van Kemenade <hugovk@users.noreply.github.com>
|
Merging now, thanks both for the reviews! 馃憤 |
|
Ace, great work! |
Bumps [pytest](https://github.com/pytest-dev/pytest) from 7.4.0 to 7.4.3. - [Release notes](https://github.com/pytest-dev/pytest/releases) - [Changelog](https://github.com/pytest-dev/pytest/blob/main/CHANGELOG.rst) - [Commits](pytest-dev/pytest@7.4.0...7.4.3) --- updated-dependencies: - dependency-name: pytest dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
This PR updates the documentation on
Clientinstances:.close()-style usage..build_request()to more generally detail how to use explicitRequestinstances (can be linked to in Add docs on request instances to Requests compatibility guide聽#823 once this is merged).