
    -jڅ                       d Z ddlmZ ddlZddlZddlZddlmZ ddlm	Z	m
Z
mZ ddlmZ ddlmZmZ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mZ ddlm Z m!Z!m"Z"m#Z# ddl$m%Z%m&Z&m'Z'm(Z( ddl)m*Z*m+Z+ ddl,m-Z-m.Z.m/Z/m0Z0m1Z1 ddl2m3Z3 ddl4m5Z5 ddl6m7Z7m8Z8m9Z9m:Z:m;Z;m<Z<m=Z=m>Z>m?Z?m@Z@ erddlAmBZB ddlCmDZDmEZE ddlFmZG ddlmHZH ejI        dk    rejJ        ZKnej        ZKefd*d ZLefd+d$ZM G d% d&          ZN G d' d(eN          ZOd,d)ZPdS )-z
requests.sessions
~~~~~~~~~~~~~~~~~

This module provides a Session object to manage and persist settings across
requests (cookies, auth, proxies).
    )annotationsN)OrderedDict)	GeneratorMappingMutableMapping)	timedelta)TYPE_CHECKINGAnycast   )to_native_string)is_prepared)HTTPAdapter)_basic_auth_str)	cookieliburljoinurlparse)RequestsCookieJarcookiejar_from_dictextract_cookies_to_jarmerge_cookies)ChunkedEncodingErrorContentDecodingErrorInvalidSchemaTooManyRedirects)default_hooksdispatch_hook)DEFAULT_REDIRECT_LIMITREDIRECT_STATIPreparedRequestRequestResponse)codes)CaseInsensitiveDict)
DEFAULT_PORTSdefault_headersget_auth_from_urlget_environ_proxiesget_netrc_authrequote_uriresolve_proxiesrewind_bodyshould_bypass_proxiesto_key_val_list)	CookieJar)SelfUnpack)_types)BaseAdapterwin32request_settingr
   session_setting
dict_classtypereturnc                .   || S | |S t          |t                    rt          | t                    s| S  |t          |                    }|                    t          |                      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`
    Nc                    g | ]	\  }}||
S N ).0kvs      e/lsinfo/ai/hellotax_ai/training_center/backend/venv/lib/python3.11/site-packages/requests/sessions.py
<listcomp>z!merge_setting.<locals>.<listcomp>e   s    EEEv119999    )
isinstancer   r.   updateitems)r5   r6   r7   merged_setting	none_keyskeys         rA   merge_settingrJ   L   s      	?G,,1;OW1U1U Z @ @AAN//::;;; FE!5!5!7!7EEEI    3rC   request_hooks_t.HooksTypesession_hooksc                    ||                     d          g k    r| S | |                      d          g k    r|S t          | ||          S )zProperly merges both requests and session hooks.

    This is necessary because when request_hooks == {'response': []}, the
    merge breaks Session hooks entirely.
    Nresponse)getrJ   )rK   rM   r7   s      rA   merge_hooksrQ   l   s^      1 1* = = C C 1 1* = = C CzBBBrC   c                  t    e Zd ZU ded<   ded<   ded<   d-dZd.dZd/dZ	 	 	 	 	 	 d0d1d%Zd2d)Zd3d+Z	d2d,Z
dS )4SessionRedirectMixinintmax_redirectsbool	trust_envr   cookiesrequestr    kwargsr
   r9   r"   c                    d S r<   r=   )selfrY   rZ   s      rA   sendzSessionRedirectMixin.send   s      rC   resp
str | Nonec                x    |j         r2|j        d         }|                    d          }t          |d          S dS )z7Receives a Response. Returns a redirect URI or ``None``locationlatin1utf8N)is_redirectheadersencoder   )r\   r^   ra   s      rA   get_redirect_targetz(SessionRedirectMixin.get_redirect_target   sC      		6|J/H  x00H#Hf555trC   old_urlstr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   Nhttps)i  NFN)r   hostnameschemeportr%   rP   )r\   rh   rj   
old_parsed
new_parsedchanged_portchanged_schemedefault_ports           rA   should_strip_authz&SessionRedirectMixin.should_strip_auth   s    g&&
g&&
*"5554 '':--!W,,;..5 "*/9#*j.??%)**;TBBDI	<//<//5 -~-rC   FNTreqstreamtimeout_t.TimeoutTypeverify_t.VerifyTypecert_t.CertTypeproxiesdict[str, str] | Noneyield_requestsadapter_kwargsGenerator[Response, None, None]c	           
   +    K   g }
|                      |          }t          |j                  j        }|r-|                                }|
dd         |_        |
                    |           	 |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                  }d                    t'          |j                  |g          }t          |          }|j        d	k    r|r|                    |
          }n|j        r|j        }|                                }|j        s#t1          |j        t3          |                    }nt3          |          }t'          |          |_        |                     ||           |j        t8          j        t8          j        fvr)d}|D ]}|j                             |d           d|_!        |j        }|                     dd           tE          d|j#                  }tI          |||j                   tK          || j&                   |'                    |           | (                    ||          }| )                    ||           |j*        duod|v pd|v }|rtW          |           |}|r|V  nI | j,        |f|||||dd|	}tI          | j&        ||j                   |                      |          }|V  |+dS dS )zBReceives a Response. Returns a generator of Responses or Requests.NF)decode_contentz	Exceeded z redirects.)rO   z//: )fragment)Content-LengthzContent-TypeTransfer-EncodingCookier/   r   r   )ry   rz   r|   r~   r   allow_redirects)-rg   r   urlr   copyhistoryappendcontentr   r   RuntimeErrorrawreadlenrU   r   close
startswithjoinr   rp   _replacegeturlnetlocr   r*   rebuild_methodstatus_coder#   temporary_redirectpermanent_redirectre   popbodyr   _cookiesr   r   rX   prepare_cookiesrebuild_proxiesrebuild_auth_body_positionr,   r]   )r\   r^   rx   ry   rz   r|   r~   r   r   r   histr   previous_fragmentprepared_requestparsed_rurlparsedpurged_headersheaderre   
cookie_jar
rewindables                        rA   resolve_redirectsz&SessionRedirectMixin.resolve_redirects   s       "&&t,,$SW--6 g	"xxzz  7DLKK4(*>M 4 4 4U333334 4<  D$666&? 2???$   
 JJLLL ~~d## L&tx00hh 01C D DcJKK c]]F"$$):$2CDD 4$*O!--//C
 = 'dhC(8(899!#&&#3C#8#8  0$777 (((  
 "Y, ? ?F$,00>>>>(, %&.GKK$'''
 k+;+DEEJ":sDH===*dl333,,Z888 **+;WEEG.555
 *8D  G+M/Bg/M 
  .,--- #C 				 ty	!#!#$)	 	 %	 	 't|5EtxPPP ..t44


O  g	 g	 g	 g	 g	s   /A7 72B,+B,r   rO   Nonec                   |j         }t          |          sJ t          |          sJ |j        }|j        }|j        }d|v r|                     ||          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.
        AuthorizationN)rY   _is_preparedre   r   rw   rW   r)   prepare_auth)r\   r   rO   original_requestre   original_urlr   new_auths           rA   r   z!SessionRedirectMixin.rebuild_auth5  s     $+,-----,-----"*'+"g%%$*@*@s*S*S% ( +/.B>#&&&d))(33333  rC   dict[str, str]c                X   t          |          sJ |j        }t          |j                  j        }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.

        :rtype: dict
        zProxy-AuthorizationNNrn   )r   re   r   r   rp   r+   rW   r'   KeyErrorr   r   )r\   r   r   re   rp   new_proxiesusernamepasswords           rA   r   z$SessionRedirectMixin.rebuild_proxiesN  s      ,-----"**.//6%&6PP G++-.	,!2;v3F!G!GHhh 	, 	, 	,!+Hhhh	,
   )) 	Qh 	Q8 	Q-<Xx-P-PG)*s   A) )A;: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.
        HEADGETPOSTN)methodr   r#   	see_otherfoundmoved)r\   r   rO   r   s       rA   r   z#SessionRedirectMixin.rebuild_methodr  s~     "( 5?22v7G7GF 5;..6V3C3CF 5;..6V3C3CF"(rC   rY   r    rZ   r
   r9   r"   )r^   r"   r9   r_   )rh   ri   rj   ri   r9   rV   )FNTNNF)r^   r"   rx   r    ry   rV   rz   r{   r|   r}   r~   r   r   r   r   rV   r   r
   r9   r   )r   r    rO   r"   r9   r   )r   r    r   r   r9   r   )__name__
__module____qualname____annotations__r]   rg   rw   r   r   r   r   r=   rC   rA   rS   rS      s         OOOLLLL   (. . . .H "& $ )-$y y y y yv4 4 4 42" " " "H) ) ) ) ) )rC   rS   c                  f   e Zd ZU dZded<   ded<   ded<   ded	<   d
ed<   ded<   ded<   ded<   ded<   ded<   ded<   ded<   g dZded<   dXdZdYd ZdZd#Zd[d'Z		 	 	 	 	 	 	 	 	 	 	 	 	 	 d\d]d?Z
	 d^d_dBZd`dDZd`dEZ	 	 dadbdGZ	 d^dcdIZ	 d^dcdJZd`dKZdddLZdedNZdfdPZdXdQZdgdTZdhdUZdidWZd(S )jSessiona  A Requests session.

    Provides cookie persistence, connection-pooling, and configuration.

    Basic Usage::

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

    Or as a context manager::

      >>> with requests.Session() as s:
      ...     s.get('https://httpbin.org/get')
      <Response [200]>
    zCaseInsensitiveDict[str]re   _t.AuthTypeauthr   r   zdict[str, list[_t.HookType]]hookszMutableMapping[str, Any]paramsrV   ry   r}   r|   r   r~   rT   rU   rW   r   rX   z MutableMapping[str, BaseAdapter]adapters)re   rX   r   r   r   r   r|   r~   r   ry   rW   rU   z	list[str]	__attrs__r9   r   c                   t                      | _        d | _        i | _        t	                      | _        i | _        d| _        d| _        d | _	        t          | _        d| _        t          i           | _        t                      | _        |                     dt%                                 |                     dt%                                 d S )NFTzhttps://zhttp://)r&   re   r   r   r   r   r   ry   r|   r~   r   rU   rW   r   rX   r   r   mountr   r\   s    rA   __init__zSession.__init__  s     '(( 	
  #__

    	 4  +2.. $

:{}}---

9kmm,,,,,rC   r0   c                    | S r<   r=   r   s    rA   	__enter__zSession.__enter__  s    rC   argsr
   c                .    |                                   d S r<   )r   )r\   r   s     rA   __exit__zSession.__exit__  s    

rC   rY   r!   r    c                   t          d|j                  }t          t          |j                  }|j        pi }t          |t          j                  st          |          }t          t          t                      | j                  |          }|j        }| j        r|s| j        st          |          }t                      }|                    |                                ||j        |j        |j        t)          |j        | j        t,                    t)          |j        | j                  t)          || j                  |t1          |j        | j                  
  
         |S )a  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.
        :rtype: requests.PreparedRequest
        
_t.UriType)r7   )
r   r   filesdatajsonre   r   r   rX   r   )r   r   ri   r   rX   rD   r   r/   r   r   r   r   rW   r)   r    prepareupperr   r   r   rJ   re   r$   r   rQ   r   )r\   rY   r   r   rX   merged_cookiesr   ps           rA   prepare_requestzSession.prepare_request  sM    <--c7>**/'R '9#677 	3)'22G '+--t|<<g
 

 |> 	'$ 	'ty 	'!#&&D			<<>>-!:M   !==tTY//"gmTZ88 	 	
 	
 	
 rC   NTr   ri   r   r   _t.ParamsTyper   _t.DataType Mapping[str, str | bytes] | None5RequestsCookieJar | CookieJar | dict[str, str] | Noner   _t.FilesTyperz   r{   r   r   _t.HooksInputType | Nonebool | None_t.VerifyType | Noner   _t.JsonTyper"   c                   t          |t                    r|                    d          }t          |                                ||||pi ||pi |||
  
        }|                     |          }t          |          sJ |pi }|                     |j        ||||          }|	|
d}|	                    |            | j
        |fi |}|S )a
  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 many seconds to wait for the server to send
            data before giving up, as a float, or a :ref:`(connect timeout,
            read timeout) <timeouts>` tuple.
        :type timeout: float or tuple
        :param allow_redirects: (optional) Set to True by default.
        :type allow_redirects: bool
        :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 string, 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.
        :param cert: (optional) if String, path to ssl client cert file (.pem).
            If Tuple, ('cert', 'key') pair.
        :rtype: requests.Response
        zutf-8)
r   r   re   r   r   r   r   r   rX   r   )rz   r   )rD   bytesdecoder!   r   r   r   merge_environment_settingsr   rE   r]   )r\   r   r   r   r   re   rX   r   r   rz   r   r   r   ry   r|   r~   r   rx   prepsettingssend_kwargsr^   s                         rA   rY   zSession.request-  s   | c5!! 	&**W%%C <<>><R
 
 
 ##C((D!!!!!-R22Hgvvt
 
 .
 
 	8$$$ty----rC   rZ   Unpack[_t.GetKwargs]c                P    |                     dd            | j        d|fd|i|S )ai  Sends a GET request. Returns :class:`Response` object.

        :param url: URL for the new :class:`Request` object.
        :param params: (optional) Dictionary, list of tuples or bytes to send
        in the query string for the :class:`Request`.
        :param \*\*kwargs: Optional arguments that ``request`` takes.
        :rtype: requests.Response
        r   Tr   r   
setdefaultrY   )r\   r   r   rZ   s       rA   rP   zSession.get  s<     	+T222t|E3@@v@@@@rC   Unpack[_t.RequestKwargs]c                L    |                     dd            | j        d|fi |S )zSends a OPTIONS request. Returns :class:`Response` object.

        :param url: URL for the new :class:`Request` object.
        :param \*\*kwargs: Optional arguments that ``request`` takes.
        :rtype: requests.Response
        r   TOPTIONSr   r\   r   rZ   s      rA   optionszSession.options  s7     	+T222t|Is55f555rC   c                L    |                     dd            | j        d|fi |S )zSends a HEAD request. Returns :class:`Response` object.

        :param url: URL for the new :class:`Request` object.
        :param \*\*kwargs: Optional arguments that ``request`` takes.
        :rtype: requests.Response
        r   Fr   r   r   s      rA   headzSession.head  s7     	+U333t|FC226222rC   Unpack[_t.PostKwargs]c                &     | j         d|f||d|S )a  Sends a POST request. Returns :class:`Response` object.

        :param url: URL for the new :class:`Request` object.
        :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 \*\*kwargs: Optional arguments that ``request`` takes.
        :rtype: requests.Response
        r   )r   r   rY   )r\   r   r   r   rZ   s        rA   postzSession.post  s'    " t|FCHdHHHHHrC   Unpack[_t.DataKwargs]c                $     | j         d|fd|i|S )au  Sends a PUT request. Returns :class:`Response` object.

        :param url: URL for the new :class:`Request` object.
        :param data: (optional) Dictionary, list of tuples, bytes, or file-like
            object to send in the body of the :class:`Request`.
        :param \*\*kwargs: Optional arguments that ``request`` takes.
        :rtype: requests.Response
        PUTr   r  r\   r   r   rZ   s       rA   putzSession.put  s%     t|E3<<T<V<<<rC   c                $     | j         d|fd|i|S )aw  Sends a PATCH request. Returns :class:`Response` object.

        :param url: URL for the new :class:`Request` object.
        :param data: (optional) Dictionary, list of tuples, bytes, or file-like
            object to send in the body of the :class:`Request`.
        :param \*\*kwargs: Optional arguments that ``request`` takes.
        :rtype: requests.Response
        PATCHr   r  r  s       rA   patchzSession.patch  s%     t|GS>>t>v>>>rC   c                      | j         d|fi |S )zSends a DELETE request. Returns :class:`Response` object.

        :param url: URL for the new :class:`Request` object.
        :param \*\*kwargs: Optional arguments that ``request`` takes.
        :rtype: requests.Response
        DELETEr  r   s      rA   deletezSession.delete  s      t|Hc44V444rC   c                P   |                     d| j                   |                     d| j                   |                     d| j                   d|vrt	          || j        | j                  |d<   t          |t                    rt          d          t          |          sJ |                    dd          }|                    d          }|j        }|                     |j                  }t!                      } |j        |fi |}t!                      |z
  }	t%          |		          |_        t)          d
||fi |}|j        r*|j        D ]"}
t-          | j        |
j        |
j                   #t-          | j        ||j                   |r | j        ||fi |}d |D             }ng }|r1|                    d|           |                                }||_        |s5	 t9           | j        ||fddi|          |_        n# t<          $ r Y nw xY w|s|j         |S )zISend a given PreparedRequest.

        :rtype: requests.Response
        ry   r|   r~   r   z#You can only send PreparedRequests.r   T)r   )secondsrO   c                    g | ]}|S r=   r=   )r>   r^   s     rA   rB   z Session.send.<locals>.<listcomp>%  s    ,,,t,,,rC   r   r   ) r   ry   r|   r~   r+   r   rW   rD   r!   
ValueErrorr   r   rP   r   get_adapterr   preferred_clockr]   r   elapsedr   r   r   rX   rY   r   r   insertnext_nextStopIterationr   )r\   rY   rZ   r   ry   r   adapterstartrr  r^   genr   s                rA   r]   zSession.send  s    	(DK000(DK000&$),,,F"" /t~ V VF9 gw'' 	DBCCCG$$$$$ !**%6==H%% ""w{"33  !! GL++F++ "##e+g...	 *eQ99&99 9 	M	 M M&t|T\48LLLLt|Wae<<<  	($(G>>v>>C,,,,,GGG  	 NN1a   AAI  	*D*1gUUdUfUU  !     	IIs   )#H 
HHdict[str, Any]c                
   | j         r||                    d          nd}t          ||          }|0|                                D ]\  }}	|                    ||	           |du s|@t
          j                            d          p t
          j                            d          p|}t          || j                  }t          || j	                  }t          || j
                  }t          || j                  }||||dS )z^
        Check the environment and merge it with some settings.

        :rtype: dict
        Nno_proxy)r$  TREQUESTS_CA_BUNDLECURL_CA_BUNDLE)r   ry   r|   r~   )rW   rP   r(   rF   r   osenvironrJ   r   ry   r|   r~   )
r\   r   r   ry   r|   r~   r$  env_proxiesr?   r@   s
             rA   r   z"Session.merge_environment_settings?  s    > 	292Ew{{:...4H-cHEEEK"'--// - -DAq&&q!,,,, ~~JNN#788 z~~&677   66vt{33vt{33T49--"fPTUUUrC   r3   c                    | j                                         D ]B\  }}|                                                    |                                          r|c S Ct	          d|          )z~
        Returns the appropriate connection adapter for the given URL.

        :rtype: requests.adapters.BaseAdapter
        z&No connection adapters were found for )r   rF   lowerr   r   )r\   r   prefixr  s       rA   r  zSession.get_adapterf  sr      $}2244 	 	OFGyy{{%%fllnn55  LSLLMMMrC   c                f    | j                                         D ]}|                                 dS )z+Closes all adapters and as such the sessionN)r   valuesr   )r\   r@   s     rA   r   zSession.closes  s8    %%'' 	 	AGGIIII	 	rC   r,  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 r=   )r   )r>   r?   r,  s     rA   rB   z!Session.mount.<locals>.<listcomp>~  s/    IIIaCFFS[[4H4H4H4H4HrC   N)r   r   )r\   r,  r  keys_to_moverI   s    `   rA   r   zSession.mountx  sd    
 !(fIIII4=III 	8 	8C!%!2!23!7!7DM#	8 	8rC   c                .      fd j         D             }|S )Nc                4    i | ]}|t          |d           S r<   )getattr)r>   attrr\   s     rA   
<dictcomp>z(Session.__getstate__.<locals>.<dictcomp>  s'    LLLTwtT400LLLrC   )r   )r\   states   ` rA   __getstate__zSession.__getstate__  s#    LLLLT^LLLrC   r7  c                \    |                                 D ]\  }}t          | ||           d S r<   )rF   setattr)r\   r7  r5  values       rA   __setstate__zSession.__setstate__  s<     ;;== 	' 	'KD%D$&&&&	' 	'rC   )r9   r   )r9   r0   )r   r
   r9   r   )rY   r!   r9   r    )NNNNNNNTNNNNNN)"r   ri   r   r   r   r   r   r   re   r   rX   r   r   r   r   r   rz   r{   r   rV   r   r   r   r   ry   r   r|   r   r~   r   r   r   r9   r"   r<   )r   r   r   r   rZ   r   r9   r"   )r   r   rZ   r   r9   r"   r   )
r   r   r   r   r   r   rZ   r  r9   r"   )r   r   r   r   rZ   r  r9   r"   r   )r   ri   r   r   ry   r   r|   r   r~   r   r9   r"  )r   ri   r9   r3   )r,  ri   r  r3   r9   r   )r9   r"  )r7  r"  r9   r   )r   r   r   __doc__r   r   r   r   r   r   rY   rP   r  r  r  r  r  r  r]   r   r  r   r   r8  r<  r=   rC   rA   r   r     s         $ &%%%''''$$$$LLLOOO....  I    =- =- =- =-~      , , , ,d !% 48IM" "& $)-*."'+  #` ` ` ` `J !%A A A A A$	6 	6 	6 	6	3 	3 	3 	3 ! 	I I I I I( 48= = = = = 48? ? ? ? ?5 5 5 5M M M M^%V %V %V %VNN N N N   
	8 	8 	8 	8   ' ' ' ' ' 'rC   r   c                     t                      S )aZ  
    Returns a :class:`Session` for context-management.

    .. deprecated:: 1.0.0

        This method has been deprecated since version 1.0.0 and is only kept for
        backwards compatibility. New code should use :class:`~requests.sessions.Session`
        to create a session. This may be removed at a future date.

    :rtype: Session
    )r   r=   rC   rA   sessionr?    s     99rC   )r5   r
   r6   r
   r7   r8   r9   r
   )rK   rL   rM   rL   r7   r8   r9   rL   )r9   r   )Qr=  
__future__r   r'  systimecollectionsr   collections.abcr   r   r   datetimer   typingr	   r
   r   _internal_utilsr   r2   r   r   r   r   r   r   compatr   r   r   rX   r   r   r   r   
exceptionsr   r   r   r   r   r   r   modelsr   r   r    r!   r"   status_codesr#   
structuresr$   utilsr%   r&   r'   r(   r)   r*   r+   r,   r-   r.   http.cookiejarr/   typing_extensionsr0   r1   r   _tr3   platformperf_counterr  rJ   rQ   rS   r   r?  r=   rC   rA   <module>rS     s    # " " " " " 				 



  # # # # # # > > > > > > > > > >       + + + + + + + + + + - - - - - - / / / / / / ! ! ! ! ! ! ! ! ! ! ! ! 0 0 0 0 0 0 0 0 0 0                       0 / / / / / / /                     + + + + + +                         &((((((........%%%%%% <7'OOiO DO    F #C C C C C&I) I) I) I) I) I) I) I)X~' ~' ~' ~' ~'" ~' ~' ~'B     rC   