
    1jȅ                    B   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j                  dk(  rej                  ZKnej
                  ZKef	 	 	 	 	 	 	 d!dZLef	 	 	 	 	 	 	 d"dZM G d d      ZN G d deN      ZOd#d ZPy)$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win32c                   || S | |S t        |t              rt        | t              s| S  |t        |            }|j                  t        |              |j	                         D cg c]
  \  }}|	| }}}|D ]  }||=  |S c c}}w )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`
    )
isinstancer   r.   updateitems)request_settingsession_setting
dict_classmerged_settingkv	none_keyskeys           E/home/qreelify/venv/lib/python3.12/site-packages/requests/sessions.pymerge_settingrB   L   s      	?G,OW1U @AN//:; "0!5!5!7Ev119EIE  3  	 Fs   )
B4Bc                |    ||j                  d      g k(  r| S | | j                  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.
    response)getrB   )request_hookssession_hooksr;   s      rA   merge_hooksrH   l   sO      1 1* = C 1 1* = CzBB    c                      e Zd ZU ded<   ded<   ded<   ddZddZdd	Z	 	 	 	 	 	 d	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 ddZ	 	 	 	 	 	 ddZ	 	 	 	 	 	 ddZ		 	 	 	 	 	 ddZ
y
)SessionRedirectMixinintmax_redirectsbool	trust_envr   cookiesc                     y N )selfrequestkwargss      rA   sendzSessionRedirectMixin.send   s    rI   c                t    |j                   r,|j                  d   }|j                  d      }t        |d      S y)z7Receives a Response. Returns a redirect URI or ``None``locationlatin1utf8N)is_redirectheadersencoder   )rT   resprY   s      rA   get_redirect_targetz(SessionRedirectMixin.get_redirect_target   s;     ||J/H  x0H#Hf55rI   c                   t        |      }t        |      }|j                  |j                  k7  ry|j                  dk(  r,|j                  dv r|j                  dk(  r|j                  dv ry|j                  |j                  k7  }|j                  |j                  k7  }t	        j
                  |j                  d      df}|s|j                  |v r|j                  |v ry|xs |S )zFDecide whether Authorization header should be removed when redirectingThttp)P   Nhttps)i  NFN)r   hostnameschemeportr%   rE   )rT   old_urlnew_url
old_parsed
new_parsedchanged_portchanged_schemedefault_ports           rA   should_strip_authz&SessionRedirectMixin.should_strip_auth   s    g&
g&
*"5"55 ':-!!W,;. "*//9#**j.?.??%))**;*;TBDI</</ -~-rI   Nc	           
   +    K   g }
| j                  |      }t        |j                        j                  }|r|j	                         }|
dd |_        |
j                  |       	 |j                   t        |j
                        | j                  k\  rt        d| j                   d|      |j!                          |j#                  d      r;t        |j                        }dj%                  t'        |j(                        |g      }t        |      }|j                  d	k(  r|r|j+                  |
      }n|j                  r|j                  }|j-                         }|j.                  s t1        |j                  t3        |            }nt3        |      }t'        |      |_        | j5                  ||       |j6                  t8        j:                  t8        j<                  fvr,d}|D ]  }|j>                  jA                  |d         d|_!        |j>                  }|jA                  dd       tE        d|jF                        }tI        |||j                         tK        || jL                         |jO                  |       | jQ                  ||      }| jS                  ||       |jT                  duxr
 d|v xs d|v }|rtW        |       |}|r| nP | jX                  |f|||||dd|	}tI        | jL                  ||j                         | j                  |      }| |ryy# t        t        t        f$ r  |j                  j                  d       Y w xY ww)zBReceives a Response. Returns a generator of Responses or Requests.NF)decode_contentz	Exceeded z redirects.)rD   z//: )fragment)Content-LengthzContent-TypeTransfer-EncodingCookier/   ru   rv   )streamtimeoutverifycertproxiesallow_redirects)-r`   r   urlrt   copyhistoryappendcontentr   r   RuntimeErrorrawreadlenrM   r   close
startswithjoinr   rf   _replacegeturlnetlocr   r*   rebuild_methodstatus_coder#   temporary_redirectpermanent_redirectr]   popbodyr   _cookiesr   r   rP   prepare_cookiesrebuild_proxiesrebuild_auth_body_positionr,   rW   )rT   r_   reqrx   ry   rz   r{   r|   yield_requestsadapter_kwargshistr~   previous_fragmentprepared_requestparsed_rurlparsedpurged_headersheaderr]   
cookie_jar
rewindables                        rA   resolve_redirectsz&SessionRedirectMixin.resolve_redirects   s.      "&&t,$SWW-66"xxz  7DLKK4 4<< D$6$66& 2 23;?$ 
 JJL ~~d#&txx0hh 01C1C DcJK c]F"$):2CD$*OO!--/C
 ==dhhC(89!#&#3C#8  0$7 ((((( 
 "Y, ?F$,,00>?(, %&..GKK$'
 k+;+D+DEJ":sDHH=*dll3,,Z8 **+;WEG.5
 *88D  G+M/Bg/M 
 ,- #C	 tyy	!#!#$)	 %	 't||5EtxxP ..t4
O  )*>M 4U34s1   A!M$$L- 0J9M$+M$-0M!M$ M!!M$c                $   |j                   }t        |      sJ t        |      sJ |j                  }|j                  }|j                  }d|v r| j	                  ||      r|d= | j
                  rt        |      nd}||j                  |       yy)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)rU   _is_preparedr]   r~   ro   rO   r)   prepare_auth)rT   r   rD   original_requestr]   original_urlr~   new_auths           rA   r   z!SessionRedirectMixin.rebuild_auth5  s     $++,---,---"**'++""g%$*@*@s*S ( +/..>#&d))(3  rI   c                F   t        |      sJ |j                  }t        |j                        j                  }t        ||| j                        }d|v r|d= 	 t        ||         \  }}|j                  d      s|r|rt        ||      |d<   |S # t        $ r d\  }}Y 6w xY w)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NNrd   )r   r]   r   r~   rf   r+   rO   r'   KeyErrorr   r   )rT   r   r|   r]   rf   new_proxiesusernamepasswords           rA   r   z$SessionRedirectMixin.rebuild_proxiesN  s      ,---"***../66%&6P G+-.	,!2;v3F!GHh   )h8-<Xx-PG)*  	,!+Hh	,s   B B B c                   |j                   }|j                  t        j                  k(  r|dk7  rd}|j                  t        j                  k(  r|dk7  rd}|j                  t        j
                  k(  r|dk(  rd}||_         y)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)rT   r   rD   r   s       rA   r   z#SessionRedirectMixin.rebuild_methodr  sx     "(( 5??2v7GF 5;;.6V3CF 5;;.6V3CF"(rI   rU   r    rV   r
   returnr"   )r_   r"   r   z
str | None)rh   strri   r   r   rN   )FNTNNF)r_   r"   r   r    rx   rN   ry   _t.TimeoutTyperz   _t.VerifyTyper{   _t.CertTyper|   dict[str, str] | Noner   rN   r   r
   r   zGenerator[Response, None, None])r   r    rD   r"   r   None)r   r    r|   r   r   dict[str, str])__name__
__module____qualname____annotations__rW   r`   ro   r   r   r   r   rS   rI   rA   rK   rK      s   OL(.H "& $ )-$yy y 	y
  y y y 'y y y 
)yv4 /4;C4	42")" '" 
	"H) /);C)	)rI   rK   c                     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<   d0dZd1dZd2dZd3dZ		 	 	 	 	 	 	 	 	 	 	 	 	 	 d4	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 d5d!Z
	 d6	 	 	 	 	 	 	 d7d"Zd8d#Zd8d$Z	 	 d9	 	 	 	 	 	 	 	 	 d:d%Z	 d6	 	 	 	 	 	 	 d;d&Z	 d6	 	 	 	 	 	 	 d;d'Zd8d(Zd<d)Z	 	 	 	 	 	 	 	 	 	 	 	 d=d*Zd>d+Zd0d,Zd?d-Zd@d.ZdAd/Zy )B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]r]   _t.AuthTypeauthr   r|   zdict[str, list[_t.HookType]]hookszMutableMapping[str, Any]paramsrN   rx   r   rz   r   r{   rL   rM   rO   r   rP   z MutableMapping[str, BaseAdapter]adapters)r]   rP   r   r|   r   r   rz   r{   r   rx   rO   rM   z	list[str]	__attrs__c                ^   t               | _        d | _        i | _        t	               | _        i | _        d| _        d| _        d | _	        t        | _        d| _        t        i       | _        t               | _        | j#                  dt%                      | j#                  dt%                      y )NFTzhttps://zhttp://)r&   r]   r   r|   r   r   r   rx   rz   r{   r   rM   rO   r   rP   r   r   mountr   rT   s    rA   __init__zSession.__init__  s     '( 	
  #_

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

:{}-

9km,rI   c                    | S rR   rS   r   s    rA   	__enter__zSession.__enter__  s    rI   c                $    | j                          y rR   )r   )rT   argss     rA   __exit__zSession.__exit__  s    

rI   c                   t        d|j                        }t        t        |j                        }|j                  xs i }t        |t        j                        st        |      }t        t        t               | j                        |      }|j                  }| j                  r|s| j                  st        |      }t               }|j                  |j!                         ||j"                  |j$                  |j&                  t)        |j*                  | j*                  t,              t)        |j.                  | j.                        t)        || j                        |t1        |j2                  | j2                        
       |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)r;   )
r   r~   filesdatajsonr]   r   r   rP   r   )r   r~   r   r   rP   r6   r   r/   r   r   r   r   rO   r)   r    prepareupperr   r   r   rB   r]   r$   r   rH   r   )rT   rU   r~   r   rP   merged_cookiesr   ps           rA   prepare_requestzSession.prepare_request  s"    <-c7>>*//'R '9#6#67)'2G '+-t||<g

 ||>>$tyy!#&D			<<>--!:M !=tTYY/"gmmTZZ8 	 	
 rI   Nc                v   t        |t              r|j                  d      }t        |j	                         ||||xs i ||xs i |||
      }| j                  |      }t        |      sJ |xs i }| j                  |j                  ||||      }|	|
d}|j                  |        | 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~   r]   r   r   r   r   r   rP   r   )ry   r}   )r6   bytesdecoder!   r   r   r   merge_environment_settingsr~   r7   rW   )rT   r   r~   r   r   r]   rP   r   r   ry   r}   r|   r   rx   rz   r{   r   r   prepsettingssend_kwargsr_   s                         rA   rU   zSession.request-  s    | c5!**W%C <<><R
 ##C(D!!!-R22HHgvvt
 .
 	8$tyy--rI   c                R    |j                  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   
setdefaultrU   )rT   r~   r   rV   s       rA   rE   zSession.get  s2     	+T2t||E3@v@@@rI   c                N    |j                  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   rT   r~   rV   s      rA   optionszSession.options  s-     	+T2t||Is5f55rI   c                N    |j                  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  s-     	+U3t||FC2622rI   c                0     | 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   rU   )rT   r~   r   r   rV   s        rA   postzSession.post  s#    " t||FCHdHHHrI   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   rT   r~   r   rV   s       rA   putzSession.put  s!     t||E3<T<V<<rI   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>>rI   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4V44rI   c                   |j                  d| j                         |j                  d| j                         |j                  d| j                         d|vr$t	        || j
                  | j                        |d<   t        |t              rt        d      t        |      sJ |j                  dd      }|j                  d      }|j                  }| j                  |j                        }t!               } |j"                  |fi |}t!               |z
  }	t%        |		      |_        t)        d
||fi |}|j*                  r<|j*                  D ]-  }
t-        | j.                  |
j0                  |
j2                         / t-        | j.                  ||j2                         |r$ | j4                  ||fi |}|D 
cg c]  }
|
 }}
ng }|r)|j7                  d|       |j                         }||_        |s%	 t9         | j4                  ||fddi|      |_        |s|j>                   |S c c}
w # t<        $ r Y  w xY w)zISend a given PreparedRequest.

        :rtype: requests.Response
        rx   rz   r{   r|   z#You can only send PreparedRequests.r}   T)r~   )secondsrD   r   r   ) r   rx   rz   r{   r+   r|   rO   r6   r!   
ValueErrorr   r   rE   r   get_adapterr~   preferred_clockrW   r   elapsedr   r   r   rP   rU   r   r   insertnext_nextStopIterationr   )rT   rU   rV   r}   rx   r   adapterstartrr  r_   genr   s                rA   rW   zSession.send  s     	(DKK0(DKK0&$)),F" /t~~ VF9 gw'BCCG$$$ !**%6=H% ""w{{"3  ! GLL+F+ "#e+g.	 *eQ9&9 99		 M&t||T\\488LM 	t||Waee< ($((G>v>C(+,t,G,G NN1a AAI *D**1gUdUfU II1 -$ ! s   <	H,8$H1 1	H=<H=c                   | j                   r||j                  d      nd}t        ||      }|*|j                         D ]  \  }}	|j	                  ||	        |du s|Dt
        j                  j                  d      xs# t
        j                  j                  d      xs |}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|   rx   rz   r{   )rO   rE   r(   r8   r   osenvironrB   r|   rx   rz   r{   )
rT   r~   r|   rx   rz   r{   r  env_proxiesr=   r>   s
             rA   r   z"Session.merge_environment_settings?  s     >>292Ew{{:.4H-cHEK"'--/ -DAq&&q!,-
 ~JJNN#78 zz~~&67   6vt{{3vt{{3T499-"fPTUUrI   c                    | j                   j                         D ]6  \  }}|j                         j                  |j                               s4|c S  t	        d|      )z~
        Returns the appropriate connection adapter for the given URL.

        :rtype: requests.adapters.BaseAdapter
        z&No connection adapters were found for )r   r8   lowerr   r   )rT   r~   prefixr	  s       rA   r  zSession.get_adapterf  sX      $}}224 	OFGyy{%%flln5	
 DSGLMMrI   c                b    | j                   j                         D ]  }|j                           y)z+Closes all adapters and as such the sessionN)r   valuesr   )rT   r>   s     rA   r   zSession.closes  s'    %%' 	AGGI	rI   c                    || j                   |<   | j                   D cg c]  }t        |      t        |      k  s| }}|D ]*  }| j                   j                  |      | j                   |<   , yc c}w )zwRegisters a connection adapter to a prefix.

        Adapters are sorted in descending order by prefix length.
        N)r   r   r   )rT   r  r	  r=   keys_to_mover@   s         rA   r   zSession.mountx  sj    
 !(f#'==IaCFS[4HII 	8C!%!2!23!7DMM#	8 Js
   A1A1c           	     Z    | j                   D ci c]  }|t        | |d        }}|S c c}w rR   )r   getattr)rT   attrstates      rA   __getstate__zSession.__getstate__  s2    =A^^LTwtT400LL Ms   (c                N    |j                         D ]  \  }}t        | ||        y rR   )r8   setattr)rT   r  r  values       rA   __setstate__zSession.__setstate__  s'     ;;= 	'KD%D$&	'rI   )r   r   )r   r0   )r   r
   r   r   )rU   r!   r   r    )NNNNNNNTNNNNNN)"r   r   r~   r   r   _t.ParamsTyper   _t.DataTyper]   z_t.HeadersTyperP   z5RequestsCookieJar | CookieJar | dict[str, str] | Noner   z_t.FilesTyper   r   ry   r   r}   rN   r|   r   r   z_t.HooksInputType | Nonerx   bool | Nonerz   _t.VerifyType | Noner{   r   r   _t.JsonTyper   r"   rR   )r~   r   r   r$  rV   zUnpack[_t.GetKwargs]r   r"   )r~   r   rV   zUnpack[_t.RequestKwargs]r   r"   r   )
r~   r   r   r%  r   r(  rV   zUnpack[_t.PostKwargs]r   r"   )r~   r   r   r%  rV   zUnpack[_t.DataKwargs]r   r"   r   )r~   r   r|   r   rx   r&  rz   r'  r{   r   r   dict[str, Any])r~   r   r   r3   )r  r   r	  r3   r   r   )r   r)  )r  r)  r   r   )r   r   r   __doc__r   r   r   r   r   r   rU   rE   r   r   r   r   r   r   rW   r   r  r   r   r  r#  rS   rI   rA   r   r     s   $ &%
''$$L
O..Iy =-~,d !% "&IM" "& $)-*."'+  #`` ` 	`
 `  ` G` ` `  ` ` '` (` ` %`  !`" #`$ 
%`J !%AA A '	A
 
A$	6	3 ! 	II I 	I
 (I 
I( 48==%0=CX=	= 48??%0?CX?	?5M^%V%V '%V 	%V
 %%V %V 
%VNN
	8'rI   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   rS   rI   rA   sessionr,    s     9rI   )r9   r
   r:   r
   r;   typer   r
   )rF   _t.HooksTyperG   r.  r;   r-  r   r.  )r   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   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_extensionsr0   r1   rs   _tr3   platformperf_counterr  rB   rH   rK   r   r,  rS   rI   rA   <module>rB     s+   # 	 
  # > >  + + - / ! ! 0 0   0    +   (.% <<7''OiiO DO+.<@F #CCC C 	C&I) I)X~'" ~'BrI   