11from _typeshed import Self , SupportsItems , SupportsRead
22from collections .abc import Callable , Iterable , Mapping , MutableMapping
33from typing import IO , Any , Union
4- from typing_extensions import TypeAlias
4+ from typing_extensions import TypeAlias , TypedDict
55
66from urllib3 ._collections import RecentlyUsedContainer
77
@@ -75,6 +75,12 @@ _HeadersUpdateMapping: TypeAlias = Mapping[str, str | bytes | None]
7575_Timeout : TypeAlias = Union [float , tuple [float , float ], tuple [float , None ]]
7676_Verify : TypeAlias = bool | str
7777
78+ class _Settings (TypedDict ):
79+ verify : _Verify | None
80+ proxies : _TextMapping
81+ stream : bool
82+ cert : _Cert | None
83+
7884class Session (SessionRedirectMixin ):
7985 __attrs__ : Any
8086 headers : CaseInsensitiveDict [str | bytes ]
@@ -86,8 +92,8 @@ class Session(SessionRedirectMixin):
8692 hooks : dict [str , list [_Hook ] | Any ]
8793 params : _Params
8894 stream : bool
89- verify : None | bool | str
90- cert : None | str | tuple [ str , str ]
95+ verify : _Verify | None
96+ cert : _Cert | None
9197 max_redirects : int
9298 trust_env : bool
9399 cookies : RequestsCookieJar
@@ -261,7 +267,14 @@ class Session(SessionRedirectMixin):
261267 allow_redirects : bool = ...,
262268 ** kwargs : Any ,
263269 ) -> Response : ...
264- def merge_environment_settings (self , url , proxies , stream , verify , cert ): ...
270+ def merge_environment_settings (
271+ self ,
272+ url : str | bytes | None ,
273+ proxies : _TextMapping | None ,
274+ stream : bool | None ,
275+ verify : _Verify | None ,
276+ cert : _Cert | None ,
277+ ) -> _Settings : ...
265278 def get_adapter (self , url : str ) -> _BaseAdapter : ...
266279 def close (self ) -> None : ...
267280 def mount (self , prefix : str | bytes , adapter : _BaseAdapter ) -> None : ...
0 commit comments