§ ]<ˆj_ãóÖ—dZddlZddlmZddlmZddlmZmZmZm Z ddl m Z ddl m Z ddlmZdd lmZmZdd lmZd ed efd „Zed edfd„¦«ZGd„de ¦«ZdS)zHTTP cache implementation. éN)Úcontextmanager)Údatetime)ÚBinaryIOÚ GeneratorÚOptionalÚUnion)ÚSeparateBodyBaseCache)ÚSeparateBodyFileCache)ÚResponse)Úadjacent_tmp_fileÚreplace)Ú ensure_dirÚresponseÚreturncó$—t|dd¦«S)NÚ from_cacheF)Úgetattr)rs úm/builddir/build/BUILD/cloudlinux-venv-1.0.12/venv/lib/python3.11/site-packages/pip/_internal/network/cache.pyÚ is_from_cachers€Ý �8˜\¨5Ñ 1Ô 1Ð1ó)NNNc#ó6K— dV—dS#t$rYdSwxYw)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 óÚ‡—eZdZdZdeddfˆfd„ Zdedefd„Zdedeefd „Z d ed eddfd „Z dded ede e e dfddfd„Zdeddfd„Zdedeefd„Zdededdfd„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. Ú directoryrNcón•—|€ Jd¦«‚t¦« ¦«||_dS)Nz!Cache directory must not be None.)ÚsuperÚ__init__r)ÚselfrÚ __class__s €rr zSafeFileCache.__init__2s9ø€ØÐ$Ð$Ð&IÑ$Ô$Ð$Ý ‰Œ×ÒÑÔÐØ"ˆŒˆˆrÚnamecó˜—tj|¦«}t|dd…¦«|gz}tjj|jg|¢RŽS)Né)r ÚencodeÚlistÚosÚpathÚjoinr)r!r#ÚhashedÚpartss rÚ_get_cache_pathzSafeFileCache._get_cache_path7sL€õ'Ô-¨dÑ3Ô3ˆÝ�V˜B˜Q˜B”ZÑ Ô  F 8Ñ+ˆÝŒwŒ|˜DœNÐ3¨UÐ3Ð3Ð3Ð3rÚkeycóš—| |¦«}|dz}tj |¦«rtj |¦«sdSt ¦«5t |d¦«5}| ¦«cddd¦«cddd¦«S#1swxYwY ddd¦«dS#1swxYwYdS©Nú.bodyÚrb)r-r(r)ÚexistsrÚopenÚread)r!r.Ú metadata_pathÚ body_pathÚfs rÚgetzSafeFileCache.get?sY€à×,Ò,¨SÑ1Ô1ˆ Ø! GÑ+ˆ Ý”—’˜}Ñ-Ô-ð µ"´'·.².ÀÑ2KÔ2Kð Ø�4Ý $Ñ &Ô &ð ð Ý�m TÑ*Ô*ð ¨aØ—v’v‘x”xð ð ð ð ñ ô ð ð ð ð ð ñ ô ð ð ð ð ð ð øøøð ð ð ð ð ð ð ð ñ ô ð ð ð ð ð ð ð øøøð ð ð ð ð ð s6Á)CÁ:B' CÂ'B+ Â+CÂ.B+ Â/CÃCÃCr)ÚdatacóN—t¦«5ttj |¦«¦«t |¦«5}| |¦«ddd¦«n #1swxYwYt|j|¦«ddd¦«dS#1swxYwYdS©N) rrr(r)Údirnamer Úwriter r#)r!r)r:r8s rÚ_writezSafeFileCache._writeIs€Ý $Ñ &Ô &ð "ð "Ý •r”w—’ tÑ,Ô,Ñ -Ô -Ð -å" 4Ñ(Ô(ð ¨AØ—’˜‘ ” � ð ð ð ñ ô ð ð ð ð ð ð øøøð ð ð ð õ �A”F˜DÑ !Ô !Ð !ð  "ð "ð "ñ "ô "ð "ð "ð "ð "ð "ð "ð "øøøð "ð "ð "ð "ð "ð "s5�r^sPðððð € € € Ø%Ð%Ð%Ð%Ð%Ð%ØÐÐÐÐÐØ7Ð7Ð7Ð7Ð7Ð7Ð7Ð7Ð7Ð7Ð7Ð7à@Ð@Ð@Ð@Ð@Ð@ØAÐAÐAÐAÐAÐAØ0Ð0Ð0Ð0Ð0Ð0àEÐEÐEÐEÐEÐEÐEÐEØ/Ð/Ð/Ð/Ð/Ð/ð2˜Hð2¨ð2ð2ð2ð2ðð  Ð+;Ô!<ð ð ð ñ„ð ðJ ðJ ðJ ðJ ðJ Ð)ñJ ôJ ðJ ðJ ðJ r