requests: set session.headers to MutableMapping (#9395)

This commit is contained in:
Eugene Vilensky
2022-12-22 09:02:58 -06:00
committed by GitHub
parent 9befe5ff00
commit 6a7839f2c5

View File

@@ -113,7 +113,9 @@ class _Settings(TypedDict):
class Session(SessionRedirectMixin):
__attrs__: Any
headers: CaseInsensitiveDict[str | bytes]
# See https://github.com/psf/requests/issues/5020#issuecomment-989082461:
# requests sets this as a CaseInsensitiveDict, but users may set it to any MutableMapping
headers: MutableMapping[str, str | bytes]
auth: _Auth | None
proxies: _TextMapping
# Don't complain if: