2bivSrSSKrSSKrSSKrSSKJr SSKJr SSKJ r SSK J r SSK J r SS KJrJrJrJr SS KJrJrJrJr SS KJrJrJrJr SS KJrJr SS K J!r!J"r"J#r#J$r$ SSK%J&r& SSK'J(r( SSK)J*r*J+r+J,r,J-r-J.r.J/r/J0r0J1r1J2r2J3r3 \RhS:Xa \Rjr6O \Rr6\4Sjr7\4Sjr8"SS5r9"SS\95r:Sr;g)z requests.sessions ~~~~~~~~~~~~~~~~~ This module provides a Session object to manage and persist settings across requests (cookies, auth, proxies). N) OrderedDict) timedelta)to_native_string) HTTPAdapter)_basic_auth_str)Mapping cookieliburljoinurlparse)RequestsCookieJarcookiejar_from_dictextract_cookies_to_jar merge_cookies)ChunkedEncodingErrorContentDecodingError InvalidSchemaTooManyRedirects) default_hooks dispatch_hook)DEFAULT_REDIRECT_LIMITREDIRECT_STATIPreparedRequestRequest)codes)CaseInsensitiveDict) DEFAULT_PORTSdefault_headersget_auth_from_urlget_environ_proxiesget_netrc_auth requote_uriresolve_proxies rewind_bodyshould_bypass_proxiesto_key_val_listwin32c<UcU$UcU$[U[5(a[U[5(dU$U"[U55nUR[U55 UR 5VVs/sH upEUbM UPM nnnUHnX7 M U$s snnf)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&updateitems)request_settingsession_setting dict_classmerged_settingkv none_keyskeys ڏ/builddir/build/BUILDROOT/alt-python313-pip-23.3.1-3.el8.x86_64/opt/alt/python313/lib/python3.13/site-packages/pip/_vendor/requests/sessions.py merge_settingr5=s  ?G,,OW1U1U @AN//:;"0!5!5!7E!7v1!7IE    Fs 5 BBcUbURS5/:XaU$UbURS5/:XaU$[XU5$)zProperly merges both requests and session hooks. This is necessary because when request_hooks == {'response': []}, the merge breaks Session hooks entirely. response)getr5) request_hooks session_hooksr.s r4 merge_hooksr;[sM  1 1* = C 1 1* = C z BBcH\rSrSrSrSrS SjrSrSrSr S r g) SessionRedirectMixinjc~UR(a,URSnURS5n[US5$g)z7Receives a Response. Returns a redirect URI or ``None``locationlatin1utf8N) is_redirectheadersencoder)selfresprAs r4get_redirect_target(SessionRedirectMixin.get_redirect_targetks;   ||J/H x0H#Hf5 5r<c[U5n[U5nURUR:wagURS:Xa1URS;a!URS:XaURS;agURUR:gnURUR:gn[R "URS5S4nU(d!URU;aURU;agU=(d U$)zFDecide whether Authorization header should be removed when redirectingThttp)PNhttps)iNFN)r hostnameschemeportrr8)rGold_urlnew_url old_parsed new_parsed changed_portchanged_scheme default_ports r4should_strip_auth&SessionRedirectMixin.should_strip_authsg& g&   *"5"5 5    ':-!!W,;."*//9 #**j.?.??%))**;*;TBDI </</-~-r<Nc +8# /n URU5n [UR5Rn U (Ga'UR 5n U R U5 U SSUlUR [UR 5UR:a[SURS3US9eUR!5 U R#S5(a;[UR5nS R%['UR(5U /5n [U 5nURS :XaU (aUR+U S 9nOUR(a URn UR-5n UR.(d [1UR[3U 55n O [3U 5n ['U 5U lUR5X5 UR6[8R:[8R<4;a.S nUHnU R>RAUS5 M! SU l!U R>nURAS S5 [EU RFX!R5 [IU RFURJ5 U RMU RF5 UROX5nURQX5 U RRSL=(a SU;=(d SU;nU(a [UU 5 U nU(aUv OOURV"U4UUUUUSS.U D6n[EURJXR5 URU5n Uv U (aGM&gg![[[4a URRSS9 GN!f=f7f)zBReceives a Response. Returns a generator of Responses or Requests.rNF)decode_contentz Exceeded z redirects.)r7z//:)fragment)Content-Lengthz Content-TypeTransfer-EncodingCookier`ra)streamtimeoutverifycertproxiesallow_redirects),rIr urlr_copyappendhistorycontentrr RuntimeErrorrawreadlen max_redirectsrclose startswithjoinrrP_replacegeturlnetlocr r"rebuild_method status_codertemporary_redirectpermanent_redirectrEpopbodyr_cookiesrcookiesprepare_cookiesrebuild_proxies rebuild_auth_body_positionr$send)rGrHreqrcrdrerfrgyield_requestsadapter_kwargshistriprevious_fragmentprepared_request parsed_rurlparsedpurged_headersheaderrE rewindables r4resolve_redirects&SessionRedirectMixin.resolve_redirectss'&&t,$SWW-66"xxz  KK 8DL 4 4<< D$6$66& 2 23;?$ JJL~~d##&txx0 hh 01C1C DcJKc]F"$):2CD$*OO!--/C ==dhh C(89!#&#3C#8     0 7((((( "Y,F$,,00>-(, %&..G KK$ ' ##3#<# M 4 U 3 4s1A&N) M%5K+N#N%.NNNNcURnURnSU;a.URURRU5(aUS UR(a [ U5OSnUbUR U5 gg)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)rErirYrequest trust_envr! prepare_auth)rGrr7rErinew_auths r4r!SessionRedirectMixin.rebuild_auths| #**"" g %$*@*@    #+ + (+/..>#&d    ) )( 3 r<cFURn[UR5Rn[ XUR 5nSU;aUS [ XT5upgURS5(dU(aU(a[Xg5US'U$![a SupgNDf=f)apThis 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 zProxy-AuthorizationNNrN) rEr rirPr#rrKeyErrorrtr)rGrrgrErP new_proxiesusernamepasswords r4r$SessionRedirectMixin.rebuild_proxies/s#***../66%&6P G +-. ,!2;3F!G H   ))h8-r>js7(.H zx4(>)r<r>c\rSrSrSr/SQrSrSrSrSr SS jr S r S r S r SS jrSSjrSSjrSrSrSrSrSrSrSrSrSrg)SessionieaTA Requests session. Provides cookie persistence, connection-pooling, and configuration. Basic Usage:: >>> import requests >>> s = requests.Session() >>> s.get('https://httpbin.org/get') Or as a context manager:: >>> with requests.Session() as s: ... s.get('https://httpbin.org/get') ) rErauthrghooksparamsrerfadaptersrcrrrc^[5UlSUl0Ul[ 5Ul0UlSUlSUlSUl [Ul SUl [05Ul[5UlUR#S[%55 UR#S[%55 g)NFTzhttps://zhttp://)rrErrgrrrrcrerfrrrrrrrrmountrrGs r4__init__Session.__init__s '(   #_     4 +2. $   :{}- 9km,r<cU$Nrrs r4 __enter__Session.__enter__s r<c$UR5 gr)rs)rGargss r4__exit__Session.__exit__s  r<c UR=(d 0n[U[R5(d [ U5n[ [ [ 5UR5U5nURnUR(a-U(d&UR(d[UR5n[5nURURR5URURUR UR"[%UR&UR&[(S9[%UR*UR*5[%X@R5U[-UR.UR.5S9 U$)aSConstructs a :class:`PreparedRequest ` for transmission and returns it. The :class:`PreparedRequest` has settings merged from the :class:`Request ` instance and those of the :class:`Session`. :param request: :class:`Request` instance to prepare with this session's settings. :rtype: requests.PreparedRequest )r.) rrifilesdatajsonrErrrr)rr)r CookieJarrrr rrr!rirpreparerupperrrrr5rErrr;r)rGrrmerged_cookiesrps r4prepare_requestSession.prepare_requests//'R'9#6#677)'2G' +-t|| >$tyy!'++.D   >>'') --!:M!=tYY/"gmmTZZ8  r<Nc .[UR5UUUU=(d 0UU=(d 0UUU S9 nURU5nU =(d 0n URURXX5nU U S.nUR U5 UR "U40UD6nU$)a?Constructs a :class:`Request `, prepares it and sends it. Returns :class:`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) ` 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 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 ) rrirErrrrrrr)rdrh)rrrmerge_environment_settingsrir*r)rGrrirrrErrrrdrhrgrrcrerfrrprepsettings send_kwargsrHs r4rSession.requestsz<<>t>v>>r<c *UR"SU40UD6$)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 DELETErrs r4deleteSession.deletes||Hc4V44r<c URSUR5 URSUR5 URSUR5 SU;a#[ XR UR 5US'[U[5(a [S5eURSS5nURS5nURnURURS9n[5nUR "U40UD6n[5U- n [#U S 9Ul['S XX40UD6nUR((a>UR(H.n [+UR,U R.U R05 M0 [+UR,XR05 U(a%UR2"X40UD6n U V s/sHoPM n n O/n U (a(U R5S U5 U R5nXlU(d$[7UR2"X4S S0UD65UlU(d UR< U$s sn f![:a N&f=f) z9Send a given PreparedRequest. :rtype: requests.Response rcrerfrgz#You can only send PreparedRequests.rhT)ri)secondsr7rr)rrcrerfr#rgrr)r ValueErrorr}r8r get_adapterripreferred_clockrrelapsedrrlrrrrorinsertnext_next StopIterationrm) rGrrrhrcradapterstartrrrHgenrls r4r Session.sends (DKK0(DKK0&$)), F " /t~~ VF9  gw ' 'BC C!**%6=H% ""w{{"3 ! LL +F +"#e+g.  *e 9& 9 99 &t||T\\488L" t||Wee< ((>v>C(+,tG,GG  NN1a  AI **1UdUfU  II1-$!  s8 H7?#H<< I I cUR(aUbURS5OSn[XS9nUR5HupUR X5 M USLdUcN[ R RS5=(d( [ R RS5=(d Un[X R5n[X0R5n[X@R5n[XPR5nX#XES.$)zF Check the environment and merge it with some settings. :rtype: dict Nno_proxy)rTREQUESTS_CA_BUNDLECURL_CA_BUNDLE)rgrcrerf) rr8r r+rosenvironr5rgrcrerf) rGrirgrcrerfr env_proxiesr0r1s r4r"Session.merge_environment_settingss >>292Ew{{:.4H-cEK%++-""1(. ~JJNN#78zz~~&67 6v{{3v{{3T99-"UUr<cURR5H;up#UR5RUR55(dM9Us $ [ SU<35e)zf Returns the appropriate connection adapter for the given URL. :rtype: requests.adapters.BaseAdapter z&No connection adapters were found for )rr+lowerrtr)rGriprefixrs r4rSession.get_adaptersU "&!4!4!6 Vyy{%%flln55"7 DSGLMMr<cfURR5HnUR5 M g)z+Closes all adapters and as such the sessionN)rvaluesrs)rGr1s r4rs Session.closes"%%'A GGI(r<cX RU'URVs/sHn[U5[U5:dMUPM! nnUH+nURRU5URU'M- gs snf)zgRegisters a connection adapter to a prefix. Adapters are sorted in descending order by prefix length. N)rrqr})rGr rr0 keys_to_mover3s r4r Session.mount!sd !( f#'==I=aCFS[4H= IC!%!2!23!7DMM#  Js A7A7c \URVs0sHo[XS5_M nnU$s snfr) __attrs__getattr)rGattrstates r4 __getstate__Session.__getstate__,s/=A^^L^Twt400^L Ms)cNUR5Hup#[XU5 M gr)r+setattr)rGrrvalues r4 __setstate__Session.__setstate__0s ;;=KD D &)r<) rrrfrrErrrrrgrcrre)NNNNNNNTNNNNNNrr)rrrr__doc__rrrrrrr8rrrrrrrrrrsrrrrrr<r4rres$ I<-|)^    #Yv 2 6 3 I = ?5L\V> N 8'r<rc[5$)a> 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 )rrr<r4sessionr!5s  9r<)rr!rr<r4r/s #-!!99  0  +   <<7''OiiO@K<:E Cx)x)vM'"M'` r<