ReYAUdZddlZddlZddlZddlZddlZddlZddlZddl Z ddl Z ddl Z ddl Z ddl ZddlZddlmZmZmZmZmZmZmZmZmZddlmZmZddlmZddlm Z m!Z!ddl"m#Z#m$Z$ddl%m&Z&dd l'm(Z(dd l)m*Z*dd l+m,Z,dd l-m.Z.dd l/m0Z0ddl1m2Z2ddl3m4Z4ddl5m6Z6ddl7m8Z8ddl9m:Z:m;Z;ddle?Z@eeAeAeeeBeAffZCejDde*gdZEeeCeFd<dZGdeHfdZIdeAfdZJGdde ZKGdde!ZLGd d!eZMGd"d#ejNZOdS)$zhPipSession and supporting code, containing all pip-specific network request configuration and behavior. N) AnyDictIteratorListMappingOptionalSequenceTupleUnion)requestsurllib3)CacheControlAdapter) BaseAdapter HTTPAdapter)PreparedRequestResponse)CaseInsensitiveDict)ConnectionPool)InsecureRequestWarning) __version__)get_default_environment)Link)MultiDomainBasicAuth) SafeFileCache)has_tls)libc_ver)build_url_from_netloc parse_netloc) url_to_pathignore)category))https*r#)r# localhostr#)r#z 127.0.0.0/8r#)r#z::1/128r#)filer#N)sshr#r#SECURE_ORIGINS) BUILD_BUILDIDBUILD_IDCI PIP_IS_CIreturnc>tdtDS)z? Return whether it looks like pip is running under CI. c32K|]}|tjvVdSN)osenviron).0names /builddir/build/BUILDROOT/alt-python311-pip-21.3.1-3.el8.x86_64/opt/alt/python311/lib/python3.11/site-packages/pip/_internal/network/session.py z looks_like_ci..Xs)GGdtrz!GGGGGG)anyCI_ENVIRONMENT_VARIABLESr6r4 looks_like_cir:Qs" GG.FGGG G GGr6c ldtdtjdtjid}|dddkrtj|dd<n|dddkrJtj}|jd kr |d d }d d |D|dd<n]|dddkrtj|dd<n.|dddkrtj|dd<tjdrddl m }| | | f}ttdt!gd|}ttdt!ddgt#}|r||d<|r||d<tjdr8tjdrdtjdd|d<tjr*tj|did<tjr*tj|did<tjrtj|d<t/rdd l}|j|d<t5d}|t9|j |d <t;jd!z t?j d!d"gt>j!d#$}|d%r0|"d&d'#|d(<n#tH$rYnwxYwtKrd)nd |d*<tLj'(d+} | | |d,<d-)|tUj+|d.d)/0S)1z6 Return a string representing the user agent. pip)r3versionr3) installerpythonimplementationr@CPythonr=PyPyfinalN.c,g|]}t|Sr9)str)r2xs r4 zuser_agent..ns / / /SVV / / /r6Jython IronPythonlinuxr)distroc|dSNr9rHs r4zuser_agent..} !A$r6)r3r=idc|dSrOr9rQs r4rRzuser_agent..rSr6liblibcrMdarwinmacOSsystemreleasecpuopenssl_version setuptoolssetuptools_versionrustcz --versiong?)stderrtimeoutsrustc  rP rustc_versionTciPIP_USER_AGENT_USER_DATA user_dataz9{data[installer][name]}/{data[installer][version]} {json}),:) separators sort_keys)datajson),rplatformpython_versionpython_implementationsyspypy_version_info releaseleveljoin startswith pip._vendorrMr3r=codenamedictfilterziprmac_verrZ setdefaultr[machiner_sslOPENSSL_VERSIONrget_distributionrGshutilwhich subprocess check_outputSTDOUTsplitdecode Exceptionr:r0r1getformatrmdumps) rlrrrMlinux_distribution distro_infosrWsslsetuptools_dist rustc_outputrgs r4 user_agentr[sk $ <<)++ H244 D f%22,4,C,E,E y))   '6 1 11  )W 4 4 1"1" 5 ,/HH / /. / / /- -  y))   '8 3 3,4,C,E,E y))   '< 7 7,4,C,E,E y) |w''*&&&&&&#[[]]FNN,<,O>OO'+ ---/ABB  ( (  UI& 33      (#'L  *)DN |x((MX-=-?-?-BM")h6F6H6H6KLLXB080A0A"%%f-F3;3C3E3E"%%i0)&((U yy6"%"5 -//@@NNO"%()@%A%A !" |G( M%2+&z/@#L &&y11 M)5(:(:4(@(@(C(J(J(L(L_%    D '2dDJ 9::I%[ F M M  Zt D D D N  s#N?? O  O ceZdZ d dededeeeeeeffdeee fdeee ee e ffd ee e e fd e fd Z dd Z dS)LocalFSAdapterFNTrequeststreamrbverifycertproxiesr,ct|j}t}d|_|j|_ t j|} t j| j d} tj |dpd} t| | j | d|_t|d|_|jj|_nm#t$$r`} d|_t'| j|_t-j|jd | d |_Yd} ~ nd} ~ wwxYw|S) NT)usegmtrz text/plain)z Content-TypezContent-Lengthz Last-Modifiedrbiz: utf8)rurlr status_coder0statemailutils formatdatest_mtime mimetypes guess_typerst_sizeheadersopenrawcloseOSErrortype__name__reasonioBytesIOencode) selfrrrbrrrpathnamerespstatsmodified content_typeexcs r4sendzLocalFSAdapter.sends>w{++zz; (GH%%E{--enT-JJH$/99!<L L.$0&+m%-DLHd++DHDJJ% J J J #D s)),DKzT["9"9C"9"9"@"@"H"HIIDHHHHHH  J( sC D;AD66D;cdSr/r9)rs r4rzLocalFSAdapter.closes r6)FNTNN)r,N)r __module__ __qualname__rboolrr floatr rGrrrrr9r6r4rrs?C#'6:/3%% %%%uUE\': :;< % dCi % uS%S/123 %'#s(+,% %%%%N      r6rc peZdZdededeeefdeeeeeeffddf fd Z xZ S)InsecureHTTPAdapterconnrrrr,NcRt||d|dSNF)rrrrsuper cert_verifyrrrrr __class__s r4rzInsecureHTTPAdapter.cert_verify, 3u4HHHHHr6 rrrrrGr rrr r __classcell__rs@r4rrIIIdCi I uS%S/123 I  IIIIIIIIIIr6rc peZdZdededeeefdeeeeeeffddf fd Z xZ S)InsecureCacheControlAdapterrrrrr,NcRt||d|dSrrrs r4rz'InsecureCacheControlAdapter.cert_verifyrr6rrs@r4rrrr6rc eZdZUdZeeed<ddddddededeed e ed ee ed ed dffd Z de ed dfdZ ddedeede d dfdZd eefdZded e fdZdededed ed ef fd ZxZS) PipSessionNrbrr9)retriescache trusted_hosts index_urlsargsrrrrkwargsr,cztj|i|g|_t|jd<t ||_tj|gdd}t|}|rBtt||}tt|||_ nt|}||_ |d||d ||d t!|D]} || d d S)zj :param trusted_hosts: Domains not to emit warnings for when not using HTTPS. z User-Agent)r)iiiig?)totalstatus_forcelistbackoff_factor) max_retries)rrzhttps://zhttp://zfile://T)suppress_loggingN)r__init__pip_trusted_originsrrrauthr Retryrrrr_trusted_host_adapterrmountradd_trusted_host) rrrrrrrinsecure_adaptersecure_adapterhostrs r4rzPipSession.__init__s~ $)&)))EG &0\\ \")J??? -211    */7CCC  :0#E**#N*E#E**#***D & & )W===N)9D & :~... 9./// 9n..///! ? ?D  ! !$ ! > > > > ? ?r6new_index_urlsc||j_dS)zn :param new_index_urls: New index urls to update the authentication handler with. N)rr)rrs r4update_index_urlszPipSession.update_index_urlsSs . r6Frsourcerc6|s*d|}| |d|dz }t|t|}||jvr|j||t |ddz|j|t |dz|j|dsZ|t |dd z|j|t |d z|jdSdS) z :param host: It is okay to provide a host that has previously been added. :param source: An optional source string, for logging where the host string came from. zadding trusted host: Nz (from )http)scheme/rPri)loggerinforrappendrrr)rrrrmsg host_ports r4rzPipSession.add_trusted_hostZsG  2$22C!***** KK    && D4 4 4  $ + +I 6 6 6 !$v 6 6 6 X    (..4d6PQQQ| V JJ%d6:::S@*    JJ,T22S8$:T U U U U U  V Vr6c#TKtEd{V|jD]\}}d||dn|fVdS)Nr#)r'r)rrports r4iter_secure_originszPipSession.iter_secure_originsys\!!!!!!!!2 = =JD$T\cct< < < < < = =r6locationcTtjt|}|j|j|j}}}|ddd}|D]}|\}}} ||kr|dkr tj |} tj |} | | vrCnD#t$r7|r2| | kr|dkrYYnwxYw|| kr | dkr| dStd||dS)N+rPr#TzThe repository located at %s is not a trusted or secure host and is being ignored. If this repository is available via HTTPS we recommend you use HTTPS instead, otherwise you may silence this warning and allow it anyway with '--trusted-host %s'.F)urllibparseurlparserGrhostnamerrsplitr ipaddress ip_address ip_network ValueErrorlowerrwarning) rrparsedorigin_protocol origin_host origin_port secure_originsecure_protocol secure_host secure_portaddrnetworks r4is_secure_originzPipSession.is_secure_origin~s&&s8}}55 M O K'2*00a88< "5577! ! M8E 5O[+/11o6L6L  +K88#.{;;w&&'    #))++{/@/@/B/BBB#s**H "{**3&&+44  I      us(B66=Xl%;==== AA$AAAAF=c==C=3=8==========r6r)P__doc__ email.utilsrrrrmloggingrr0rnrrrq urllib.parserwarningstypingrrrrrrr r r rvr r pip._vendor.cachecontrolrpip._vendor.requests.adaptersrrpip._vendor.requests.modelsrrpip._vendor.requests.structuresr"pip._vendor.urllib3.connectionpoolrpip._vendor.urllib3.exceptionsrr<rpip._internal.metadatarpip._internal.models.linkrpip._internal.network.authrpip._internal.network.cacherpip._internal.utils.compatrpip._internal.utils.glibcrpip._internal.utils.miscrrpip._internal.utils.urlsr getLoggerrrrGrrfilterwarningsr'rr8rr:rrrrSessionrr9r6r4r1s     WWWWWWWWWWWWWWWWWWWWWW))))))))888888BBBBBBBBAAAAAAAA??????======AAAAAA::::::******;;;;;;555555/...........HHHHHHHH000000  8 $ $S#xc3h889 +ABBBB & & &\"   ( HtHHHHbCbbbbJ) ) ) ) ) [) ) ) XIIIII+IIIIIIII"5IIID=D=D=D=D=!D=D=D=D=D=r6