+
     h  c                  s    ^ RI Ht ^ RIt^ RIt^ RIt^ RIHt ^ RIHtH	t	 ^ RI
Ht ^ RIHtHt ^ RIHt ]	'       d   ^ RIHt ^ R	IHt  ! R
 R4      t ! R R]]4      t ! R R]]4      tR R ltR# )i    )annotationsN)dedent)IOTYPE_CHECKING)Path)	BaseCacheSeparateBodyBaseCache)CacheController)datetime)BaseFileLockc                  s    ] tR t^tRtRR R llt]R R l4       tR R ltR	 R
 lt	RR R llt
R R ltR R ltRtR# )_FileCacheMixinz2Shared implementation for both FileCache variants.Nc               s0    V ^8  d   QhRRRRRRRRRR	R
R/# )   	directoryz
str | PathforeverZboolfilemodeZintdirmode
lock_classztype[BaseFileLock] | NonereturnNone Zformat   "O/usr/lib/python3.14/site-packages/pip/_vendor/cachecontrol/caches/file_cache.py__annotate___FileCacheMixin.__annotate__   sF     % %% % 	%
 % .% 
%    c                	s     Vf	   ^ RI Hp TpYn        Y n        Y0n        Y@n        YPn        R #   \         d    \        R4      p\        T4      hi ; i)N)FileLockz
            NOTE: In order to use the FileCache you must have
            filelock installed. You can install it via pip:
              pip install cachecontrol[filecache]
            )	filelockr   ZImportErrorr   r   r   r   r   r   )selfr   r   r   r   r   r   Znotices   &&&&&&  r   __init__Z_FileCacheMixin.__init__   s]    	&!-%
 # $  	&F f%%	&s	   . "Ac                    V ^8  d   QhRRRR/# )r   xstrr   r   r   r   r   r   r   7   s     6 6# 6# 6r   c                	sf    \         P                  ! V P                  4       4      P                  4       # N)hashlibZsha224encodeZ	hexdigest)r   s   &r   r#   Z_FileCacheMixin.encode6   s     ~~ahhj)3355r   c               r   )r   namer    r   r   r   r   r   r   r   :   s     4 4 4 4r   c                	s    V P                  V4      p\        VR ,          4      V.,           p\        P                  P                  ! V P
                  .VO5!  # ):Ni   N)r#   ZlistospathZjoinr   )r   r$   ZhashedZparts   &&  r   _fnZ_FileCacheMixin._fn:   sC     T"VBZ F8+ww||DNN3U33r   c                    V ^8  d   QhRRRR/# )r   keyr    r   zbytes | Noner   r   r   r   r   r   A   s      s | r   c                	s    V P                  V4      p \        VR 4      ;_uu_ 4       pVP                  4       uuRRR4       #   + '       g   i     R# ; i  \         d     R# i ; i)rbN)r(   openZreadFileNotFoundError)r   r*   r$   Zfhr'   r   getZ_FileCacheMixin.getA   sN    xx}	dD!!Rwwy "!!! ! 		s-   A A
A A	A A A%$A%c               s(    V ^8  d   QhRRRRRRRR/# )	r   r*   r    valuebytesexpireszint | datetime | Noner   r   r   r   r   r   r   r   J   s,     ! !!$!/D!	!r   c                	sJ    V P                  V4      pV P                  WB4       R # r!   r(   _write)r   r*   r/   r1   r$   s   &&&& r   setZ_FileCacheMixin.setJ   s     xx}D r   c               $    V ^8  d   QhRRRRRR/# )r   r&   r    datar0   r   r   r   r   r   r   r   r   P   s!     # #3 #e # #r   c                s0   \         P                  P                  V4      p\         P                  ! W0P                  RR7       V P                  VR,           4      ;_uu_ 4        \        P                  ! VR7      w  rE \         P                  ! WB4       \         P                  ! V4       \         P                  ! WPP                  4       \         P                  ! WQ4       RRR4       R#   \         P                  ! T4       i ; i  + '       g   i     R# ; i)z*
Safely write the data to the given path.
T)Zexist_okz.lock)ZdirN)r%   r&   dirnameZmakedirsr   r   tempfileZmkstempZwriteZcloseZchmodr   Zreplace)r   r&   r6   r7   Zfdr$   s   &&&   r   r3   Z_FileCacheMixin._writeP   s    
 ''//$'
G\\D9__TG^,,!))g6JR"HHT==)JJt" -,  -,,s%   "D=C)AD)DDD	c               s$    V ^8  d   QhRRRRRR/# )r   r*   r    suffixr   r   r   r   r   r   r   r   b   s!      3   r   c                	s    V P                  V4      V,           pV P                  '       g    \        P                  ! V4       R # R #   \         d     R # i ; ir!   )r(   r   r%   Zremover-   )r   r*   r9   r$      &&& r   _deleteZ_FileCacheMixin._deleteb   sF    xx}v%|||		$  % s   A AA)r   r   r   r   r   )Fi  i  Nr!   )__name__
__module____qualname____firstlineno____doc__r   Zstaticmethodr#   r(   r.   r4   r3   r;   __static_attributes__r   r   r   r
   r
      s<    <%: 6 64!#$ r   r
   c                  s&    ] tR t^ktRtR R ltRtR# )	FileCachezW
Traditional FileCache: body is stored in memory, so not suitable for large
downloads.
c               r)   r   r*   r    r   r   r   r   r   r   r   ZFileCache.__annotate__q   s      # $ r   c                	s*    V P                  VR 4       R# ) Nr;   r   r*      &&r   deleteZFileCache.deleteq   s    S"r   r   N)r<   r=   r>   r?   r@   rH   rA   r   r   r   rB   rB   k   s    
 r   rB   c                  s>    ] tR t^utRtR R ltR R ltR R ltRtR	# )
SeparateBodyFileCachez\
Memory-efficient FileCache: body is stored in a separate file, reducing
peak memory usage.
c               r)   )r   r*   r    r   zIO[bytes] | Noner   r   r   r   r   "SeparateBodyFileCache.__annotate__{   s      C $4 r   c                	sp    V P                  V4      R ,           p \        VR4      #   \         d     R# i ; i).bodyr+   N)r(   r,   r-   )r   r*   r$      && r   get_bodyZSeparateBodyFileCache.get_body{   s8    xx}w&	d##  		s   & 55c               r5   )r   r*   r    bodyr0   r   r   r   r   r   r   r   rJ      s!        C  u    r   c                	sX    V P                  V4      R ,           pV P                  W24       R# )rK   Nr2   )r   r*   rN   r$   r:   r   set_bodyZSeparateBodyFileCache.set_body   s     xx}w&Dr   c               r)   rC   r   r   r   r   r   rJ      s     # ## #$ #r   c                	sN    V P                  VR 4       V P                  VR4       R# )rD   rK   NrE   rF   rG   r   rH   ZSeparateBodyFileCache.delete   s    S"S'"r   r   N)	r<   r=   r>   r?   r@   rM   rO   rH   rA   r   r   r   rI   rI   u   s    
 # #r   rI   c               s$    V ^8  d   QhRRRRRR/# )r   urlr    	filecacherB   r   r   r   r   r   r   r      s!      # )  r   c                sP    \         P                  ! V 4      pVP                  V4      # )zTReturn the file cache path based on the URL.

This does not ensure the file exists!
)r   Z	cache_urlr(   )rP   rQ   r*   rL   r   url_to_file_pathrR      s#    
 
#
#C
(C==r   )Z
__future__r    r"   r%   r8   Ztextwrapr   Ztypingr   r   Zpathlibr   Zpip._vendor.cachecontrol.cacher   r   Z#pip._vendor.cachecontrol.controllerr   r   r   r	   r
   rB   rI   rR   r   r   r   <module>rS      sZ    #  	   $  K ?!%R Rj #O-B #,r   