+
    <jV                     4   ^ RI t ^ RIt^ RIt^ RIt^ RIt^ RIHt ^ RIHt ^ RI	H
t
HtHtHtHtHt ^ RIHt ^ RIHt ^ RIHt R R	 lt]R
 R l4       t]! ^RR7      ! ]P0                  4      tR R ltR R ltR R ltR R ltR R ltR R ltR R ltR# )    N)contextmanager)NamedTemporaryFile)AnyBinaryIO	GeneratorListUnioncast)get_path_uid)format_size)retryc                0    V ^8  d   QhR\         R\        /#    pathreturnstrbool)formats   "S/opt/headortail/venv/lib/python3.14/site-packages/pip/_internal/utils/filesystem.py__annotate__r      s      3 4     c                    \         P                  R 8X  g   \        \        R4      '       g   R# \        P                  P                  V 4      '       g   Q hRpW8w  d   \        P                  P                  V 4      '       dQ   \        P                  ! 4       ^ 8X  d    \        V 4      pV^ 8H  # \        P                  ! V \        P                  4      # T \        P                  P                  V 4      rK  R#   \         d     R# i ; i)win32geteuidTNF)sysplatformhasattrosr   isabslexistsr   r   OSErroraccessW_OKdirname)r   previouspath_uids   &  r   check_path_ownerr)      s     ||wgb)&<&<77==H

77??4  zz|q !+D1H  1}$yyrww//!277??4#8d  ! !s   C6 6DDc          	      X    V ^8  d   QhR\         R\        R\        \        RR3,          /# )r   r   kwargsr   N)r   r   r   r   )r   s   "r   r   r   +   s-     & &C &3 &9XtT=Q3R &r   c              +    "   \        RRRR\        P                  P                  V 4      R\        P                  P	                  V 4      RR/VB ;_uu_ 4       p\        \        V4      p Vx  VP                  4        \        P                  ! VP                  4       4        RRR4       R#   TP                  4        \        P                  ! TP                  4       4       i ; i  + '       g   i     R# ; i5i)	a  Return a file-like object pointing to a tmp file next to path.

The file is created securely and is ensured to be written to disk
after the context reaches its end.

kwargs will be passed to tempfile.NamedTemporaryFile to control
the way the temporary file will be opened.
deleteFdirprefixsuffixz.tmpN )
r   r    r   r&   basenamer
   r   flushfsyncfileno)r   r+   fresults   &,  r   adjacent_tmp_filer8   *   s      
 

GGOOD!
 ww%
 	

 
 
 
h"	&LLLNHHV]]_%
 
 LLNHHV]]_%
 
 
s6   AC:C&*B-.4C&#
C:-6C##C&&C7	1	C:g      ?)stop_after_delaywaitc                0    V ^8  d   QhR\         R\        /# r   r   )r   s   "r   r   r   H   s     ( (C (D (r   c                *   \         P                  P                  V 4      '       g+   \         P                  P                  V 4      pW8X  d   MTp KO  \         P                  R8X  d&   \         P
                  ! V \         P                  4      # \        V 4      # )z_Check if a directory is writable.

Uses os.access() on POSIX, tries creating files on Windows.
posix)r    r   isdirr&   namer$   r%   _test_writable_dir_win)r   parents   & r   test_writable_dirrB   H   sb     ggmmD!!&>	ww'yyrww''!$''r   c                0    V ^8  d   QhR\         R\        /# r   r   )r   s   "r   r   r   Z   s     I I I Ir   c                   a R pRo\        ^
4       F  pVRP                  V3R l\        ^4       4       4      ,           p\        P                  P                  W4      p \        P                  ! V\        P
                  \        P                  ,          \        P                  ,          4      p\        P                  ! V4       \        P                  ! V4        R# 	  \        R4      h  \         d     K  \         d      R# i ; i)(accesstest_deleteme_fishfingers_custard_$abcdefghijklmnopqrstuvwxyz0123456789 c              3   P   <"   T F  p\         P                  ! S4      x  K  	  R # 5iN)randomchoice).0_alphabets   & r   	<genexpr>)_test_writable_dir_win.<locals>.<genexpr>`   s     !L8a&--"9"98s   #&TFz3Unexpected condition testing for writable directory)rangejoinr    r   openO_RDWRO_CREATO_EXCLcloseunlinkFileExistsErrorPermissionErrorr#   )r   r2   rM   r?   filefdrN   s   &     @r   r@   r@   Z   s     :H5H2Y"''!L58!LLLww||D'	ryy2::5		ABB HHRLIIdO# ( G
HH  	 	 	s   AC**D8DDDc                R    V ^8  d   QhR\         R\         R\        \         ,          /# )r   r   patternr   )r   r   )r   s   "r   r   r   v   s%      S 3 49 r   c                   a . p\         P                  ! V 4       F7  w  or4\        P                  ! WA4      pVP	                  V3R lV 4       4       K9  	  V# )zReturns a list of absolute paths of files beneath path, recursively,
with filenames which match the UNIX-style shell glob pattern.c              3   d   <"   T F%  p\         P                  P                  SV4      x  K'  	  R # 5irI   )r    r   rR   )rL   r6   roots   & r   rO   find_files.<locals>.<genexpr>|   s#     =Wbggll4++Ws   -0)r    walkfnmatchfilterextend)r   r^   r7   rM   filesmatchesra   s   &&    @r   
find_filesri   v   sG     F''$-a..0=W== ( Mr   c                R    V ^8  d   QhR\         R\        \        \        3,          /# r   r   r	   intfloat)r   s   "r   r   r      s#     ! !C !E#u*- !r   c                     \         P                  P                  V 4      '       d   ^ # \         P                  P                  V 4      # )r   )r    r   islinkgetsizer   s   &r   	file_sizerr      s+    	ww~~d77??4  r   c                0    V ^8  d   QhR\         R\         /# r   r   )r   s   "r   r   r      s     ( (3 (3 (r   c                 *    \        \        V 4      4      # rI   )r   rr   rq   s   &r   format_file_sizerv      s    y''r   c                R    V ^8  d   QhR\         R\        \        \        3,          /# r   rk   )r   s   "r   r   r      s#       sEz!2 r   c                     R p\         P                  ! V 4       F@  w  r#pV F4  p\         P                  P                  W%4      pV\	        V4      ,          pK6  	  KB  	  V# )g        )r    rc   r   rR   rr   )r   sizera   _dirsrg   filename	file_paths   &      r   directory_sizer}      sP    D ggdmUHT4IIi((D  , Kr   c                0    V ^8  d   QhR\         R\         /# r   rt   )r   s   "r   r   r      s     - - - -r   c                 *    \        \        V 4      4      # rI   )r   r}   rq   s   &r   format_directory_sizer      s    ~d+,,r   ) rd   r    os.pathrJ   r   
contextlibr   tempfiler   typingr   r   r   r   r	   r
   pip._internal.utils.compatr   pip._internal.utils.miscr   pip._internal.utils.retryr   r)   r8   replacerB   r@   ri   rr   rv   r}   r   r1   r   r   <module>r      s}     	   
 % ' > > 3 0 +6 & &0 
.rzz
:
($I8!(-r   