2bi(fSrSSKrSSKrSSKrSSKrSSKJr SSKJrJ r J r J r SSK J r JrJr SSKJr SSKJr SSKJr SS KJr SS KJr SS KJrJr SS KJr \R>"\ 5r!S r"S\ \#\#4S\#4Sjr$"SS5r%"SS\%5r&"SS\&5r'"SS5r("SS\%5r)g)zCache Management N)Path)AnyDictListOptional)Taginterpreter_nameinterpreter_version)canonicalize_name)InvalidWheelFilename) DirectUrl)Link)Wheel) TempDirectory tempdir_kinds) path_to_urlz origin.jsondreturnc[R"USSSS9n[R"UR S55R 5$)z'Return a stable sha224 of a dictionary.T),:) sort_keys separators ensure_asciiascii)jsondumpshashlibsha224encode hexdigest)rss څ/builddir/build/BUILDROOT/alt-python313-pip-23.3.1-3.el8.x86_64/opt/alt/python313/lib/python3.13/site-packages/pip/_internal/cache.py _hash_dictr$s7 1$OA >>!((7+ , 6 6 88c^\rSrSrSrS\SS4U4SjjrS\S\\4Sjr S\S \S\\ 4S jr S\S\4S jr S\S \ \S \\S\4SjrSrU=r$)Cache zmAn abstract class - provides cache directories for data from links :param cache_dir: The root of the cache. cache_dirrNc>[TU]5 U(a&[RR U5(deU=(d SUlgN)super__init__ospathisabsr)selfr) __class__s r#r-Cache.__init__&s5  i 8 888"*dr%linkc4SUR0nURb%URbURX!R'UR(aURUS'[ 5US'[ 5US'[ U5nUSSUSSUSSUSS/nU$) z> %$))*?(, Inn %  % %(,(B(BIn %)9(: $%+>+@ '( I& VAa[&1+vabzB r%canonical_package_namec6UR(+=(d U(+=(d U(+nU(a/$URU5n[RR U5(a([R "U5Vs/sHoUU4PM sn$/$s snfr+)r)get_path_for_linkr.r/isdirlistdir)r2r5rE can_not_cacher/ candidates r#_get_candidatesCache._get_candidatesLsx NN*T2H.HTPTH I%%d+ 77==  79zz$7GH7G)%7GH H Is Bc[5e)z5Return a directory to store cached items in for link.NotImplementedErrorr2r5s r#rGCache.get_path_for_linkVs !##r% package_namesupported_tagsc[5e)zQReturns a link to a cached item if it exists, otherwise returns the passed link. rO)r2r5rSrTs r#get Cache.getZs "##r%)r))__name__ __module__ __qualname____firstlineno____doc__strr-rrrCrrLrGrrrV__static_attributes__ __classcell__r3s@r#r'r' s +#+$+ $49BD#$s)$d$s$ $ $sm $S $  $ $r%r'cp^\rSrSrSrS\SS4U4SjjrS\S\4SjrS\S \ \S \ \ S\4S jr S r U=r$) SimpleWheelCachefz&A cache of wheels for future installs.r)rNc$>[TU]U5 gr+)r,r-r1s r#r-SimpleWheelCache.__init__is #r%r5cURU5nUR(de[RR"URS/UQ76$)acReturn a directory to store cached wheels for link Because there are M wheels for any one sdist, we provide a directory to cache them in, and then consult that directory when looking up cache hits. We only insert things into the cache if they have plausible version numbers, so that we don't contaminate the cache with things that were not unique. E.g. ./package might have dozens of installs done for it and build a version of 0.0...and if we built and cached a wheel, we'd end up using the same wheel even if the source has been edited. :param link: The link of the sdist for which this will cache wheels. wheels)rCr)r.r/join)r2r5rBs r#rG"SimpleWheelCache.get_path_for_linkls>**40~~~ww||DNNH=u==r%rSrTc/nU(dU$[U5nURX5Hupg[U5n[UR5U:wa[ R SUUU5 MDURU5(dM\URURU5UU45 M U(dU$[U5upn[[[RRXv555$![a Mf=f)NzWIgnoring cached wheel %s for %s as it does not match the expected distribution name %s.)r rLrr nameloggerdebug supportedappendsupport_index_minminrrr.r/rh) r2r5rSrT candidatesrE wheel_name wheel_dirwheel_s r#rVSimpleWheelCache.gets  K!222   ++N; #&X2K#&z? yK Y CDEE5(  s C33 DD)rXrYrZr[r\r]r-rrGrrrrVr^r_r`s@r#rbrbfsj0$#$$$>d>s>()F)Fsm)FS )F  )F)Fr%rbc0^\rSrSrSrSU4SjjrSrU=r$)EphemWheelCachezBA SimpleWheelCache that creates it's own temporary cache directoryc>[[RSS9Ul[TU]URR 5 g)NT)kindglobally_managed)rrEPHEM_WHEEL_CACHE _temp_dirr,r-r/)r2r3s r#r-EphemWheelCache.__init__s4&00!  ,,-r%)r)rN)rXrYrZr[r\r-r^r_r`s@r#rzrzsL..r%rzc&\rSrSrS\S\4SjrSrg) CacheEntryr5 persistentczXlX lSUl[URR5R [ - nUR5(a*[R"URSS95Ulgg![a,n[RSUURU5 SnAgSnAff=f)Nutf-8encodingz7Ignoring invalid cache entry origin file %s for %s (%s))r5roriginr file_pathparentORIGIN_JSON_NAMEexistsr from_json read_text Exceptionrlwarningfilename)r2r5rorigin_direct_url_pathes r#r-CacheEntry.__init__s  $+/ !%dii&9&9!:!A!ADT!T ! ( ( * * '11*44g4F  +  M*MM  s(B B:"B55B:)r5rrN)rXrYrZr[rboolr-r^rxr%r#rrsr%rc ^\rSrSrSrS\SS4U4SjjrS\S\4SjrS\S\4S jr S\S \ \S \ \ S\4S jr S\S \ \S \ \ S\ \4S jr\S\S\SS4Sj5rSrU=r$) WheelCachezWraps EphemWheelCache and SimpleWheelCache into a single Cache This Cache allows for gracefully degradation, using the ephem wheel cache when a certain link is not found in the simple wheel cache first. r)rNcb>[TU]U5 [U5Ul[ 5Ulgr+)r,r-rb _wheel_cacherz _ephem_cacher1s r#r-WheelCache.__init__s( #,Y7+-r%r5c8URRU5$r+)rrGrQs r#rGWheelCache.get_path_for_link  22488r%c8URRU5$r+)rrGrQs r#get_ephem_path_for_link"WheelCache.get_ephem_path_for_linkrr%rSrTcHURXU5nUcU$UR$r+)get_cache_entryr5)r2r5rSrT cache_entrys r#rVWheelCache.gets- **4~N  Kr%cURRUUUS9nXALa [USS9$URRUUUS9nXALa [USS9$g)zReturns a CacheEntry with a link to a cached item if it exists or None. The cache entry indicates if the item was found in the persistent or ephemeral cache. )r5rSrTT)rFN)rrVrr)r2r5rSrTretvals r#rWheelCache.get_cache_entrysy""&&%)'   f6 6""&&%)'   f7 7r% download_infoc[U5[- nUR5(aj[R"UR SS95nUR UR :wa,[RSUR UUR 5 URUR5SS9 g![a!n[RSUU5 SnANESnAff=f)NrrzOrigin URL %s in cache entry %s does not match download URL %s. This is likely a pip bug or a cache corruption issue. Will overwrite it with the new value.zPCould not read origin file %s in cache entry (%s). Will attempt to overwrite it.) rrrr rrr7rlrr write_textto_json)r)r origin_pathrrs r#record_download_origin!WheelCache.record_download_origin s9o(88      ",,[-B-BG-B-TU::!2!22NN@ !%))  }446I' 4  s#B11 C;CC)rr)rXrYrZr[r\r]r-rrGrrrrrVrr staticmethodr rr^r_r`s@r#rrs .#.$. 9d9s99D9S9    sm  S    smS  *  8J#JiJDJJr%r)*r\rrloggingr.pathlibrtypingrrrrpip._vendor.packaging.tagsrr r pip._vendor.packaging.utilsr pip._internal.exceptionsr pip._internal.models.direct_urlr pip._internal.models.linkrpip._internal.models.wheelrpip._internal.utils.temp_dirrrpip._internal.utils.urlsr getLoggerrXrlrr]r$r'rbrzrrrxr%r#rs  ,,QQ995*,E0   8 $ 9$sCx.9S9 C$C$LCFuCFL .& .0RJRJr%