2biG$SrSSKJr SSKrSSKrSSKrSSKrSSKJr SSK J r J r J r SSK Jr SSKJrJr SSKJr \ (aSS K Jr SS KJr SS KJr SS KJr \R4"\5r\R:"S 5rSrSSjr "SS5r!g)z7 The httplib2 algorithms ported for use with requests. ) annotationsN) parsedate_tz) TYPE_CHECKING CollectionMapping)CaseInsensitiveDict) DictCacheSeparateBodyBaseCache) Serializer)Literal)PreparedRequest) HTTPResponse) BaseCachez9^(([^:/?#]+):)?(//([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?)-4c[RU5nUceUR5nUSUSUSUSUS4$)z{Parses a URI using the regex given in Appendix B of RFC 3986. (scheme, authority, path, query, fragment) = parse_uri(uri) )URImatchgroups)urirrs ڕ/builddir/build/BUILDROOT/alt-python313-pip-23.3.1-3.el8.x86_64/opt/alt/python313/lib/python3.13/site-packages/pip/_vendor/cachecontrol/controller.py parse_urir%sM IIcNE    \\^F 1Ivay&)VAYq BBc\rSrSrSrSSSjjr\SSj5r\SSj5rSSjr SSjr SS jr SS jr SSS jjr SSS jjrSS jrSrg)CacheController0z4An interface to see if request should cached or not.NcUc [5OUUlX lU=(d [5UlU=(d SUlg)N)i,rr)r cache cache_etagsr serializercacheable_status_codes)selfr%r&r' status_codess r__init__CacheController.__init__3s5%*MY[u &$4 &2&O6O#rc [U5up#pEnU(aU(d[SU-5eUR5nUR5nU(dSnU=(a SRXE/5=(d UnUS-U-U-nU$)z4Normalize the URL to create a safe key for the cachez(Only absolute URIs are allowed. uri = %s/?z://)r Exceptionlowerjoin) clsrscheme authoritypathqueryfragment request_uri defrag_uris r_urlnormCacheController._urlnorm?s~6?s^2DYFLM MOO% D7$ 7?4 e^i/+= rc$URU5$)N)r;)r3rs r cache_urlCacheController.cache_urlSs||C  rc [S4[S4[S4SSSSSSSS[S4S. nURSURSS55n0nURS5H}nUR5(dMURS S 5nUS R5nX'upU(aU (dSXG'U(dMaU"US R55XG'M U$![a [ R S U5 Mf=f![a$ U (a[ R S U5 MM[a& [ R SUUR5 GMf=f)NTF)NF) max-agez max-stale min-freshno-cacheno-storez no-transformzonly-if-cachedzmust-revalidatepublicprivatezproxy-revalidatezs-maxagez cache-controlz Cache-Control,=rrz,Ignoring unknown cache-control directive: %sz-Missing value for cache-control directive: %sz8Invalid value for cache-control directive %s, must be %s) intgetsplitstripKeyErrorloggerdebug IndexError ValueError__name__) r)headersknown_directives cc_headersretval cc_directiveparts directivetyprequireds rparse_cache_control#CacheController.parse_cache_controlWsgT{ut%%)+,#$ -d   [['++or2RS (*&,,S1L%%'' &&sA.Ea(I  0 ;  h$(!s (+E!HNN,<(=F%#2> -  KYW " N% "LLU! s*C ?D DD'E#4*E#"E#crURnUceURRU5nUc[R S5 g[ UR[ 5(aURRU5nOSnURRXU5nUc[RS5 U$)z? Load a cached response, or return None if it's not available. NzNo cache entry availablez1Cache entry deserialization failed, entry ignored) urlr%rKrOrP isinstancer get_bodyr'loadswarning)r)requestr> cache_data body_fileresults r_load_from_cache CacheController._load_from_cachesKK $$$ZZ^^I.   LL3 4 djj"7 8 8 ++I6II&&wIF > NNN O rc0URceURUR5n[RSU5 UR UR 5nSU;a[RS5 gSU;aUSS:Xa[RS5 gUR U5nU(dg[UR5[;aS n[RU5 U$[UR 5nU(aS U;aLS U;a0[RS 5 URRU5 [RS 5 g[R"5n[US 5nUce[R "USS5n [#SXy- 5n [RSU 5 UR U5n Sn U R%S5n U bU n [RSU 5 OUSU;aO[US5nUb>[R "USS5U - n[#SU5n [RSU 5 UR%S5n U bU n [RSU 5 UR%S5nUbU U- n [RSU 5 X:a-[RS5 [RSX5 U$S U;a0[RS5 URRU5 g)zM Return a cached response if it exists in the cache, otherwise return False. NzLooking up "%s" in the cacherCz-Request header has "no-cache", cache bypassedFrArz1Request header has "max_age" as 0, cache bypassedzQReturning cached permanent redirect response (ignoring date and etag information)dateetagz(Purging cached response: no date or etagz!Ignoring cached response: no daterzCurrent age based on date: %iz#Freshness lifetime from max-age: %iexpiresz#Freshness lifetime from expires: %iz+Freshness lifetime from request max-age: %irBz'Adjusted current age from min-fresh: %iz2The response is "fresh", returning cached responsez%i > %iz4The cached response is "stale" with no etag, purging)r`r>rOrPr]rTrirJstatusPERMANENT_REDIRECT_STATUSESrr%deletetimercalendartimegmmaxrK)r)rer>ccrespmsgrTnow time_tuplerl current_ageresp_ccfreshness_lifetimemax_agern expire_time min_freshs rcached_requestCacheController.cached_requests {{&&&NN7;;/  3Y?  % %goo 6   LLH I ?r)}1 LLL M$$W- t{{ : :7  LL K,? ,M&/W$ GH !!), LL< =iik!'&/2 %%%z"1~.!SZ(  4kB **73++i(  !(  LL>@R S' !"79#56G"&oogbqk:TA %(K%8" BDVW&&#  !(  LL=?Q FF;'  9 $K LLBK P  + LLM N LL$6 DK  LLO P JJ  i (rcURU5n0nU(a1[UR5nSU;aUSUS'SU;aUSUS'U$)NrmETagz If-None-Matchz last-modifiedz Last-ModifiedzIf-Modified-Since)rirrT)r)rerw new_headersrTs rconditional_headers#CacheController.conditional_headerss\$$W- 0CDLL0QG /6v O,')3:?3K /0rcV[UR[5(aUURRUURR X#S5US9 UbURR X5 ggURRUURR X#U5US9 g)z Store the data in the cache. r)rnN)rar%r setr'dumpsset_body)r)r>reresponsebody expires_times r _cache_setCacheController._cache_sets djj"7 8 8 JJNN%%g=$   ##I4  JJNN%%g>$  rcU=(d URnURU;a"[RSURU5 g[ UR 5nSU;a-[ US5nUce[R"USS5nOSnUb:SU;a4USR5(a[US5[U5:wagURUR 5n URU5n URceURUR5n [RSU 5 Sn S U ;aS n [RS 5 S U ;aS n [RS 5 U (aPURR!U 5(a0[RS 5 URR#U 5 U (agSUR!SS5;a[RS5 gUR$(aSU;aSn UR!S5(a-[ US5nUb[R"USS5U- n ['U S5n [RSU S35 [RS5 UR)XX#U 5 g[UR5[*;a)[RS5 UR)XUS5 gSU;a[ US5nUce[R"USS5nU R!S5nUb3US:a-[RS5 Un UR)U UUUU 5 gSU;auUS(aj[ US5nUb[R"USS5U- n OSn [RSR-U 55 UR)U UUUU 5 gggg)zK Algorithm for caching requests. This assumes a requests Response object. zStatus code %s not in %sNrlrrcontent-lengthz&Updating cache with response from "%s"FrDTzResponse header has "no-store"zRequest header has "no-store"z0Purging existing cache entry to honor "no-store"*varyrGzResponse header has "Vary: *"rmrniuzetag object cached for z secondszCaching due to etagzCaching permanent redirectrrAz'Caching b/c date exists and max-age > 0z4Caching b/c of expires header. expires in {} seconds)r(rorOrPrrTrrsrtisdigitrJlenr]r`r>r%rKrqr&rurrpformat)r)rerrr*r(response_headersrzrlcc_reqrvr>no_storerrnr~s rcache_responseCacheController.cache_response=s".!L1L1L ??"8 8 LL*HOO=S  5H   6  % %%&6v&>?J) ))??:bq>2DD   $44 !12::<<$%5673t9D ))'//:  % %&6 7{{&&&NN7;;/  =yI  H LL9 :  H LL8 9  y11 LLK L JJ  i (   "&&vr2 2 LL8 9    *: :L##I..&'7 'BC&#+??72A;#?$#FL|Z8L LL2<.I J LL. / OOI M !%@ @ LL5 6 OOI# > ' '%&6v&>?J) ))??:bq>2DffY'G"w{ FG&  ..#I.*+;I+FGG*'/wr{'Cd'J '+ LLNUU( OO! $ //'(rcURceURUR5nURU5nU(dU$S/nURR URR 5VVs0sHupgUR 5U;dMXg_M snn5 SUlURX1U5 U$s snnf)zOn a 304 we will get a new set of headers that we want to update our cached value with, assuming we have one. This should only ever be called when we've sent an ETag and gotten a 304 as the response. rr#) r`r>rirTupdateitemsr1ror)r)rerr>cached_responseexcluded_headerskvs rupdate_cached_response&CacheController.update_cached_responses{{&&&NN7;;/ //8O--&&%,,224 4DA779$444  "%  O< s :C C )r%r&r(r')NTNN)r%zBaseCache | Noner&boolr'zSerializer | Noner*Collection[int] | None)rstrreturnr)rTzMapping[str, str]rzdict[str, int | None])rer rzHTTPResponse | None)rer rzHTTPResponse | Literal[False])rer rzdict[str, str])NN) r>rrer rrr bytes | Nonerz int | NonerNone) rer rrrrr*rrr)rer rrrr)rS __module__ __qualname____firstlineno____doc__r+ classmethodr;r>r]rirrrrr__static_attributes__rrr r 0s+>#' (,/3 P P P& P - P&!!4l*l\ ("#' !    !  D"/3 G GG G - G  GR(&(2>( (rr )rrrztuple[str, str, str, str, str])"r __future__rrsloggingrerr email.utilsrtypingrrrpip._vendor.requests.structuresrpip._vendor.cachecontrol.cacher r "pip._vendor.cachecontrol.serializer r pip._vendor.requestsr pip._vendor.urllib3rr getLoggerrSrOcompilerrprr rrrrss # $55?K9408   8 $jjMN(C~~r