hyb
2025-12-30 399ffc4d9829f70529d3b096fe4228f7496cc566
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
Ë
ñúh|(ãóR—dZddlmZddlZddlZddlZddlZddlmZddl    m
Z
ddl m Z m Z mZddlmZddlmZdd    lmZdd
lmZdd lmZdd lmZmZdd lmZej<e«Z dZ!dd„Z"Gd„d«Z#Gd„de#«Z$Gd„de$«Z%Gd„d«Z&Gd„de#«Z'y)zCache Managementé)Ú annotationsN)ÚPath)ÚAny)ÚTagÚinterpreter_nameÚinterpreter_version)Úcanonicalize_name)ÚInvalidWheelFilename)Ú    DirectUrl)ÚLink)ÚWheel)Ú TempDirectoryÚ tempdir_kinds)Ú path_to_urlz origin.jsoncó˜—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)ÚdÚss  úFH:\Change_password\venv_build\Lib\site-packages\pip/_internal/cache.pyÚ
_hash_dictr!s7€ä 
‰
1 °È$ÔO€AÜ >‰>˜!Ÿ(™( 7Ó+Ó ,× 6Ñ 6Ó 8Ð8ócóT‡—eZdZdZdˆfd„ Zdd„Zd    d„Zd
d„Z                                d d„ZˆxZ    S) ÚCachezuAn abstract class - provides cache directories for data from links
 
    :param cache_dir: The root of the cache.
    có~•—t‰|«|r!tjj    |«sJ‚|xsd|_y©N)ÚsuperÚ__init__ÚosÚpathÚisabsÚ    cache_dir©Úselfr,Ú    __class__s  €r r(zCache.__init__'s2ø€Ü ‰ÑÔÙ¤§¡§ ¡ ¨iÔ 8Ð8Ð8Ø"Ò* dˆr"có(—d|ji}|j%|j|j||j<|jr|j|d<t    «|d<t «|d<t |«}|dd|dd|dd|ddg}|S)    z<Get parts of part that must be os.path.joined with cache_dirÚurlNÚ subdirectoryrrééé)Úurl_without_fragmentÚ    hash_nameÚhashÚsubdirectory_fragmentrrr!)r.ÚlinkÚ    key_partsÚhashedÚpartss     r Ú_get_cache_path_partszCache._get_cache_path_parts,s©€ð ˜D×5Ñ5Ð6ˆ    Ø >‰>Ð %¨$¯)©)Ð*?Ø(,¯    ©    ˆId—n‘nÑ %Ø × %Ò %Ø(,×(BÑ(BˆInÑ %ô)9Ó(:ˆ    Ð$Ñ%Ü+>Ó+@ˆ    Ð'Ñ(ô ˜IÓ&ˆð
˜˜˜V A a˜[¨&°°1¨+°v¸a¸b°zÐBˆàˆ r"cóð—|j xs| xs| }|rgS|j|«}tjj    |«r%tj
|«Dcgc]}||f‘Œc}SgScc}wr&)r,Úget_path_for_linkr)r*ÚisdirÚlistdir)r.r:Úcanonical_package_nameÚ can_not_cacher*Ú    candidates      r Ú_get_candidateszCache._get_candidatesMsq€Ø ŸN™NÐ*ÒTÐ2HÐ.HÒTÐPTÈHˆ ٠؈Ià×%Ñ% dÓ+ˆÜ 7‰7=‰=˜Ô Ü79·z±zÀ$Ó7GÖH¨)Y Ò%ÒHÐ H؈    ùòIsÁ# A3có—t«‚)z5Return a directory to store cached items in for link.©ÚNotImplementedError©r.r:s  r r@zCache.get_path_for_linkWs €ä!Ó#Ð#r"có—t«‚)zaReturns a link to a cached item if it exists, otherwise returns the
        passed link.
        rH)r.r:Ú package_nameÚsupported_tagss    r Úgetz    Cache.get[s €ô"Ó#Ð#r"©r,ÚstrÚreturnÚNone)r:r rQz    list[str])r:r rCrPrQz    list[Any]©r:r rQrP©r:r rLú
str | NonerMú    list[Tag]rQr )
Ú__name__Ú
__module__Ú __qualname__Ú__doc__r(r>rFr@rNÚ __classcell__©r/s@r r$r$!sHø„ñõ
+ó
óBó$ð    $àð    $ð!ð    $ð"ð        $ð
 
÷     $r"r$cóD‡—eZdZdZdˆfd„ Zdd„Z                                dd„ZˆxZS)ÚSimpleWheelCachez&A cache of wheels for future installs.có$•—t‰||«yr&)r'r(r-s  €r r(zSimpleWheelCache.__init__jsø€Ü ‰Ñ˜Õ#r"có–—|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)r>r,r)r*Újoin)r.r:r=s   r r@z"SimpleWheelCache.get_path_for_linkms>€ð×*Ñ*¨4Ó0ˆØ~Š~Ј~äw‰w|‰|˜DŸN™N¨HÐ=°uÒ=Ð=r"cóä—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    rFr r
ÚnameÚloggerÚdebugÚ    supportedÚappendÚsupport_index_minÚminr rr)r*rb)
r.r:rLrMÚ
candidatesrCÚ
wheel_nameÚ    wheel_dirÚwheelÚ_s
          r rNzSimpleWheelCache.gets€ð ˆ
áØˆKä!2°<Ó!@ÐØ%)×%9Ñ%9¸$Ð@VÓ%Wò    Ñ !ˆJ˜    ð ܘjÓ)ô! §¡Ó,Ð0FÒFÜ— ‘ ðHàØØ ô ðØ—?‘? >Ô2àØ × Ñ à×+Ñ+¨NÓ;ØØðõ ð#    ñ2؈Kä#& z£?Ñ ˆˆ:yÜ”K¤§¡§ ¡ ¨Y¸
Ó CÓDÓEÐEøô5(ò Ùð ús« C#Ã#    C/Ã.C/rOrSrT)rWrXrYrZr(r@rNr[r\s@r r^r^gs@ø„Ù0õ$ó>ð()Fàð)Fð!ð)Fð"ð    )Fð
 
÷ )Fr"r^có$‡—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*)r.r/s €r r(zEphemWheelCache.__init__°s4ø€Ü&Ü×0Ñ0Ø!ô
ˆŒô
    ‰Ñ˜Ÿ™×,Ñ,Õ-r")rQrR)rWrXrYrZr(r[r\s@r rqrq­sø„ÙL÷.ñ.r"rqcó—eZdZ                dd„Zy)Ú
CacheEntrycó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))r:Ú
persistentÚoriginrÚ    file_pathÚparentÚORIGIN_JSON_NAMEÚexistsr Ú    from_jsonÚ    read_textÚ    ExceptionreÚwarningÚfilename)r.r:r}Ú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)r:r r}Úbool)rWrXrYr(©r"r rxrx¹s„ðàððôr"rxcóv‡—eZdZdZdˆfd„ Zd    d„Zd    d„Z                                d
d„Z                                d d„Ze    d d„«Z
ˆxZ S) Ú
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.
    cób•—t‰||«t|«|_t    «|_yr&)r'r(r^Ú _wheel_cacherqÚ _ephem_cacher-s  €r r(zWheelCache.__init__Øs(ø€Ü ‰Ñ˜Ô#Ü,¨YÓ7ˆÔÜ+Ó-ˆÕr"có8—|jj|«Sr&)rr@rJs  r r@zWheelCache.get_path_for_linkÝó€Ø× Ñ ×2Ñ2°4Ó8Ð8r"có8—|jj|«Sr&)rr@rJs  r Úget_ephem_path_for_linkz"WheelCache.get_ephem_path_for_linkàr’r"cóH—|j|||«}|€|S|jSr&)Úget_cache_entryr:)r.r:rLrMÚ cache_entrys     r rNzWheelCache.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.
        )r:rLrMT)r}FN)rrNrxr)r.r:rLrMÚretvals     r r–zWheelCache.get_cache_entryîs}€ð×"Ñ"×&Ñ&ØØ%Ø)ð'ó
ˆð
˜Ñ ܘf°Ô6Ð 6à×"Ñ"×&Ñ&ØØ%Ø)ð'ó
ˆð
˜Ñ ܘf°Ô7Ð 7àr"có¼—t|«tz }|j«rl    tj|j d¬««}|j |j k7r-tjd|j ||j «    |j|j«d¬«y#t$r!}tjd||«Yd}~ŒGd}~wwxYw)Nrzr{z›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 rƒr„r1rer†r…Ú
write_textÚto_json)r,Ú download_infoÚ origin_pathr~r‰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ÃCrOrSrT)r:r rLrUrMrVrQzCacheEntry | None)r,rPrr rQrR) rWrXrYrZr(r@r”rNr–Ú staticmethodrŸr[r\s@r rrÑsƒø„ñõ .ó
9ó9ð     àð     ð!ð     ð"ð         ð
 
ó      ðàðð!ðð"ð    ð
 
ó ð8òJóôJr"r)rzdict[str, str]rQrP)(rZÚ
__future__rrrÚloggingr)ÚpathlibrÚtypingrÚpip._vendor.packaging.tagsrrrÚ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Ú    getLoggerrWrerr!r$r^rqrxrr‹r"r ú<module>r®sšðÙå"ãÛ ÛÛ    ÝÝçQÑQÝ9å9Ý5Ý*Ý,ßEÝ0à    ˆ×    Ñ    ˜8Ó    $€à Ðó9÷ C$ñC$ôLCFuôCFôL    .Ð&ô    .÷ñô0RJõRJr"