o
    ‡ôjÈ…  ã                   @  sè  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jIdkrÍejJZKnejZKefd-d d!„ZLefd.d%d&„ZMG d'd(„ d(ƒZNG d)d*„ d*eNƒZOd/d+d,„ZPdS )0z•
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                 C  sp   |du r| S | du r|S t |tƒrt | tƒs| S |t|ƒƒ}| t| ƒ¡ dd„ | ¡ D ƒ}|D ]}||= q0|S )zèDetermines 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                 S  s   g | ]
\}}|d u r|‘qS ©N© )Ú.0ÚkÚvr:   r:   úd/var/www/html/academy/tools/voices/clone/cosy-venv/lib/python3.10/site-packages/requests/sessions.pyÚ
<listcomp>e   s    z!merge_setting.<locals>.<listcomp>)Ú
isinstancer   r-   ÚupdateÚitems)r4   r5   r6   Zmerged_settingZ	none_keysÚkeyr:   r:   r>   Úmerge_settingL   s   ÿÿrD   Úrequest_hooksú_t.HooksTypeÚsession_hooksc                 C  s@   |du s|  d¡g kr| S | du s|   d¡g kr|S t| ||ƒS )z©Properly merges both requests and session hooks.

    This is necessary because when request_hooks == {'response': []}, the
    merge breaks Session hooks entirely.
    NÚresponse)ÚgetrD   )rE   rG   r6   r:   r:   r>   Úmerge_hooksl   s
   
rJ   c                   @  sz   e Zd ZU ded< ded< ded< d4dd„Zd5dd„Zd6dd„Z						d7d8d(d)„Zd9d-d.„Zd:d0d1„Z	d9d2d3„Z
dS );ÚSessionRedirectMixinÚintÚmax_redirectsÚboolÚ	trust_envr   ÚcookiesÚrequestr   Úkwargsr	   r8   r!   c                 K  s   d S r9   r:   )ÚselfrQ   rR   r:   r:   r>   Úsend„   s    zSessionRedirectMixin.sendÚrespú
str | Nonec                 C  s(   |j r|jd }| d¡}t|dƒS dS )z7Receives a Response. Returns a redirect URI or ``None``ÚlocationÚlatin1Úutf8N)Zis_redirectÚheadersÚencoder   )rS   rU   rW   r:   r:   r>   Úget_redirect_target†   s
   


z(SessionRedirectMixin.get_redirect_targetÚold_urlÚstrÚnew_urlc                 C  sš   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d¡df}|sI|j|v rI|j|v rIdS |pL|S )zFDecide whether Authorization header should be removed when redirectingTÚhttp)éP   NÚhttps)i»  NFN)r   ÚhostnameÚschemeÚportr$   rI   )rS   r]   r_   Z
old_parsedZ
new_parsedZchanged_portZchanged_schemeÚdefault_portr:   r:   r>   Úshould_strip_authš   s$   



ÿ

z&SessionRedirectMixin.should_strip_authFNTÚ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  sH  � g }
|   |¡}t|jƒj}|�r"| ¡ }|
dd… |_|
 |¡ z|j W n tt	t
fy9   |jjdd� Y nw t|jƒ| jkrMtd| j› d�|d�‚| ¡  | d¡ret|jƒ}d t|jƒ|g¡}t|ƒ}|jd	krw|rw|j|d
�}n|jr}|j}| ¡ }|js�t|jt|ƒƒ}nt|ƒ}t|ƒ|_|  ||¡ |jtjtjfvr¶d}|D ]	}|j  |d¡ q©d|_!|j}|  dd¡ t"d|j#ƒ}t$|||jƒ t%|| j&ƒ | '|¡ |  (||¡}|  )||¡ |j*duoïd|v pïd|v }|röt+|ƒ |}|rþ|V  n | j,|f|||||ddœ|	¤Ž}t$| j&||jƒ |   |¡}|V  |sdS dS )zBReceives a Response. Returns a generator of Responses or Requests.NF)Údecode_contentz	Exceeded z redirects.)rH   z//ú:Ú )Úfragment)úContent-LengthzContent-TypeúTransfer-EncodingÚCookier.   ry   rz   )ri   rj   rl   rn   rp   Úallow_redirects)-r\   r   Úurlrx   ÚcopyÚhistoryÚappendÚcontentr   r   ÚRuntimeErrorÚrawÚreadÚlenrM   r   ÚcloseÚ
startswithÚjoinr   rd   Ú_replaceÚgeturlÚnetlocr   r)   Úrebuild_methodÚstatus_coder"   Ztemporary_redirectZpermanent_redirectrZ   ÚpopÚbodyr
   Ú_cookiesr   r   rP   Zprepare_cookiesÚrebuild_proxiesÚrebuild_authÚ_body_positionr+   rT   )rS   rU   rh   ri   rj   rl   rn   rp   rr   rs   Zhistr}   Zprevious_fragmentÚprepared_requestZparsed_rurlÚparsedZpurged_headersÚheaderrZ   Z
cookie_jarZ
rewindabler:   r:   r>   Úresolve_redirectsº   s�   €


ÿÿ


þ

ÿÿùø
™z&SessionRedirectMixin.resolve_redirectsr”   rH   ÚNonec                 C  sv   |j }t|ƒs	J ‚t|ƒsJ ‚|j}|j}|j}d|v r%|  ||¡r%|d= | jr,t|ƒnd}|dur9| |¡ dS dS )zéWhen 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)rQ   Ú_is_preparedrZ   r}   rg   rO   r(   Zprepare_auth)rS   r”   rH   Zoriginal_requestrZ   Zoriginal_urlr}   Znew_authr:   r:   r>   r’   5  s   ÿz!SessionRedirectMixin.rebuild_authúdict[str, str]c                 C  sŽ   t |ƒsJ ‚|j}t|jƒj}t||| jƒ}d|v r|d= z
t|| ƒ\}}W n ty4   d\}}Y nw | 	d¡sE|rE|rEt
||ƒ|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©NNrb   )rš   rZ   r   r}   rd   r*   rO   r&   ÚKeyErrorr‡   r   )rS   r”   rp   rZ   rd   Únew_proxiesÚusernameÚpasswordr:   r:   r>   r‘   N  s   ÿz$SessionRedirectMixin.rebuild_proxiesc                 C  sX   |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 )z‚When being redirected we may want to change the method of the request
        based on certain specs or browser behavior.
        ÚHEADÚGETÚPOSTN)Úmethodr�   r"   Z	see_otherÚfoundZmoved)rS   r”   rH   r¤   r:   r:   r>   rŒ   r  s   
z#SessionRedirectMixin.rebuild_method©rQ   r   rR   r	   r8   r!   )rU   r!   r8   rV   )r]   r^   r_   r^   r8   rN   )FNTNNF)rU   r!   rh   r   ri   rN   rj   rk   rl   rm   rn   ro   rp   rq   rr   rN   rs   r	   r8   rt   )r”   r   rH   r!   r8   r˜   )r”   r   rp   rq   r8   r›   )Ú__name__Ú
__module__Ú__qualname__Ú__annotations__rT   r\   rg   r—   r’   r‘   rŒ   r:   r:   r:   r>   rK      s"   
 


$÷
{
$rK   c                   @  sp  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< dkdd„Zdld!d"„Zdmd%d&„Zdnd*d+„Z		,	,	,	,	,	,	,	-	,	,	,	,	,	,dodpdCdD„Z
	,dqdrdGdH„ZdsdJdK„ZdsdLdM„Z	,	,dtdudOdP„Z	,dqdvdRdS„Z	,dqdvdTdU„ZdsdVdW„ZdwdXdY„Zdxd[d\„Zdyd^d_„Zdkd`da„Zdzddde„Zd{dfdg„Zd|didj„Zd,S )}Ú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]rZ   ú_t.AuthTypeÚauthr›   rp   zdict[str, list[_t.HookType]]ÚhookszMutableMapping[str, Any]ÚparamsrN   ri   rm   rl   ro   rn   rL   rM   rO   r   rP   z MutableMapping[str, BaseAdapter]Úadapters)rZ   rP   r­   rp   r®   r¯   rl   rn   r°   ri   rO   rM   z	list[str]Ú	__attrs__r8   r˜   c                 C  sr   t ƒ | _d | _i | _tƒ | _i | _d| _d| _d | _	t
| _d| _ti ƒ| _tƒ | _|  dtƒ ¡ |  dtƒ ¡ d S )NFTzhttps://zhttp://)r%   rZ   r­   rp   r   r®   r¯   ri   rl   rn   r   rM   rO   r   rP   r   r°   Úmountr   ©rS   r:   r:   r>   Ú__init__º  s   
zSession.__init__r/   c                 C  s   | S r9   r:   r³   r:   r:   r>   Ú	__enter__ù  s   zSession.__enter__Úargsr	   c                 G  s   |   ¡  d S r9   )r†   )rS   r¶   r:   r:   r>   Ú__exit__ü  s   zSession.__exit__rQ   r    r   c                 C  sÄ   t d|jƒ}t t|jƒ}|jpi }t|tjƒst|ƒ}t	t	t
ƒ | jƒ|ƒ}|j}| jr4|s4| js4t|ƒ}tƒ }|j| ¡ ||j|j|jt|j| jtd�t|j| jƒt|| jƒ|t|j| jƒd�
 |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)r6   )
r¤   r}   ÚfilesÚdataÚjsonrZ   r¯   r­   rP   r®   )r
   r}   r^   r¤   rP   r@   r   r.   r   r   r   r­   rO   r(   r   ZprepareÚupperr¹   rº   r»   rD   rZ   r#   r¯   rJ   r®   )rS   rQ   r}   r¤   rP   Zmerged_cookiesr­   Úpr:   r:   r>   Úprepare_requestÿ  s6   

ÿ
ÿ
ôzSession.prepare_requestNTr¤   r^   r}   r¸   ú_t.ParamsTyperº   ú_t.DataTypeú_t.HeadersTypeú5RequestsCookieJar | CookieJar | dict[str, str] | Noner¹   ú_t.FilesTyperj   rk   r|   rq   ú_t.HooksInputType | Noneúbool | Noneú_t.VerifyType | Noner»   ú_t.JsonTyper!   c                 C  s˜   t |tƒr
| d¡}t| ¡ ||||pi ||pi |||d�
}|  |¡}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}   rZ   r¹   rº   r»   r¯   r­   rP   r®   )rj   r|   )r@   ÚbytesÚdecoder    r¼   r¾   rš   Úmerge_environment_settingsr}   rA   rT   )rS   r¤   r}   r¯   rº   rZ   rP   r¹   r­   rj   r|   rp   r®   ri   rl   rn   r»   rh   ZprepZsettingsZsend_kwargsrU   r:   r:   r>   rQ   -  s4   
>
ö
ÿþ
zSession.requestrR   úUnpack[_t.GetKwargs]c                 K  s$   |  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¯   ©Ú
setdefaultrQ   )rS   r}   r¯   rR   r:   r:   r>   rI   �  s   zSession.getúUnpack[_t.RequestKwargs]c                 K  ó    |  dd¡ | jd|fi |¤ŽS )zéSends 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Ì   ©rS   r}   rR   r:   r:   r>   Úoptions¡  ó   zSession.optionsc                 K  rÏ   )zæSends 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Ñ   r:   r:   r>   Úhead¬  rÓ   zSession.headúUnpack[_t.PostKwargs]c                 K  s   | 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»   ©rQ   )rS   r}   rº   r»   rR   r:   r:   r>   Úpost·  s   zSession.postúUnpack[_t.DataKwargs]c                 K  ó   | 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Ö   ©rS   r}   rº   rR   r:   r:   r>   ÚputÊ  ó   zSession.putc                 K  rÙ   )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Û   r:   r:   r>   ÚpatchØ  rÝ   zSession.patchc                 K  s   | j d|fi |¤ŽS )zèSends 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Ñ   r:   r:   r>   Údeleteæ  s   zSession.deletec                 K  s–  |  d| j¡ |  d| j¡ |  d| j¡ d|vr#t|| j| jƒ|d< t|tƒr,t	dƒ‚t
|ƒs2J ‚| dd¡}| d¡}|j}| j|jd�}tƒ }|j|fi |¤Ž}tƒ | }	t|	d	�|_td
||fi |¤Ž}|jrz|jD ]}
t| j|
j|
jƒ qnt| j||jƒ |r–| j||fi |¤Ž}dd„ |D ƒ}ng }|r§| d|¡ | ¡ }||_|sÄzt| j||fddi|¤Žƒ|_W n	 tyÃ   Y nw |sÉ|j |S )zISend a given PreparedRequest.

        :rtype: requests.Response
        ri   rl   rn   rp   z#You can only send PreparedRequests.r|   T)r}   )ÚsecondsrH   c                 S  s   g | ]}|‘qS r:   r:   )r;   rU   r:   r:   r>   r?   %  s    z Session.send.<locals>.<listcomp>r   rr   ) rÍ   ri   rl   rn   r*   rp   rO   r@   r    Ú
ValueErrorrš   rŽ   rI   r®   Úget_adapterr}   Úpreferred_clockrT   r   Úelapsedr   r   r   rP   rQ   rƒ   r—   ÚinsertÚnextÚ_nextÚStopIterationr�   )rS   rQ   rR   r|   ri   r®   ÚadapterÚstartÚrræ   rU   Úgenr   r:   r:   r>   rT   ð  sP   




ÿÿzSession.sendúdict[str, Any]c           
      C  s¸   | j r=|dur| d¡nd}t||d�}|dur'| ¡ D ]
\}}	| ||	¡ q|du s/|du r=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ð   TZREQUESTS_CA_BUNDLEZCURL_CA_BUNDLE)rp   ri   rl   rn   )rO   rI   r'   rB   rÍ   ÚosÚenvironrD   rp   ri   rl   rn   )
rS   r}   rp   ri   rl   rn   rð   Zenv_proxiesr<   r=   r:   r:   r>   rÊ   ?  s"   
ÿýz"Session.merge_environment_settingsr2   c                 C  s<   | j  ¡ D ]\}}| ¡  | ¡ ¡r|  S qtd|›�ƒ‚)z~
        Returns the appropriate connection adapter for the given URL.

        :rtype: requests.adapters.BaseAdapter
        z&No connection adapters were found for )r°   rB   Úlowerr‡   r   )rS   r}   Úprefixrë   r:   r:   r>   rä   f  s
   ÿzSession.get_adapterc                 C  s   | j  ¡ D ]}| ¡  qdS )z+Closes all adapters and as such the sessionN)r°   Úvaluesr†   )rS   r=   r:   r:   r>   r†   s  s   
ÿzSession.closerô   rë   c                   s>   || j ˆ < ‡ fdd„| j D ƒ}|D ]}| j  |¡| j |< qdS )zwRegisters a connection adapter to a prefix.

        Adapters are sorted in descending order by prefix length.
        c                   s    g | ]}t |ƒt ˆ ƒk r|‘qS r:   )r…   )r;   r<   ©rô   r:   r>   r?   ~  s     z!Session.mount.<locals>.<listcomp>N)r°   rŽ   )rS   rô   rë   Zkeys_to_moverC   r:   rö   r>   r²   x  s
   
ÿzSession.mountc                   s   ‡ fdd„ˆ j D ƒ}|S )Nc                   s   i | ]	}|t ˆ |d ƒ“qS r9   )Úgetattr)r;   Úattrr³   r:   r>   Ú
<dictcomp>„  s    z(Session.__getstate__.<locals>.<dictcomp>)r±   )rS   Ústater:   r³   r>   Ú__getstate__ƒ  s   zSession.__getstate__rú   c                 C  s"   |  ¡ D ]
\}}t| ||ƒ qd S r9   )rB   Úsetattr)rS   rú   rø   Úvaluer:   r:   r>   Ú__setstate__‡  s   ÿzSession.__setstate__)r8   r˜   )r8   r/   )r¶   r	   r8   r˜   )rQ   r    r8   r   )NNNNNNNTNNNNNN)"r¤   r^   r}   r¸   r¯   r¿   rº   rÀ   rZ   rÁ   rP   rÂ   r¹   rÃ   r­   r¬   rj   rk   r|   rN   rp   rq   r®   rÄ   ri   rÅ   rl   rÆ   rn   ro   r»   rÇ   r8   r!   r9   )r}   r¸   r¯   r¿   rR   rË   r8   r!   )r}   r¸   rR   rÎ   r8   r!   rœ   )
r}   r¸   rº   rÀ   r»   rÇ   rR   rÕ   r8   r!   )r}   r¸   rº   rÀ   rR   rØ   r8   r!   r¦   )r}   r^   rp   rq   ri   rÅ   rl   rÆ   rn   ro   r8   rï   )r}   r^   r8   r2   )rô   r^   rë   r2   r8   r˜   )r8   rï   )rú   rï   r8   r˜   )r§   r¨   r©   Ú__doc__rª   r±   r´   rµ   r·   r¾   rQ   rI   rÒ   rÔ   r×   rÜ   rß   rá   rT   rÊ   rä   r†   r²   rû   rþ   r:   r:   r:   r>   r«   ‹  sj   
 

?

2ïeý

üÿÿ



O
'


r«   c                   C  s   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:   r:   r:   r>   ÚsessionŒ  s   r   )r4   r	   r5   r	   r6   r7   r8   r	   )rE   rF   rG   rF   r6   r7   r8   rF   )r8   r«   )Qrÿ   Ú
__future__r   rñ   ÚsysÚtimeÚcollectionsr   Úcollections.abcr   r   r   Údatetimer   Útypingr   r	   r
   Ú_internal_utilsr   r1   r   rš   r°   r   r­   r   Úcompatr   r   r   rP   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_extensionsr/   r0   rw   Ú_tr2   ÚplatformÚperf_counterrå   rD   rJ   rK   r«   r   r:   r:   r:   r>   Ú<module>   sT    0
ÿ#ý      