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
Ë
ñúh¶ãó̗dZddlmZddlZddlZddlmZddlmZddl    m    Z    ddl
m Z m Z m Z ddlmZdd    lmZdd
lmZdd lmZmZdd lmZdd „Zedd„«ZGd„de«Zy)zHTTP cache implementation.é)Ú annotationsN)Ú    Generator)Úcontextmanager)Údatetime)ÚAnyÚBinaryIOÚCallable)ÚSeparateBodyBaseCache)ÚSeparateBodyFileCache)ÚResponse)Úadjacent_tmp_fileÚreplace)Ú
ensure_dircó—t|dd«S)NÚ
from_cacheF)Úgetattr)Úresponses úNH:\Change_password\venv_build\Lib\site-packages\pip/_internal/network/cache.pyÚ is_from_cachers€Ü 8˜\¨5Ó 1Ð1óc#ó4K—    d–—y#t$rYywxYw­w)zvIf we can't access the cache then we can just skip caching and process
    requests as if caching wasn't enabled.
    N)ÚOSError©rrÚsuppressed_cache_errorsrsèø€ð
 Ü øÜ ò Ù ð üs‚„    ˆ‰    ’”•c󆇗eZdZdZd ˆfd„ Zdd„Zdd„Zdd„Zdd„Zdd„Z        d                            dd„Z
dd    „Z dd
„Z dd „Z dd „ZˆxZS)Ú SafeFileCacheaG
    A file based cache which is safe to use even when the target directory may
    not be accessible or writable.
 
    There is a race condition when two processes try to write and/or read the
    same entry at the same time, since each entry consists of two separate
    files (https://github.com/psf/cachecontrol/issues/324).  We therefore have
    additional logic that makes sure that both files to be present before
    returning an entry; this fixes the read side of the race condition.
 
    For the write side, we assume that the server will only ever return the
    same data for the same URL, which ought to be the case for files pip is
    downloading.  PyPI does not have a mechanism to swap out a wheel for
    another wheel, for example.  If this assumption is not true, the
    CacheControl issue will need to be fixed.
    cóB•—|€Jd«‚t‰|«||_y)Nz!Cache directory must not be None.)ÚsuperÚ__init__Ú    directory)Úselfr Ú    __class__s  €rrzSafeFileCache.__init__5s'ø€ØÐ$ÐIÐ&IÓIÐ$Ü ‰ÑÔØ"ˆrcó¤—tj|«}t|dd«|gz}tjj
|j g|¢­ŽS)Né)r ÚencodeÚlistÚosÚpathÚjoinr )r!ÚnameÚhashedÚpartss    rÚ_get_cache_pathzSafeFileCache._get_cache_path:sG€ô'×-Ñ-¨dÓ3ˆÜV˜B˜QZÓ  F 8Ñ+ˆÜw‰w|‰|˜DŸN™NÐ3¨UÒ3Ð3rcód—|j|«}|dz}tjj|«rtjj|«syt    «5t |d«5}|j «cddd«cddd«S#1swYnxYw    ddd«y#1swYyxYw©Nú.bodyÚrb)r-r'r(ÚexistsrÚopenÚread)r!ÚkeyÚ metadata_pathÚ    body_pathÚfs     rÚgetzSafeFileCache.getBs—€à×,Ñ,¨SÓ1ˆ Ø! GÑ+ˆ    Ü—‘—‘˜}Ô-´"·'±'·.±.ÀÔ2KØÜ $Ó &ñ     Üm TÓ*ð  ¨aØ—v‘v“x÷  ð  ÷     ñ     ÷  ð  úð  ÷     ÷     ñ     ús$Á  B&Á-BÁ=    B&ÂB    ÂB&Â&B/cóz—t«5ttjj    |««t |«5}||«tj |j«jdzdz}tjtjvr%tj|j«|«nBtjtjvr"tj|j|d¬«ddd«tj|«ddd«y#1swYŒ(xYw#1swYyxYw)zICommon file writing logic with proper permissions and atomic replacement.i¶i€F)Úfollow_symlinksN)rrr'r(Údirnamer Ústatr Úst_modeÚchmodÚ supports_fdÚfilenoÚsupports_follow_symlinksr*r)r!r(Ú writer_funcr8Úmodes     rÚ_write_to_filezSafeFileCache._write_to_fileLsê€ä $Ó &ñ    "Ü ”r—w‘w—‘ tÓ,Ô -ä" 4Ó(ð B¨AÙ˜A”ô—G‘G˜DŸN™NÓ+×3Ñ3Øñàñðô —8‘8œrŸ~™~Ñ-Ü—H‘H˜QŸX™X›Z¨Õ.Ü—X‘X¤×!<Ñ!<Ñ<Ü—H‘H˜QŸV™V T¸5ÕA÷ Bô A—F‘F˜DÔ !÷%    "ð    "÷ Bð Bú÷    "ð    "ús#‹4D1¿B?D%Ã>D1Ä%D.    Ä*D1Ä1D:có0‡—|j|ˆfd„«y)Ncó&•—|j‰«S©N)Úwrite)r8Údatas €rú<lambda>z&SafeFileCache._write.<locals>.<lambda>csø€¨A¯G©G°D«M€r©rE)r!r(rJs  `rÚ_writezSafeFileCache._writebsø€Ø ×јDÓ"9Õ:rcó0‡—|j|ˆfd„«y)Ncó0•—tj‰|«SrH)ÚshutilÚ copyfileobj)r8Ú source_files €rrKz.SafeFileCache._write_from_io.<locals>.<lambda>fsø€¬F×,>Ñ,>¸{ÈAÓ,N€rrL)r!r(rRs  `rÚ_write_from_iozSafeFileCache._write_from_ioesø€Ø ×јDÓ"NÕOrcóJ—|j|«}|j||«yrH©r-rM)r!r5ÚvalueÚexpiresr(s     rÚsetzSafeFileCache.seths"€ð×#Ñ# CÓ(ˆØ  ‰ D˜%Õ rcóü—|j|«}t«5tj|«ddd«t«5tj|dz«ddd«y#1swYŒ5xYw#1swYyxYw©Nr0)r-rr'Úremove)r!r5r(s   rÚdeletezSafeFileCache.deletensh€Ø×#Ñ# CÓ(ˆÜ $Ó &ñ    Ü I‰IdŒO÷    ä $Ó &ñ    &Ü I‰Id˜W‘nÔ %÷    &ð    &÷    ð    ú÷    &ð    &úsœA&ÁA2Á&A/Á2A;có—|j|«}|dz}tjj|«rtjj|«syt    «5t |d«cddd«S#1swYyxYwr/)r-r'r(r2rr3)r!r5r6r7s    rÚget_bodyzSafeFileCache.get_bodyusc€à×,Ñ,¨SÓ1ˆ Ø! GÑ+ˆ    Ü—‘—‘˜}Ô-´"·'±'·.±.ÀÔ2KØÜ $Ó &ñ    )ܘ     4Ó(÷    )÷    )ò    )ús Á  A6Á6A?cóP—|j|«dz}|j||«yrZrU)r!r5Úbodyr(s    rÚset_bodyzSafeFileCache.set_body~s%€Ø×#Ñ# CÓ(¨7Ñ2ˆØ  ‰ D˜$ÕrcóP—|j|«dz}|j||«y)z3Set the body of the cache entry from a file object.r0N)r-rS)r!r5Ú    body_filer(s    rÚset_body_from_iozSafeFileCache.set_body_from_io‚s'€à×#Ñ# CÓ(¨7Ñ2ˆØ ×јD )Õ,r)r ÚstrÚreturnÚNone)r*rerfre)r5rerfz bytes | None)r(rerCzCallable[[BinaryIO], Any]rfrg)r(rerJÚbytesrfrg)r(rerRrrfrgrH)r5rerVrhrWzint | datetime | Nonerfrg)r5rerfrg)r5rerfzBinaryIO | None)r5rer`rhrfrg)r5rercrrfrg)Ú__name__Ú
__module__Ú __qualname__Ú__doc__rr-r9rErMrSrXr\r^rardÚ __classcell__)r"s@rrr#sgø„ñõ"#ó
4ó ó"ó,;óPðHLð!Øð!Ø$ð!Ø/Dð!à     ó!ó &ó)ó ÷-rr)rr rfÚbool)rfzGenerator[None, None, None])rlÚ
__future__rr'rPÚcollections.abcrÚ
contextlibrrÚtypingrrr    Úpip._vendor.cachecontrol.cacher
Úpip._vendor.cachecontrol.cachesr Úpip._vendor.requests.modelsr Úpip._internal.utils.filesystemr rÚpip._internal.utils.miscrrrrrrrú<module>rxsWðÙ å"ã    Û Ý%Ý%Ýß*Ñ*å@ÝAÝ0çEÝ/ó2ðò óð ôb-Ð)õb-r