Ë  „Ç=nö´ãód—dZddlZddlZddlZddlZddlmZddlmZm Z m Z m Z ddl m Z mZmZddlmZddlmZddlmZdd lmZdd lmZdd lmZmZdd lmZej>e «Z!d Z"de e#e#fde#fd„Z$Gd„d«Z%Gd„de%«Z&Gd„de&«Z'Gd„d«Z(Gd„de%«Z)y)zCache Management éN)ÚPath)ÚAnyÚDictÚListÚOptional)ÚTagÚinterpreter_nameÚinterpreter_version)Úcanonicalize_name)ÚInvalidWheelFilename)Ú DirectUrl)ÚLink)ÚWheel)Ú TempDirectoryÚ tempdir_kinds)Ú path_to_urlz origin.jsonÚdÚreturncó˜—tj|ddd¬«}tj|j d««j «S)z'Return a stable sha224 of a dictionary.T)Ú,Ú:)Ú sort_keysÚ separatorsÚ ensure_asciiÚascii)ÚjsonÚdumpsÚhashlibÚsha224ÚencodeÚ hexdigest)rÚss ú8/usr/lib/python3.12/site-packages/pip/_internal/cache.pyÚ _hash_dictr$s7€ä � ‰ �1 °È$ÔO€AÜ �>‰>˜!Ÿ(™( 7Ó+Ó ,× 6Ñ 6Ó 8Ð8ócó�‡—eZdZdZdeddfˆfd„ Zdedeefd„Zdededee fd „Z dedefd „Z ded e ed ee defd „ZˆxZS)ÚCachezuAn abstract class - provides cache directories for data from links :param cache_dir: The root of the cache. Ú cache_dirrNcó~•—t‰|�«|r!tjj |«sJ‚|xsd|_y©N)ÚsuperÚ__init__ÚosÚpathÚisabsr(©Úselfr(Ú __class__s €r#r,zCache.__init__&s2ø€Ü ‰ÑÔÙ¤§¡§ ¡ ¨iÔ 8Ð8Ð8Ø"Ò* dˆ�r%Úlinkcó(—d|ji}|j�%|j�|j||j<|jr|j|d<t «|d<t «|d<t |«}|dd|dd|dd|ddg}|S) z‰>Ð %¨$¯)©)Ð*?Ø(,¯ © ˆI�d—n‘nÑ %Ø × %Ò %Ø(,×(BÑ(BˆI�nÑ %ô)9Ó(:ˆ Ð$Ñ%Ü+>Ó+@ˆ Ð'Ñ(ô ˜IÓ&ˆð ˜˜�˜V A a˜[¨&°°1¨+°v¸a¸b°zÐBˆàˆ r%Úcanonical_package_namecóð—|j xs| xs| }|rgS|j|«}tjj |«r%tj |«D�cgc]}||f‘Œc}SgScc}wr*)r(Úget_path_for_linkr-r.ÚisdirÚlistdir)r1r3rBÚ can_not_cacher.Ú candidates r#Ú_get_candidateszCache._get_candidatesLsw€Ø ŸN™NÐ*ÒTÐ2HÐ.HÒTÐPTÈHˆ ٠؈Ià×%Ñ% dÓ+ˆÜ �7‰7�=‰=˜Ô Ü79·z±zÀ$Ô7GÓHÑ7G¨)�Y Ò%Ð7GÑHÐ H؈ ùòIsÁ# A3có—t«‚)z5Return a directory to store cached items in for link.©ÚNotImplementedError©r1r3s r#rDzCache.get_path_for_linkVs €ä!Ó#Ð#r%Ú package_nameÚsupported_tagscó—t«‚)zaReturns a link to a cached item if it exists, otherwise returns the passed link. rK)r1r3rNrOs r#Úgetz Cache.getZs €ô"Ó#Ð#r%)Ú__name__Ú __module__Ú __qualname__Ú__doc__Ústrr,rrrArrIrDrrrQÚ __classcell__©r2s@r#r'r' s—ø„ñð + #ð+¨$õ+ð ¨$ð°4¸±9óðB DðÀ#ðÈ$ÈsÉ)óð$ dð$¨só$ð $àð $ð˜s‘mð $ð˜S™ ð $ð ÷ $r%r'có`‡—eZdZdZdeddfˆfd„ Zdedefd„Zdedeed e e defd „Z ˆxZ S) ÚSimpleWheelCachez&A cache of wheels for future installs.r(rNcó$•—t‰|�|«yr*)r+r,r0s €r#r,zSimpleWheelCache.__init__isø€Ü ‰Ñ˜Õ#r%r3có–—|j|«}|jsJ‚tjj|jdg|¢­ŽS)a³Return 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)rAr(r-r.Újoin)r1r3r@s r#rDz"SimpleWheelCache.get_path_for_linkls>€ð×*Ñ*¨4Ó0ˆØ�~Š~Ј~ä�w‰w�|‰|˜DŸN™N¨HÐ=°uÒ=Ð=r%rNrOcóä—g}|s|St|«}|j||«D]w\}} t|«}t|j«|k7rt j d|||«ŒC|j|«sŒU|j|j|«||f«Œy|s|St|«\} }}tttjj||«««S#t$rYŒÊwxYw)NzWIgnoring cached wheel %s for %s as it does not match the expected distribution name %s.)r rIrr ÚnameÚloggerÚdebugÚ supportedÚappendÚsupport_index_minÚminrrr-r.r^) r1r3rNrOÚ candidatesrBÚ wheel_nameÚ wheel_dirÚwheelÚ_s r#rQzSimpleWheelCache.get€s€ð ˆ áØˆKä!2°<Ó!@ÐØ%)×%9Ñ%9¸$Ð@VÖ%WÑ !ˆJ˜ ð ܘjÓ)�ô! §¡Ó,Ð0FÒFÜ— ‘ ðHàØØ ô ðØ—?‘? >Ô2àØ × Ñ à×+Ñ+¨NÓ;ØØðõ ð#&Xñ2؈Kä#& z£?Ñ ˆˆ:�yÜ”K¤§¡§ ¡ ¨Y¸ Ó CÓDÓEÐEøô5(ò Ùð ús« C#Ã# C/Ã.C/) rRrSrTrUrVr,rrDrrrrQrWrXs@r#rZrZfsdø„Ù0ð$ #ð$¨$õ$ð> dð>¨só>ð()Fàð)Fð˜s‘mð)Fð˜S™ ð )Fð ÷ )Fr%rZcó$‡—eZdZdZdˆfd„ ZˆxZS)ÚEphemWheelCachezBA SimpleWheelCache that creates it's own temporary cache directoryc󌕗ttjd¬«|_t‰|�|jj «y)NT)ÚkindÚglobally_managed)rrÚEPHEM_WHEEL_CACHEÚ _temp_dirr+r,r.)r1r2s €r#r,zEphemWheelCache.__init__¯s4ø€Ü&Ü×0Ñ0Ø!ô ˆŒô ‰Ñ˜Ÿ™×,Ñ,Õ-r%)rN)rRrSrTrUr,rWrXs@r#rmrm¬sø„ÙL÷.ñ.r%rmcó—eZdZdedefd„Zy)Ú CacheEntryr3Ú persistentcóv—||_||_d|_t|jj«j t z }|j«r, tj|jd¬««|_yy#t$r,}tjd||j|«Yd}~yd}~wwxYw)Núutf-8©Úencodingz7Ignoring invalid cache entry origin file %s for %s (%s))r3ruÚoriginrÚ file_pathÚparentÚORIGIN_JSON_NAMEÚexistsr Ú from_jsonÚ read_textÚ ExceptionraÚwarningÚfilename)r1r3ruÚorigin_direct_url_pathÚes r#r,zCacheEntry.__init__¹s¦€ð ˆŒ Ø$ˆŒØ+/ˆŒ Ü!% d§i¡i×&9Ñ&9Ó!:×!AÑ!AÔDTÑ!TÐØ !× (Ñ (Ô *ð Ü'×1Ñ1Ø*×4Ñ4¸gÐ4ÓFó�• ð +øô ò Ü—‘ØMØ*Ø—M‘MØ÷ ñûð úsÁ*B B8 "B3Â3B8N)rRrSrTrÚboolr,©r%r#rtrt¸s„ðàððôr%rtc 󸇗eZdZdZdeddfˆfd„ Zdedefd„Zdedefd„Zded e ed e e defd „Z ded e ed e e de e fd „Zeded eddfd„«ZˆxZS)Ú WheelCachezØWraps 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(rNcób•—t‰|�|«t|«|_t «|_yr*)r+r,rZÚ _wheel_cachermÚ _ephem_cacher0s €r#r,zWheelCache.__init__×s(ø€Ü ‰Ñ˜Ô#Ü,¨YÓ7ˆÔÜ+Ó-ˆÕr%r3có8—|jj|«Sr*)r‹rDrMs r#rDzWheelCache.get_path_for_linkÜó€Ø× Ñ ×2Ñ2°4Ó8Ð8r%có8—|jj|«Sr*)rŒrDrMs r#Úget_ephem_path_for_linkz"WheelCache.get_ephem_path_for_linkßrŽr%rNrOcóH—|j|||«}|€|S|jSr*)Úget_cache_entryr3)r1r3rNrOÚ cache_entrys r#rQzWheelCache.getâs/€ð ×*Ñ*¨4°¸~ÓNˆ Ø Ð ØˆKØ×ÑÐr%cóÀ—|jj|||¬«}||ur t|d¬«S|jj|||¬«}||ur t|d¬«Sy)z¶Returns 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. )r3rNrOT)ruFN)r‹rQrtrŒ)r1r3rNrOÚretvals r#r’zWheelCache.get_cache_entryís}€ð×"Ñ"×&Ñ&ØØ%Ø)ð'ó ˆð ˜Ñ ܘf°Ô6Ð 6à×"Ñ"×&Ñ&ØØ%Ø)ð'ó ˆð ˜Ñ ܘf°Ô7Ð 7àr%Ú download_infocó¼—t|«tz }|j«rl tj|j d¬««}|j |j k7r-tjd|j ||j « |j|j«d¬«y#t$r!}tjd||«Yd}~ŒGd}~wwxYw)Nrwrxz›Origin 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.) rr}r~r rr€r5rar‚r�Ú write_textÚto_json)r(r–Ú origin_pathrzr…s r#Úrecord_download_originz!WheelCache.record_download_origin sÇ€ä˜9“oÔ(8Ñ8ˆ Ø × Ñ Ô ð Ü"×,Ñ,¨[×-BÑ-BÈGÐ-BÓ-TÓU�ð—:‘: ×!2Ñ!2Ò2Ü—N‘Nð@🠙 Ø!Ø%×)Ñ)õ ð ×ј}×4Ñ4Ó6ÀÐÕIøô'ò Ü—‘ð4àØ÷ ñûð ús¤%B1Â1 CÂ:CÃC)rRrSrTrUrVr,rrDr�rrrrQrtr’Ú staticmethodr r›rWrXs@r#r‰r‰ÐsÚø„ñð . #ð.¨$õ.ð 9 dð9¨só9ð9¨Dð9°Só9ð  àð  ð˜s‘mð  ð˜S™ ð  ð ó  ðàðð˜s‘mðð˜S™ ð ð �*Ñ ó ð8ðJ¨#ðJ¸iðJÈDòJóôJr%r‰)*rUrrÚloggingr-ÚpathlibrÚtypingrrrrÚpip._vendor.packaging.tagsrr r Úpip._vendor.packaging.utilsr Úpip._internal.exceptionsr Úpip._internal.models.direct_urlr Úpip._internal.models.linkrÚpip._internal.models.wheelrÚpip._internal.utils.temp_dirrrÚpip._internal.utils.urlsrÚ getLoggerrRrar}rVr$r'rZrmrtr‰r‡r%r#Úr©s´ðñóÛ ÛÛ Ýß,Ó,çQÑQÝ9å9Ý5Ý*Ý,ßEÝ0à ˆ× Ñ ˜8Ó $€à Ðð9�$�s˜C�x‘.ð9 Só9÷ C$ñC$ôLCF�uôCFôL .Ð&ô .÷ñô0RJ�õRJr%