Skip to content

docs: add docstrings to transports, streams, Proxy, DigestAuth and create_ssl_context - #3892

Open
keicodex wants to merge 1 commit into
encode:masterfrom
keicodex:contrib/3355-docstrings
Open

keicodex wants to merge 1 commit into
encode:masterfrom
keicodex:contrib/3355-docstrings

Conversation

@keicodex

@keicodex keicodex commented Dec 4, 2026

Copy link
Copy Markdown

Refs #3355.

Following up on my comment on #3355: this adds docstrings to the public API names that currently have none, deliberately complementary to #3864 — that PR covers the httpx/__init__.py module docstring and the Request/Response class docstrings, and nothing here overlaps with it.

What's covered

  • Transports: BaseTransport, AsyncBaseTransport, HTTPTransport, AsyncHTTPTransport (with full parameter lists matching their __init__ signatures), MockTransport
  • Byte streams: ByteStream, SyncByteStream, AsyncByteStream
  • DigestAuth (mirroring the existing BasicAuth wording), Proxy, and create_ssl_context

The style follows the existing house format — the summary + **Parameters:** list used by Client/Limits, the summary + fenced example used by ASGITransport, and BasicAuth's one-liner pattern for DigestAuth. Purely additive: no existing text or behaviour changed.

Test

Adds test_public_api_docstrings() to tests/test_exported_members.py, asserting these members stay documented (same pattern as the test in #3864 — if that merges first, the two can be folded into one function on rebase).

Verification

  • pytest tests/test_exported_members.py — 2/2 passed.
  • ruff format --diff and ruff check clean on the touched files.
  • Wider subsets (tests/test_config.py, tests/test_auth.py, tests/test_content.py, client transport tests) show failures identical to unmodified master in my sandbox environment — no regressions from this change.

…eate_ssl_context

Refs encode#3355. Covers the public API classes that had no docstrings,
complementary to the module/Request/Response docstrings in encode#3864.
Adds test_public_api_docstrings to tests/test_exported_members.py.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant