
    nbi3                      d Z ddlmZ ddlZddlZddlZddlZddlZddlm	Z	 ddl
mZ ddlmZ ddlmZ ddlmZ dd	lmZmZ d
dlmZmZ d
dlmZmZmZmZ d
dlmZm Z m!Z!m"Z"m#Z#m$Z$m%Z%m&Z&m'Z'm(Z(m)Z)m*Z*m+Z+m,Z,m-Z-m.Z. d
dl/m0Z0m1Z1 d
dl2m3Z3 d
dl4m5Z5m6Z6m7Z7m8Z8 d
dl9m:Z:m;Z;m<Z<m=Z=m>Z> d
dl?m@Z@mAZA d
dlBmCZCmDZDmEZE d
dlFmGZGmHZHmIZImJZJmKZKmLZL d
dlMmNZN d
dlOmPZP d
dlQmRZR d
dlSmTZTmUZU d
dlVmWZWmXZXmYZYmZZZm[Z[m\Z\m]Z]m^Z^m_Z_m`Z`maZambZbmcZcmdZdmeZe ejf        dk    rejg        Zhnej        Zh eji        dej                  Zj eji        dejk        d          Zle	fd)d"Zme	fd*d&Zn G d' d(          ZodS )+z
requests.sessions
~~~~~~~~~~~~~~~~~

This module provides a Session object to manage and persist settings across
requests (cookies, auth, proxies).
    )annotationsN)OrderedDict)Mapping)	timedelta)	cookiejar)	CookieJar)urljoinurlparse   )HAS_LEGACY_URLLIB3urllib3_ensure_type)DEFAULT_POOLSIZEDEFAULT_RETRIESREAD_DEFAULT_TIMEOUTWRITE_DEFAULT_TIMEOUT)BodyTypeCacheLayerAltSvcTypeCookiesTypeHeadersTypeHookTypeHttpAuthenticationTypeHttpMethodTypeMultiPartFilesAltTypeMultiPartFilesType	ProxyTypeQueryParameterTypeResolverType	RetryTypeTimeoutTypeTLSClientCertTypeTLSVerifyType)BaseAdapterHTTPAdapter)_basic_auth_str)RequestsCookieJarcookiejar_from_dictextract_cookies_to_jarmerge_cookies)ChunkedEncodingErrorContentDecodingError	HTTPErrorInvalidSchemaTooManyRedirects)DEFAULT_STRATEGYRevocationConfiguration)HOOKSdefault_hooksdispatch_hook)DEFAULT_REDIRECT_LIMITREDIRECT_STATIPreparedRequestRequestResponseTransferProgress)ConnectionInfo)load_extension)codes)CaseInsensitiveDictQuicSharedCache)DEFAULT_PORTS_deepcopy_cicreate_resolverdefault_headersget_auth_from_urlget_environ_proxiesget_netrc_authparse_schemerequote_uriresolve_proxiesrewind_bodyshould_bypass_proxiesshould_check_crlshould_check_ocspto_key_val_listwin32_MSI)bound_MSI_EXrequest_setting_MSI | _MSI_EXsession_settingreturnc                   || S | |S t          |t                    s*t          |t                    rt          | t                    s| S t          |d          r;|j        |u r|                                n ||                                          n |t          |                                        t          |                      fdD             }|D ]}|= S )zDetermines appropriate setting for a given request, taking into account
    the explicit setting on that request, and the setting in the session. If a
    setting is a dictionary, they will be merged together using `dict_class`
    Ncopyc                $    g | ]}|         
|S N ).0kmerged_settings     a/var/www/html/mdtn/previsions/meteo_cartes/venv/lib/python3.11/site-packages/niquests/sessions.py
<listcomp>z!merge_setting.<locals>.<listcomp>   s#    HHHqnQ.?.G.G.G.G    )
isinstanceboolr   hasattr	__class__rV   rL   update)rQ   rS   
dict_class	none_keyskeyr\   s        @r]   merge_settingrh   l   s!     /4(( OW1U1U Zdetv}Z~Z~ '' F&5&?:&M&MO  """S]S]^m^r^r^t^tSuSu 	 $OO$D$DEE//::;;; IHHHNHHHI    3r_   request_hooksr   session_hooksc                   || S | |S i }i }t           D ]F}t          | |                   r| |         ||<   ||v r t          ||                   r||         ||<   Gt          |||          }t           D ]}||vrg ||<   |S )zProperly merges both requests and session hooks.

    This is necessary because when request_hooks == {'response': []}, the
    merge breaks Session hooks entirely.
    )r0   lenrh   )ri   rj   re   tmp_request_hookstmp_session_hooks	hook_typemerged_hookss          r]   merge_hooksrq      s     "$"$ D D	}Y'(( 	D+8+Ci(%%#mI.F*G*G%+8+Ci(*+<>OQ[\\L ) )	L((&(L#r_   c                     e Zd ZdZg dZdddeddddddeeddddddedd~d'Zdd*Z	dd+Z
dd-Zdd1Z	 	 	 	 	 	 	 	 	 	 	 	 	 	 dddNZdddddd2ddddddOddRZdddddd2ddddddOddSZddddddddddddOddTZ	 	 dddddddd2ddddddUddVZ	 ddddddddd2ddddddWddXZ	 ddddddddd2ddddddWddYZdddddd2ddddddOddZZdd[Zdd\dd`ZddcZddeZddfZddiZdj Zdk ZddmZddpZ	 	 	 	 	 	 	 dddxZdd{Z dd|Z!dd}Z"dS )Sessiona  A Requests session.

    Provides cookie persistence, connection-pooling, and configuration.

    Basic Usage::

      >>> import niquests
      >>> s = niquests.Session()
      >>> s.get('https://httpbin.org/get')
      <Response HTTP/2 [200]>

    Or as a context manager::

      >>> with niquests.Session() as s:
      ...     s.get('https://httpbin.org/get')
      <Response HTTP/2 [200]>
    )headerscookiesauthproxieshooksparamsverifycertstream	trust_envmax_redirectsretriesmultiplexedsource_address_disable_ipv4_disable_ipv6_disable_http1_disable_http2_disable_http3_pool_connections_pool_maxsize_happy_eyeballs_keepalive_delay_keepalive_idle_windowbase_urlquic_cache_layertimeout_revocation_configurationNFg      @g      N@)resolverr   r   r   r   disable_http1disable_http2disable_http3disable_ipv6disable_ipv4pool_connectionspool_maxsizehappy_eyeballskeepalive_delaykeepalive_idle_windowr   r   rt   revocation_configurationr   ResolverType | Noner   tuple[str, int] | Noner   CacheLayerAltSvcType | Noner   r   r   ra   r   r   r   r   r   r   intr   r   
bool | intr   float | int | Noner   r   
str | Noner   TimeoutType | Nonert   HeadersType | Noner   RevocationConfiguration | Nonec                  |
|	g                     d          dk    rt          d          || _        | j        rXt          rQt	          | j        d          r<dt          t          | j                            vrt          | j                  | _        |t          |          nt                      | _
        d| _        i | _        t                      | _        i | _        d| _        || _        t%          |          | _        || j        k    | _        || _        || _        || _        || _        || _        |
| _        |	| _        || _        || _        || _        || _        || _         d| _!        d| _"        tF          | _$        d| _%        || _&        tO          i           | _(        ||ntS          d	          | _*        d| _+        d| _,        || _-        t]                      | _/        | 0                    d
tc          | j*        |||||||
|	||||||                     | 0                    dtc          |||||||
|	||||||                     dS )a	  
        :param resolver: Specify a DNS resolver that should be used within this Session.
        :param source_address: Bind Session to a specific network adapter and/or port so that all outgoing requests.
        :param quic_cache_layer: Provide an external cache mechanism to store HTTP/3 host capabilities.
        :param retries: Configure a number of times a request must be automatically retried before giving up.
        :param multiplexed: Enable or disable concurrent request when the remote host support HTTP/2 onward.
        :param disable_http1: Toggle to disable negotiating HTTP/1 with remote peers. Set it to True so that
            you may be able to force HTTP/2 over cleartext (h2c).
        :param disable_http2: Toggle to disable negotiating HTTP/2 with remote peers.
        :param disable_http3: Toggle to disable negotiating HTTP/3 with remote peers.
        :param disable_ipv6: Toggle to disable using IPv6 even if the remote host supports IPv6.
        :param disable_ipv4: Toggle to disable using IPv4 even if the remote host supports IPv4.
        :param pool_connections: Number of concurrent hosts to be kept alive by this Session at a maximum.
        :param pool_maxsize: Maximum number of concurrent connections per (single) host at a time.
        :param happy_eyeballs: Use IETF Happy Eyeballs algorithm when trying to connect to a remote host by issuing
            concurrent connection using available IPs. Tries IPv6/IPv4 at the same time or multiple IPv6 / IPv4.
            The domain name must yield multiple A or AAAA records for this to be used.
        :param keepalive_delay: Delay expressed in seconds, in which we should keep a connection alive by sending PING
            frame. This only applies to HTTP/2 onward.
        :param keepalive_idle_window: Delay expressed in seconds, in which we should send a PING frame after the connection
            being completely idle. This only applies to HTTP/2 onward.
        :param base_url: Automatically set a URL prefix (or base url) on every request emitted if applicable.
        :param timeout: Default timeout configuration to be used if no timeout is provided in exposed methods.
        :param headers: Default headers to be used on every request emitted.
        :param revocation_configuration: How should that session do the certificate revocation check. Set it as None to disable
            this additional security measure.
        T   z!Cannot disable both IPv4 and IPv6totalurllib3_futureNFi 0  )max_sizehttps://r   max_retriesr   r   r   r   r   r   r   r   r   r   r   r   r   http://)r   r   r   r   r   r   r   r   r   r   r   r   r   r   )2countRuntimeErrorr   r   rb   strtyper   r<   rA   rt   rv   rw   r1   rx   ry   r|   r   r@   r   _own_resolverr   r   r   r   r   r   r   r   r   r   r   r   rz   r{   r3   r~   r}   r   r&   ru   r=   r   _ocsp_cache
_crl_cacher   r   adaptersmountr#   )selfr   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   rt   r   s                       r]   __init__zSession.__init__   s   d ,'--d33q88BCCC  L	="	= g..	= !D,>,>(?(???.t|<<DL
 8?7J*7333P_PaPa 	
 #% <I??

 +-  ' (11#+t}#<  -+++))!1)- /&;# &* /3	 #9  $ %- 7J"6M6M
 5E4P 0 0VeouVvVvVv
 /3
 .2 Jb& 8C}}

!%!6#+++!-))!1)- /&;)A  	
 	
 	
( 	

#!-+++))!1)- /&;)A  	
 	
 	
 	
 	
r_   rT   r   c                j    dt          | j                                      dd          d d          dS )Nz	<Session zOrderedDict( >)reprr   replacer   s    r]   __repr__zSession.__repr__  s6    R4..66~rJJ3B3ORRRRr_   c                    | S rX   rY   r   s    r]   	__enter__zSession.__enter__  s    r_   Nonec                .    |                                   d S rX   )close)r   argss     r]   __exit__zSession.__exit__  s    

r_   requestr6   r5   c                   |j         pi }t          |t          j                  st	          |          }t          t          t                      | j                   |          }|j        }d| j        v pdt          |j                  v }| j
        r|s| j        s|st          |j                  }t                      }|                    |j        |j        |j        |j        |j        t'          |j        | j        t                    t'          |j        | j                  t'          || j                  |t+          |j        | j                  | j                   |S )ab  Constructs a :class:`PreparedRequest <PreparedRequest>` for
        transmission and returns it. The :class:`PreparedRequest` has settings
        merged from the :class:`Request <Request>` instance and those of the
        :class:`Session`.

        :param request: :class:`Request` instance to prepare with this
            session's settings.
        authorization)re   )methodurlfilesdatajsonrt   ry   rv   ru   rx   r   )ru   r`   	cookielibr   r&   r(   r%   rv   rt   r<   r}   rD   r   r5   preparer   r   r   r   rh   ry   rq   rx   r   )r   r   ru   merged_cookiesrv   has_authorization_setps          r]   prepare_requestzSession.prepare_request  sM    /'R '9#677 	3)'22G '}5F5H5H$,'W'WY`aa | /4< ? z?VijqjyVzVzCz> 	/$ 	/ty 	/AV 	/!'+..D			>-!'/4<L_``` ==tTY//"gmTZ88] 	 	
 	
 	
 r_   Tr   r   r   ry   QueryParameterType | Noner   BodyType | Noneru   CookiesType | Noner   1MultiPartFilesType | MultiPartFilesAltType | Nonerv   HttpAuthenticationType | Noneallow_redirectsrw   ProxyType | Nonerx   +HookType[PreparedRequest | Response] | Noner|   bool | Nonerz   TLSVerifyType | Noner{   TLSClientCertType | Noner   typing.Any | Noner7   c                   |                                 du r|                                }t          |||||pi ||pi |||| j                  }|                     |          }t          d|j        |          }|j        J |pi }|                     |j        ||||          }|	p| j	        |
d}|
                    |           |d         |dv rt          nt          |d<    | j        |fi |}|S )a1
  Constructs a :class:`Request <Request>`, prepares it and sends it.
        Returns :class:`Response <Response>` object.

        :param method: method for the new :class:`Request` object.
        :param url: URL for the new :class:`Request` object.
        :param params: (optional) Dictionary or bytes to be sent in the query
            string for the :class:`Request`.
        :param data: (optional) Dictionary, list of tuples, bytes, or file-like
            object to send in the body of the :class:`Request`.
        :param json: (optional) json to send in the body of the
            :class:`Request`.
        :param headers: (optional) Dictionary of HTTP Headers to send with the
            :class:`Request`.
        :param cookies: (optional) Dict or CookieJar object to send with the
            :class:`Request`.
        :param files: (optional) Dictionary of ``'filename': file-like-objects``
            for multipart encoding upload.
        :param auth: (optional) Auth tuple or callable to enable
            Basic/Digest/Custom HTTP Auth.
        :param timeout: (optional) How long to wait for the server to send
            data before giving up, as a float, or a :ref:`(connect timeout,
            read timeout) <timeouts>` tuple.
        :param allow_redirects: (optional) Set to True by default.
        :param proxies: (optional) Dictionary mapping protocol or protocol and
            hostname to the URL of the proxy.
        :param hooks: (optional) Dictionary mapping hook name to one event or
            list of events, event must be callable.
        :param stream: (optional) whether to immediately download the response
            content. Defaults to ``False``.
        :param verify: (optional) Either a boolean, in which case it controls whether we verify
            the server's TLS certificate, or a path passed as a string or os.Pathlike object,
            in which case it must be a path to a CA bundle to use. Defaults to ``True``. When set to
            ``False``, requests will accept any TLS certificate presented by
            the server, and will ignore hostname mismatches and/or expired
            certificates, which will make your application vulnerable to
            man-in-the-middle (MitM) attacks. Setting verify to ``False``
            may be useful during local development or testing.
            It is also possible to put the certificates (directly) in a string or bytes.
        :param cert: (optional) if String, path to ssl client cert file (.pem).
            If Tuple, ('cert', 'key') pair, or ('cert', 'key', 'key_password').
        F)r   r   rt   r   r   r   ry   rv   ru   rx   r   pre_requestN)r   r   r   >   PUTPOSTPATCHDELETE)isupperupperr6   r   r   r2   rx   r   merge_environment_settingsr   rd   r   r   send)r   r   r   ry   r   rt   ru   r   rv   r   r   rw   rx   r|   rz   r{   r   reqprepsettingssend_kwargsresps                         r]   r   zSession.request  sI   z >>u$$\\^^F <R]
 
 
 !% 4 4S 9 9J
 
 x###-R2248WffVZ[[ .$,.
 
 	8$$$y!))/3U)U)U%%[o 	" ty----r_   ry   rt   ru   rv   r   r   rw   rx   rz   r|   r{   kwargs
typing.Anyc               8     | j         d|f||||||||	|
||d|S )aO  Sends a GET request. Returns :class:`Response` object.

        :param url: URL for the new :class:`Request` object.
        :param params: (optional) Dictionary or bytes to be sent in the query
            string for the :class:`Request`.
        :param headers: (optional) Dictionary of HTTP Headers to send with the
            :class:`Request`.
        :param cookies: (optional) Dict or CookieJar object to send with the
            :class:`Request`.
        :param auth: (optional) Auth tuple or callable to enable
            Basic/Digest/Custom HTTP Auth.
        :param timeout: (optional) How long to wait for the server to send
            data before giving up, as a float, or a :ref:`(connect timeout,
            read timeout) <timeouts>` tuple.
        :param allow_redirects: (optional) Set to True by default.
        :param proxies: (optional) Dictionary mapping protocol or protocol and
            hostname to the URL of the proxy.
        :param hooks: (optional) Dictionary mapping hook name to one event or
            list of events, event must be callable.
        :param stream: (optional) whether to immediately download the response
            content. Defaults to ``False``.
        :param verify: (optional) Either a boolean, in which case it controls whether we verify
            the server's TLS certificate, or a path passed as a string or os.Pathlike object,
            in which case it must be a path to a CA bundle to use.
            Defaults to ``True``. When set to
            ``False``, requests will accept any TLS certificate presented by
            the server, and will ignore hostname mismatches and/or expired
            certificates, which will make your application vulnerable to
            man-in-the-middle (MitM) attacks. Setting verify to ``False``
            may be useful during local development or testing.
            It is also possible to put the certificates (directly) in a string or bytes.
        :param cert: (optional) if String, path to ssl client cert file (.pem).
            If Tuple, ('cert', 'key') pair, or ('cert', 'key', 'key_password').
        GETr   r   r   r   ry   rt   ru   rv   r   r   rw   rx   rz   r|   r{   r   s                 r]   getzSession.getY  sX    h t|
 +
 
 
 
 	
r_   c               8     | j         d|f||||||||	|
||d|S )aS  Sends a OPTIONS request. Returns :class:`Response` object.

        :param url: URL for the new :class:`Request` object.
        :param params: (optional) Dictionary or bytes to be sent in the query
            string for the :class:`Request`.
        :param headers: (optional) Dictionary of HTTP Headers to send with the
            :class:`Request`.
        :param cookies: (optional) Dict or CookieJar object to send with the
            :class:`Request`.
        :param auth: (optional) Auth tuple or callable to enable
            Basic/Digest/Custom HTTP Auth.
        :param timeout: (optional) How long to wait for the server to send
            data before giving up, as a float, or a :ref:`(connect timeout,
            read timeout) <timeouts>` tuple.
        :param allow_redirects: (optional) Set to True by default.
        :param proxies: (optional) Dictionary mapping protocol or protocol and
            hostname to the URL of the proxy.
        :param hooks: (optional) Dictionary mapping hook name to one event or
            list of events, event must be callable.
        :param stream: (optional) whether to immediately download the response
            content. Defaults to ``False``.
        :param verify: (optional) Either a boolean, in which case it controls whether we verify
            the server's TLS certificate, or a path passed as a string or os.Pathlike object,
            in which case it must be a path to a CA bundle to use.
            Defaults to ``True``. When set to
            ``False``, requests will accept any TLS certificate presented by
            the server, and will ignore hostname mismatches and/or expired
            certificates, which will make your application vulnerable to
            man-in-the-middle (MitM) attacks. Setting verify to ``False``
            may be useful during local development or testing.
            It is also possible to put the certificates (directly) in a string or bytes.
        :param cert: (optional) if String, path to ssl client cert file (.pem).
            If Tuple, ('cert', 'key') pair, or ('cert', 'key', 'key_password').
        OPTIONSr   r   r   s                 r]   optionszSession.options  sX    h t|
 +
 
 
 
 	
r_   c               8     | j         d|f||||||||	|
||d|S )aQ  Sends a HEAD request. Returns :class:`Response` object.

        :param url: URL for the new :class:`Request` object.
        :param params: (optional) Dictionary or bytes to be sent in the query
            string for the :class:`Request`.
        :param headers: (optional) Dictionary of HTTP Headers to send with the
            :class:`Request`.
        :param cookies: (optional) Dict or CookieJar object to send with the
            :class:`Request`.
        :param auth: (optional) Auth tuple or callable to enable
            Basic/Digest/Custom HTTP Auth.
        :param timeout: (optional) How long to wait for the server to send
            data before giving up, as a float, or a :ref:`(connect timeout,
            read timeout) <timeouts>` tuple.
        :param allow_redirects: (optional) Set to False by default.
        :param proxies: (optional) Dictionary mapping protocol or protocol and
            hostname to the URL of the proxy.
        :param hooks: (optional) Dictionary mapping hook name to one event or
            list of events, event must be callable.
        :param stream: (optional) whether to immediately download the response
            content. Defaults to ``False``.
        :param verify: (optional) Either a boolean, in which case it controls whether we verify
            the server's TLS certificate, or a path passed as a string or os.Pathlike object,
            in which case it must be a path to a CA bundle to use.
            Defaults to ``True``. When set to
            ``False``, requests will accept any TLS certificate presented by
            the server, and will ignore hostname mismatches and/or expired
            certificates, which will make your application vulnerable to
            man-in-the-middle (MitM) attacks. Setting verify to ``False``
            may be useful during local development or testing.
            It is also possible to put the certificates (directly) in a string or bytes.
        :param cert: (optional) if String, path to ssl client cert file (.pem).
            If Tuple, ('cert', 'key') pair, or ('cert', 'key', 'key_password').
        HEADr   r   r   s                 r]   headzSession.head  sX    h t|
 +
 
 
 
 	
r_   )ry   rt   ru   r   rv   r   r   rw   rx   rz   r|   r{   c               L    |                      d|||||||||	|
|||||          S )a	  Sends a POST request. Returns :class:`Response` object.

        :param url: URL for the new :class:`Request` object.
        :param params: (optional) Dictionary or bytes to be sent in the query
            string for the :class:`Request`.
        :param data: (optional) Dictionary, list of tuples, bytes, or file-like
            object to send in the body of the :class:`Request`.
        :param json: (optional) json to send in the body of the
            :class:`Request`.
        :param headers: (optional) Dictionary of HTTP Headers to send with the
            :class:`Request`.
        :param cookies: (optional) Dict or CookieJar object to send with the
            :class:`Request`.
        :param files: (optional) Dictionary of ``'filename': file-like-objects``
            for multipart encoding upload.
        :param auth: (optional) Auth tuple or callable to enable
            Basic/Digest/Custom HTTP Auth.
        :param timeout: (optional) How long to wait for the server to send
            data before giving up, as a float, or a :ref:`(connect timeout,
            read timeout) <timeouts>` tuple.
        :param allow_redirects: (optional) Set to True by default.
        :param proxies: (optional) Dictionary mapping protocol or protocol and
            hostname to the URL of the proxy.
        :param hooks: (optional) Dictionary mapping hook name to one event or
            list of events, event must be callable.
        :param stream: (optional) whether to immediately download the response
            content. Defaults to ``False``.
        :param verify: (optional) Either a boolean, in which case it controls whether we verify
            the server's TLS certificate, or a path passed as a string or os.Pathlike object,
            in which case it must be a path to a CA bundle to use.
            Defaults to ``True``. When set to
            ``False``, requests will accept any TLS certificate presented by
            the server, and will ignore hostname mismatches and/or expired
            certificates, which will make your application vulnerable to
            man-in-the-middle (MitM) attacks. Setting verify to ``False``
            may be useful during local development or testing.
            It is also possible to put the certificates (directly) in a string or bytes.
        :param cert: (optional) if String, path to ssl client cert file (.pem).
            If Tuple, ('cert', 'key') pair, or ('cert', 'key', 'key_password').
        r   r   r   ry   rt   ru   r   rv   r   r   rw   rx   rz   r|   r{   r   r   r   r   r   ry   rt   ru   r   rv   r   r   rw   rx   rz   r|   r{   s                   r]   postzSession.post(  sP    x ||+!  
 
 	
r_   )r   ry   rt   ru   r   rv   r   r   rw   rx   rz   r|   r{   c               L    |                      d|||||||||	|
|||||          S )a	  Sends a PUT request. Returns :class:`Response` object.

        :param url: URL for the new :class:`Request` object.
        :param params: (optional) Dictionary or bytes to be sent in the query
            string for the :class:`Request`.
        :param data: (optional) Dictionary, list of tuples, bytes, or file-like
            object to send in the body of the :class:`Request`.
        :param json: (optional) json to send in the body of the
            :class:`Request`.
        :param headers: (optional) Dictionary of HTTP Headers to send with the
            :class:`Request`.
        :param cookies: (optional) Dict or CookieJar object to send with the
            :class:`Request`.
        :param files: (optional) Dictionary of ``'filename': file-like-objects``
            for multipart encoding upload.
        :param auth: (optional) Auth tuple or callable to enable
            Basic/Digest/Custom HTTP Auth.
        :param timeout: (optional) How long to wait for the server to send
            data before giving up, as a float, or a :ref:`(connect timeout,
            read timeout) <timeouts>` tuple.
        :param allow_redirects: (optional) Set to True by default.
        :param proxies: (optional) Dictionary mapping protocol or protocol and
            hostname to the URL of the proxy.
        :param hooks: (optional) Dictionary mapping hook name to one event or
            list of events, event must be callable.
        :param stream: (optional) whether to immediately download the response
            content. Defaults to ``False``.
        :param verify: (optional) Either a boolean, in which case it controls whether we verify
            the server's TLS certificate, or a path passed as a string or os.Pathlike object,
            in which case it must be a path to a CA bundle to use.
            Defaults to ``True``. When set to
            ``False``, requests will accept any TLS certificate presented by
            the server, and will ignore hostname mismatches and/or expired
            certificates, which will make your application vulnerable to
            man-in-the-middle (MitM) attacks. Setting verify to ``False``
            may be useful during local development or testing.
            It is also possible to put the certificates (directly) in a string or bytes.
        :param cert: (optional) if String, path to ssl client cert file (.pem).
            If Tuple, ('cert', 'key') pair, or ('cert', 'key', 'key_password').
        r   r  r   r  s                   r]   putzSession.putw  sP    x ||+!  
 
 	
r_   c               L    |                      d|||||||||	|
|||||          S )a	  Sends a PATCH request. Returns :class:`Response` object.

        :param url: URL for the new :class:`Request` object.
        :param params: (optional) Dictionary or bytes to be sent in the query
            string for the :class:`Request`.
        :param data: (optional) Dictionary, list of tuples, bytes, or file-like
            object to send in the body of the :class:`Request`.
        :param json: (optional) json to send in the body of the
            :class:`Request`.
        :param headers: (optional) Dictionary of HTTP Headers to send with the
            :class:`Request`.
        :param cookies: (optional) Dict or CookieJar object to send with the
            :class:`Request`.
        :param files: (optional) Dictionary of ``'filename': file-like-objects``
            for multipart encoding upload.
        :param auth: (optional) Auth tuple or callable to enable
            Basic/Digest/Custom HTTP Auth.
        :param timeout: (optional) How long to wait for the server to send
            data before giving up, as a float, or a :ref:`(connect timeout,
            read timeout) <timeouts>` tuple.
        :param allow_redirects: (optional) Set to True by default.
        :param proxies: (optional) Dictionary mapping protocol or protocol and
            hostname to the URL of the proxy.
        :param hooks: (optional) Dictionary mapping hook name to one event or
            list of events, event must be callable.
        :param stream: (optional) whether to immediately download the response
            content. Defaults to ``False``.
        :param verify: (optional) Either a boolean, in which case it controls whether we verify
            the server's TLS certificate, or a path passed as a string or os.Pathlike object,
            in which case it must be a path to a CA bundle to use.
            Defaults to ``True``. When set to
            ``False``, requests will accept any TLS certificate presented by
            the server, and will ignore hostname mismatches and/or expired
            certificates, which will make your application vulnerable to
            man-in-the-middle (MitM) attacks. Setting verify to ``False``
            may be useful during local development or testing.
            It is also possible to put the certificates (directly) in a string or bytes.
        :param cert: (optional) if String, path to ssl client cert file (.pem).
            If Tuple, ('cert', 'key') pair, or ('cert', 'key', 'key_password').
        r   r  r   r  s                   r]   patchzSession.patch  sP    x ||+!  
 
 	
r_   c               8     | j         d|f||||||||	|
||d|S )aR  Sends a DELETE request. Returns :class:`Response` object.

        :param url: URL for the new :class:`Request` object.
        :param params: (optional) Dictionary or bytes to be sent in the query
            string for the :class:`Request`.
        :param headers: (optional) Dictionary of HTTP Headers to send with the
            :class:`Request`.
        :param cookies: (optional) Dict or CookieJar object to send with the
            :class:`Request`.
        :param auth: (optional) Auth tuple or callable to enable
            Basic/Digest/Custom HTTP Auth.
        :param timeout: (optional) How long to wait for the server to send
            data before giving up, as a float, or a :ref:`(connect timeout,
            read timeout) <timeouts>` tuple.
        :param allow_redirects: (optional) Set to True by default.
        :param proxies: (optional) Dictionary mapping protocol or protocol and
            hostname to the URL of the proxy.
        :param hooks: (optional) Dictionary mapping hook name to one event or
            list of events, event must be callable.
        :param stream: (optional) whether to immediately download the response
            content. Defaults to ``False``.
        :param verify: (optional) Either a boolean, in which case it controls whether we verify
            the server's TLS certificate, or a path passed as a string or os.Pathlike object,
            in which case it must be a path to a CA bundle to use.
            Defaults to ``True``. When set to
            ``False``, requests will accept any TLS certificate presented by
            the server, and will ignore hostname mismatches and/or expired
            certificates, which will make your application vulnerable to
            man-in-the-middle (MitM) attacks. Setting verify to ``False``
            may be useful during local development or testing.
            It is also possible to put the certificates (directly) in a string or bytes.
        :param cert: (optional) if String, path to ssl client cert file (.pem).
            If Tuple, ('cert', 'key') pair, or ('cert', 'key', 'key_password').
        r   r   r   r   s                 r]   deletezSession.delete  sX    h t|
 +
 
 
 
 	
r_   c                
    t          t                    rt          d                              d j                                       d j                                       d j                   dvrt           j         j	                  d<   t          r^dv rZd         rRt          d         d          r<dt          t          d                             vrt          d                   d<                       d	d
          }                    d          }j        d. fd}d/fd}d0fd}                    d|                               d|                               d j                                       d|           j        J  j                                        sG j        st/          j        dt2                                                        j                                         _                             dt;           j         j         j          j!         j"         j         j#         j$         j%         j&         j'         j(         j)         j*         j+                                                   d!t;           j         j          j!         j"         j         j#         j$         j%         j&         j'         j(         j)         j*         j+        "                      ,                    j        #          }t[                      }		  |j.        fi }
nW# t^          $ rJ d$t          t          |                    v rt_          d%          d= d= d= d=  |j.        fi }
Y nw xY wta          j1                  _1        t          |
d&          rH|
j2        d
u r? fd'|
_3        dd<   |
j4        5                    ||	 j6        |d( j7        d)           |
S t[                      |	z
  }tq          |*          |
_9        tu          d+|
fi }
|
j;        r*|
j;        D ]"}ty           j6        |j=        |j>                   #ty           j6        |
j>                   |rF  j?        |
fd,d
i}g }|D ]/}t          |t                    r|A                    |           -|0ng }|r1|B                    d(|
           |                                }
||
_;        |s<|
jC        r5	 t            j?        |
fd-d
i          |
_E        n# t          $ r Y nw xY w|s|
jG        |
jH         |
S )1zSend a given PreparedRequest.z#You can only send PreparedRequests.r|   rz   r{   rw   r   r   r   r   T	conn_infor9   rT   r   c           	        | 	_         	j        rt          	j                  dk    rd         rt          j                            dd          dk    }|sj        j        j        }t          | j                  r	 ddl	m
} ddl	m} j        G |            _        j                                        D ]}t          |d	          rj        |_         |	||sd
ndd         j        j        j                   n# t$          $ r Y nw xY wt'          | j                  r	 ddlm} ddlm} j        G |            _        j                                        D ]}t          |d          rj        |_         |	||sd
ndd         j        j        j                   n# t$          $ r Y nw xY w	
k    rt/          d	           dS dS )zVThis function will be called by urllib3.future just after establishing the connection.httpsrz   NIQUESTS_STRICT_OCSP0Nr   )InMemoryRevocationStatus)rz   r   g?g      ?rw   )r   r   cache)InMemoryRevocationListr   pre_send)r  r   rE   osenvironr   r   strict_moderK   extensions.revocation._ocspr  rz   r   r   valuesrb   r   r   ImportErrorrJ   extensions.revocation._crlr  r   r2   )r  strict_ocsp_enabledr  ocsp_verifyadapterr  
crl_verifyrx   r   ptr_requestr   r   s          r]   on_post_connectionz(Session.send.<locals>.on_post_connectionz  s    %.K! :<#@#@G#K#KPVW_P`#K,.JNN;QSV,W,W[^,^#* Ut/M/Y*.*H*T'$Y0NOO             +3/G/G/I/ID,+/=+?+?+A+A K K#*7M#B#B !K:>:JG$7#'/':CCC"9-%)]+/+?"&"2     '   & $It/MNN             ?2.D.D.F.FDO+/=+?+?+A+A I I#*7L#A#A !I9=G$6"
'/':CCC"9-%)]+/+?"&/     '   ( g%%j%===== &%s$   D 
DD.F4 4
G G
total_sentr   content_length
int | Noneis_completedra   	any_errorc                    k    rd S j         t                      _         | j         _        |j         _        |j         _        |j         _        t          d           d S )N	on_upload)upload_progressr8   r   r"  r$  r%  r2   )r!  r"  r$  r%  rx   r   r  r   s       r]   handle_upload_progressz,Session.send.<locals>.handle_upload_progress  sp     g%%&.*:*<*<',6G#)5CG#23?G#009G#-+ug66666r_   c                *    t          d|            d S )Nearly_response)r2   )r+  rx   s    r]   on_early_responsez'Session.send.<locals>.on_early_response  s    *E>BBBBBr_   r   on_upload_bodyr   r,  NzA externally instantiated resolver was closed. Attempt to recycling it internally, the Session will detach itself from given resolver.r   r   r   )r   r   r   r   r   r   r   r   r   r   r   r   r   r   )r   z	requests.a  You probably tried to add a Requests adapter into a Niquests session. Make sure you replaced the 'import requests.adapters' into 'import niquests.adapters' and made required adjustment. If you did this to increase pool_maxsize, know that the Session constructor support kwargs for it. See https://niquests.readthedocs.io/en/latest/user/quickstart.html#scale-your-session-pool to learn more.lazyc                B    t           j        | |fddid           S )Nyield_requestsT)nextresolve_redirects)xyr   r   s     r]   <lambda>zSession.send.<locals>.<lambda>2  s3    t&&q!KKDKFKK0 0 r_   r   )niquests_is_streamniquests_startniquests_hooksniquests_cookiesniquests_allow_redirectniquests_kwargsniquests_redirect_countniquests_max_redirects)secondsresponseyield_requests_trailr0  )r  r9   rT   r   )
r!  r   r"  r#  r$  ra   r%  ra   rT   r   rT   r   )Ir`   r6   
ValueError
setdefaultr|   rz   r{   rG   rw   r}   r   rb   r   r   r   popr   rx   r   r   r   is_availabler   warningswarnUserWarningr   recycler   r#   r   r   r   r   r   r   r   r   r   r   r   r   r   r   get_adapterpreferred_clockr   	TypeErrorr?   r  r.  _resolve_redirect_promiseupdate_parametersru   r~   r   elapsedr2   historyr'   r   rawr2  r7   appendinsertis_redirectr1  _nextStopIteration	extensioncontent)r   r   r   r   r|   r   r)  r,  r  startrrP  r   genrQ  resp_or_reqrx   r  s   ```             @@r]   r   zSession.sendZ  s    gw'' 	DBCCC 	(DK000(DK000&$),,,F"" /t~ V VF9 	GV##y! $y)733 $ !D	1B,C,C(D(DDD 3F94E F FF9 !**%6==H%%C	> C	> C	> C	> C	> C	> C	> C	> C	> C	>J	7 	7 	7 	7 	7 	7 	7 	7 	7&	C 	C 	C 	C 	C 	C 	.0BCCC*,BCCC-)9:::-/@AAA{&&& }))++ /	% J  
 JJLLL M1133DMJJ%)%: $"&"5"&"5"&"5!]#'#6!%!3!%!3%)%;!%!3#'#7$($9*.*E-1-K    ( JJ $"&"5"&"5"&"5!]#'#6!%!3!%!3%)%;!%!3#'#7$($9*.*E-1-K    * ""w{"33  !!	4W////AA 	4 	4 	4c$w--0000  @   =)+,/0./ GL33F33'	4. )):;; 1f 	!&D..# # # # #A ,0F'( J((*0&+&+(,/>'- 01.2.@    H "##e+g...	 *eQ99&99 9 	M	 M M&t|T\48LLLLt|Wae<<<  	($(GYY$YRXYYCG" * *k844 NN;///)	* G  	 NN1a   AAI  	} "..q'YY$YRXYY AGG %   D  	!+-IIs%    M AN#"N##U 
UU)	max_fetch	responsesr^  r#  c               n    | j         du rdS | j                                        D ]} |j        |d|i dS )a  
        Call this method to make sure in-flight responses are retrieved efficiently. This is a no-op
        if multiplexed is set to False (which is the default value). Passing a limited set of responses
        will wait for given promises and discard others for later.

        :param max_fetch: Maximal number of response to be fetched before exiting the loop.
               By default, it waits until all pending (lazy) response are resolved.
        FNr^  )r   r   r  gather)r   r^  r_  r  s       r]   ra  zSession.gather  sX     u$$F}++-- 	< 	<GGNI;;;;;	< 	<r_   r   dict[str, typing.Any]c                   | j         rv||                    d          nd}t          ||          }i ||}|du s|@t          j                            d          p t          j                            d          p|}t          || j                  }t          || j                  }t          || j                  }t          || j	                  }||||dS )zH
        Check the environment and merge it with some settings.
        Nno_proxy)rd  TREQUESTS_CA_BUNDLECURL_CA_BUNDLE)rw   r|   rz   r{   )
r}   r   rC   r  r  rh   rw   r|   rz   r{   )r   r   rw   r|   rz   r{   rd  env_proxiess           r]   r   z"Session.merge_environment_settings  s     > 		l292Ew{{:...4H-cHEEEK000G ~~(<==kP`AaAakek  66vt{33vt{33T49--"fPTUUUr_   r"   c                   | j                                         D ]B\  }}|                                                    |                                          r|c S Ct	          |          }d|v r(t          |                    dd                    \  }}nd}	 t          ||          }| j                                         D ]E\  }}||                                v r*|	                    |          t	          |          k    r|c S Fn# t          $ r Y nw xY w|                    d          s|                    d          rd}nd	}t          d
||           )zO
        Returns the appropriate connection adapter for the given URL.
        +r   )maxsplitN)implementationzws://zwss://z_ Did you forget to install the extra for WebSocket? Run `pip install niquests[ws]` to fix this.r   z&No connection adapters were found for )r   itemslower
startswithrE   tuplesplitr:   supported_schemesscheme_to_http_schemer  r,   )r   r   prefixr  schemerk  rX  additional_hints           r]   rJ  zSession.get_adapter  s     $}2244 	 	OFGyy{{%%fllnn55 
 c""&==%*6<<a<+H+H%I%I"FNN!N	&vnMMMI#'=#6#6#8#8 # #Y88::::y?^?^_e?f?fjvw}j~j~?~?~"NNN#  	 	 	D	
 >>'"" 	!cnnX&>&> 	!OO O ]S]O]]^^^s   A.D 
D 
DDc                    | j                                         D ]}|                                 | j        r| j                                         dS dS )z+Closes all adapters and as such the sessionN)r   r  r   r   r   )r   vs     r]   r   zSession.close  s]    %%'' 	 	AGGIIII 	"M!!!!!	" 	"r_   rs  r  c                    || j         <   fd| j         D             }|D ]$}| j                             |          | j         |<   %dS )zwRegisters a connection adapter to a prefix.

        Adapters are sorted in descending order by prefix length.
        c                T    g | ]$}t          |          t                    k     "|%S rY   )rl   )rZ   r[   rs  s     r]   r^   z!Session.mount.<locals>.<listcomp>  s/    IIIaCFFS[[4H4H4H4H4Hr_   N)r   rD  )r   rs  r  keys_to_moverg   s    `   r]   r   zSession.mount  sd    
 !(fIIII4=III 	8 	8C!%!2!23!7!7DM#	8 	8r_   c                      fd j         D             } j         j        |d<   nd |d<    j         j        |d<   nd |d<   |S )Nc                4    i | ]}|t          |d           S rX   )getattr)rZ   attrr   s     r]   
<dictcomp>z(Session.__getstate__.<locals>.<dictcomp>  s'    LLLTwtT400LLLr_   r   r   )	__attrs__r   r   )r   states   ` r]   __getstate__zSession.__getstate__  sg    LLLLT^LLL'#'#3E-  #'E- ?&"&/E,"&E,r_   c                H   |                                 D ]\  }}t          | ||           t          d           | _        d| _        t                      | _        |                     dt          | j	        | j
        | j        | j        | j        | j        | j        | j        | j        | j        | j        | j        | j        | j        | j                             |                     dt          | j
        | j        | j        | j        | j        | j        | j        | j        | j        | j        | j        | j        | j        | j                             | j                                        D ]:}t1          |d          r| j        |_        t1          |d          r| j        |_        ;d S )NTr   )r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   )r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   )rl  setattrr@   r   r   r   r   r   r#   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r  rb   r   r   )r   r  r~  valuer  s        r]   __setstate__zSession.__setstate__  s    ;;== 	' 	'KD%D$&&&&'--!#

!%!6 L"1"1"1#2!/!/!%!7!/#3 $ 5&*&A)-)G  	
 	
 	
( 	

 L"1"1"1#2!/!/!%!7!/#3 $ 5&*&A)-)G  	
 	
 	
& }++-- 	5 	5Gw.. 7&*&6#w-- 5%)_"		5 	5r_   r   c                   |j         r|j        d         }	 t          |t                    r|                    d          n|                    d          S # t          $ rl 	 t          |t                    r|                    d          n|                    d          cY S # t          t          f$ r}t          d          |d}~ww xY ww xY wdS )z7Receives a Response. Returns a redirect URI or ``None``locationlatin1utf-8zJResponse specify a Location header but is unreadable. This is a violation.N)	rU  rt   r`   r   encodedecodeUnicodeDecodeErrorUnicodeEncodeErrorr+   )r   r   r  es       r]   get_redirect_targetzSession.get_redirect_target$  s      	y|J/Hy5?#5N5N\111T\ddelmmm% y y yy8B8S8Q8Q_HOOG444W_gghoppppp*,>? y y y#$pqqwxxyy
 ts/   >A 
C >B!C!C2CCCold_urlnew_urlc                b   t          |          }t          |          }|j        |j        k    rdS |j        dk    r|j        dv r|j        dk    r|j        dv rdS |j        |j        k    }|j        |j        k    }t	          j        |j        d          df}|s|j        |v r|j        |v rdS |p|S )zFDecide whether Authorization header should be removed when redirectingThttp)P   Nr  )i  NFN)r
   hostnamert  portr>   r   )r   r  r  
old_parsed
new_parsedchanged_portchanged_schemedefault_ports           r]   should_strip_authzSession.should_strip_auth=  s    g&&
g&&
*"5554 '':--!W,,;..5 "*/9#*j.??%)**;TBBDI 	*/\"A"AjoYeFeFe5 -~-r_   r   int | float | Noner!   r0  r@  adapter_kwargs8typing.Generator[Response | PreparedRequest, None, None]c
           
   +  f  K   g }|                      |          }t          |j                  j        }|r|                                }|                    |           |dd         |_        |j        J 	 |j         n8# t          t          t          f$ r |j                            d           Y nw xY wt          |j                  | j        k    rt          d| j         d|          |                                 |                    d          r[t          |j                  }|j        }t'          |t(                    r|                                }d	                    ||g          }t          |          }|j        d
k    rC|rA|                    t'          |t0                    r|n|                    d                    }n|j        r|j        }|                                }|j        sSt7          |j        t9          |                    }t'          |t0                    sJ dt;          |           d            nt9          |          }t'          |t(                    r|                    d          }||_        |j        J |                     ||           |j         tB          j"        tB          j#        fvr)d}|D ]}|j        $                    |d           d|_%        |j        }|$                    dd           |j&        J tO          |j&        ||j                   tQ          |j&        | j)                   |*                    |j&                   | +                    ||          }| ,                    ||           |j-        duod|v pd|v }|rt]          |           |}|r|V  nm|	r|V   | j/        |f|||||dd|
}ta          |d          r|j1        r|j          tO          | j)        ||j                   |                      |          }|V  |dS dS )zBReceives a Response. Returns a generator of Responses or Requests.r   NF)decode_contentz	Exceeded z redirects.)r?  z//:r   r  )fragmentzurljoin produced z instead of str)Content-LengthzContent-TypeTransfer-EncodingCookier  r  )r|   r   rz   r{   rw   r   r.  )2r  r
   r   r  rV   rS  rQ  rR  rY  r)   r*   r   readrl   r~   r-   r   rn  rt  r`   bytesr  join_replacer   geturlnetlocr	   rF   r   rt   rebuild_methodstatus_coder;   temporary_redirectpermanent_redirectrD  body_cookiesr'   r(   ru   prepare_cookiesrebuild_proxiesrebuild_auth_body_positionrH   r   rb   r.  )r   r   r   r|   r   rz   r{   rw   r0  r@  r  histr   previous_fragmentprepared_requestparsed_rurltarget_schemeparsedpurged_headersheaderrt   
rewindables                         r]   r2  zSession.resolve_redirectsY  s      &&t,,$SW--6 }	"xxzz KK8DL8'''4(*>M 4 4 4U333334 4<  D$666&'R43E'R'R'R]abbbb JJLLL ~~d## 5&tx00 + 2mU33 ;$1$8$8$:$:Mhhs344 c]]F"$$):$2<=NPS2T2T{..ZkZrZrszZ{Z{ )    4$*O!--//C
 = 'dhC(8(899!#s++[[-[c-[-[-[[[[[!#&& #u%% *jj))#& #+777 0$777 (((  
 "Y, ? ?F$,00>>>>(, %&.GKK$'''#,888 ##3#<c48LLL*3T\BBB,,-=-FGGG **+;WEEG.555
 *8D  G+M/Bg/M 
  .,--- #C 				' III ty	!#!#$)	 	 %	 	 4(( %TY %$$&t|5EtxPPP ..t44


{  }	 }	 }	 }	 }	s   8B   2B54B5r  r?  c                (   |j         }|j        }||
J d            |j        r|j        j        s
J d            d|v r#|                     |j        j        |          r|d= | j        rt          |          nd}||                    |           dS dS )zWhen being redirected we may want to strip authentication from the
        request to avoid leaking credentials. This method intelligently removes
        and reapplies authentication where possible to avoid credential loss.
        Nz3Rebuild auth based on uninitialized PreparedRequestz;Rebuild auth based on nonexistent Response->PreparedRequestAuthorization)rt   r   r   r  r}   rD   prepare_auth)r   r  r?  rt   r   new_auths         r]   r  zSession.rebuild_auth  s    
 #*"7#6#68m#6#6#6wH$4$8ww:wwwwg%%$*@*@AQAUWZ*[*[% ( +/.B>#&&&d))(33333  r_   c                V   |j         }|j        J t          |j                  }|
J d            t          ||| j                  }d|v r|d= 	 t          ||                   \  }}n# t          $ r d\  }}Y nw xY w|                    d          s|r|rt          ||          |d<   |S )a  This method re-evaluates the proxy configuration by considering the
        environment variables. If we are redirected to a URL covered by
        NO_PROXY, we strip the proxy configuration. Otherwise, we set missing
        proxy keys for this URL (in case they were stripped by a previous
        redirect).

        This method also replaces the Proxy-Authorization header where
        necessary.
        Nz6Rebuild proxies based on uninitialized PreparedRequestzProxy-AuthorizationNNr  )	rt   r   rE   rG   r}   rB   KeyErrorrn  r$   )r   r  rw   rt   rt  new_proxiesusernamepasswords           r]   r  zSession.rebuild_proxies   s     #*#///"#3#788""$\"""%&6PP G++-.	,!2;v3F!G!GHhh 	, 	, 	,!+Hhhh	,
   )) 	Qh 	Q8 	Q-<Xx-P-PG)*s   A( (A:9A:c                    |j         }|j        t          j        k    r|dk    rd}|j        t          j        k    r|dk    rd}|j        t          j        k    r|dk    rd}||_         dS )zWhen being redirected we may want to change the method of the request
        based on certain specs or browser behavior.
        r   r   r   N)r   r  r;   	see_otherfoundmoved)r   r  r?  r   s       r]   r  zSession.rebuild_method!  s~     "( 5?22v7G7GF 5;..6V3C3CF 5;..6V3C3CF"(r_   )&r   r   r   r   r   r   r   r   r   ra   r   ra   r   ra   r   ra   r   ra   r   ra   r   r   r   r   r   r   r   r   r   r   r   r   r   r   rt   r   r   r   )rT   r   )rT   rs   rA  )r   r6   rT   r5   )NNNNNNNTNNNNNN)"r   r   r   r   ry   r   r   r   rt   r   ru   r   r   r   rv   r   r   r   r   ra   rw   r   rx   r   r|   r   rz   r   r{   r   r   r   rT   r7   )r   r   ry   r   rt   r   ru   r   rv   r   r   r   r   ra   rw   r   rx   r   rz   r   r|   r   r{   r   r   r   rT   r7   r  ) r   r   r   r   r   r   ry   r   rt   r   ru   r   r   r   rv   r   r   r   r   ra   rw   r   rx   r   rz   r   r|   r   r{   r   rT   r7   rX   )r   r5   r   r   rT   r7   )r_  r7   r^  r#  rT   r   )r   r   rw   r   r|   r   rz   r   r{   r   rT   rb  )r   r   rT   r"   )rs  r   r  r"   rT   r   )r   r7   rT   r   )r  r   r  r   rT   ra   )FNTNNFF)r   r7   r   r5   r|   ra   r   r  rz   r!   r{   r   rw   r   r0  ra   r@  ra   r  r   rT   r  )r  r5   r?  r7   rT   r   )r  r5   rw   r   rT   r   )r  r5   r?  r7   )#__name__
__module____qualname____doc__r  r   r   r.   r   r   r   r   r   r   r   r   r   r  r  r  r	  r   ra  r   rJ  r   r   r  r  r  r  r2  r  r  r  rY   r_   r]   rs   rs      s        $  ID )-158<,!###"" 0,%*.448#&*&*CS+Q
 Q
 Q
 Q
 Q
 Q
fS S S S      ' ' ' 'Z -1 $&*&*CG.2&* $$(=A"'+)-"&#k k k k kb -1&*&*.2&* $$(=A'+")-C
 C
 C
 C
 C
 C
R -1&*&*.2&* $$(=A'+")-C
 C
 C
 C
 C
 C
R -1&*&*.2&* %$(=A'+")-C
 C
 C
 C
 C
 C
P !%"&	M
 -1&*&*CG.2&* $$(=A'+")-#M
 M
 M
 M
 M
 M
d !%M

 #',0&*&*CG.2&* $$(=A'+")-#M
 M
 M
 M
 M
 M
d !%M

 #',0&*&*CG.2&* $$(=A'+")-#M
 M
 M
 M
 M
 M
f -1&*&*.2&* $$(=A'+")-C
 C
 C
 C
 C
 C
Jd d d dL	 DH < < < < < <V V V V>!_ !_ !_ !_F" " " "	8 	8 	8 	8
 
 
35 35 35j   2. . . .@ &* $)-$($%*P P P P Pd4 4 4 4*   B) ) ) ) ) )r_   rs   )rQ   rR   rS   rR   rT   rR   )ri   r   rj   r   rT   r   )pr  
__future__r   r  systimetypingrF  collectionsr   collections.abcr   datetimer   r  r   r   http.cookiejarr   urllib.parser	   r
   _compatr   r   	_constantr   r   r   r   _typingr   r   r   r   r   r   r   r   r   r   r   r   r   r   r    r!   r   r"   r#   rv   r$   ru   r%   r&   r'   r(   
exceptionsr)   r*   r+   r,   r-   extensions.revocationr.   r/   rx   r0   r1   r2   modelsr3   r4   r5   r6   r7   r8   packages.urllib3r9   &packages.urllib3.contrib.webextensionsr:   status_codesr;   
structuresr<   r=   utilsr>   r?   r@   rA   rB   rC   rD   rE   rF   rG   rH   rI   rJ   rK   rL   platformperf_counterrK  TypeVarrN   AnyrP   rh   rq   rs   rY   r_   r]   <module>r     s    # " " " " " 				 



    # # # # # # # # # # # #       ' ' ' ' ' ' $ $ $ $ $ $ * * * * * * * * < < < < < < < <                                              $ / . . . . . . . ! ! ! ! ! !                         M L L L L L L L 6 6 6 6 6 6 6 6 6 6                - , , , , , B B B B B B       < < < < < < < <                                 & <7'OOiO v~fFN333
&.FJ
5
5 $ $ $ $ $T     D@) @) @) @) @) @) @) @) @) @)r_   