pFad - Phone/Frame/Anonymizer/Declutterfier! Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

URL: http://github.com/encode/httpx/pull/3770

m/assets/global-a40b6ece39d70d4a.css" /> Add missing `| None` to auth parameter in convenience methods by bysiber · Pull Request #3770 · encode/httpx · GitHub
Skip to content

Add missing | None to auth parameter in convenience methods#3770

Open
bysiber wants to merge 1 commit intoencode:masterfrom
bysiber:fix/auth-type-annotation-consistency
Open

Add missing | None to auth parameter in convenience methods#3770
bysiber wants to merge 1 commit intoencode:masterfrom
bysiber:fix/auth-type-annotation-consistency

Conversation

@bysiber
Copy link
Copy Markdown

@bysiber bysiber commented Feb 20, 2026

The options(), head(), post(), put(), patch(), and delete() methods on both Client and AsyncClient are missing | None in their auth parameter type annotation.

This is inconsistent with get(), request(), send(), and stream() which all accept auth: AuthTypes | UseClientDefault | None.

Passing auth=None to explicitly opt out of authentication is a valid use case already supported at runtime, but the type annotations on these methods would incorrectly flag it.

The `options()`, `head()`, `post()`, `put()`, `patch()`, and
`delete()` methods on both `Client` and `AsyncClient` were missing
`| None` in their `auth` parameter type annotation. This makes them
inconsistent with `get()`, `request()`, `send()`, and `stream()`
which all accept `auth: AuthTypes | UseClientDefault | None`.

Passing `auth=None` to explicitly opt out of authentication is a
valid use case that was already supported at runtime (via `request()`)
but the type annotations on these methods would incorrectly flag it.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

pFad - Phonifier reborn

Pfad - The Proxy pFad © 2024 Your Company Name. All rights reserved.





Check this box to remove all script contents from the fetched content.



Check this box to remove all images from the fetched content.


Check this box to remove all CSS styles from the fetched content.


Check this box to keep images inefficiently compressed and original size.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy