Ë
    ”U.jœ  ã                  óV  — d dl mZ d dlZd dlZd dlZd dlZd dlZd dlmZ d dl	m
Z
 d dlmZ d dlmZ d dlmZmZmZmZ d dlmZ d d	lmZ d d
lmZ dd„Ze
dd„«       Z  edd¬«      ej8                  «      Zdd„Zdd„Zdd„Zdd„Z dd„Z!dd„Z"dd„Z#d d„Z$	 	 	 	 	 	 d!d„Z%d"d„Z&d"d„Z'y)#é    )ÚannotationsN)Ú	Generator)Úcontextmanager)ÚPath)ÚNamedTemporaryFile)ÚAnyÚBinaryIOÚCallableÚcast)Úget_path_uid)Úformat_size)Úretryc                óÞ  — t         j                  dk(  st        t        d«      syt        j                  j                  | «      sJ ‚d }| |k7  r’t        j                  j                  | «      rLt        j                  «       dk(  r	 t        | «      }|dk(  S t        j                  | t        j                  «      S | t        j                  j                  | «      } }| |k7  rŒ’y# t        $ r Y yw xY w)NÚwin32ÚgeteuidTr   F)ÚsysÚplatformÚhasattrÚosÚpathÚisabsÚlexistsr   r   ÚOSErrorÚaccessÚW_OKÚdirname)r   ÚpreviousÚpath_uids      ú`C:\xampp\htdocs\tradingbinance\backend\.venv\Lib\site-packages\pip/_internal/utils/filesystem.pyÚcheck_path_ownerr       sÆ   € ô ‡|�|�wÒ¤g¬b°)Ô&<Øä�7‰7�=‰=˜ÔÐÐà€HØ
�(Ò
Ü�7‰7�?‰?˜4Ô ä�z‰z‹|˜qÒ ð!Ü+¨DÓ1�Hð   1‘}Ð$ä—y‘y ¤r§w¡wÓ/Ð/à!¤2§7¡7§?¡?°4Ó#8�dˆHð �(Ó
ð øô ò !Ù ð!ús   ÂC  Ã 	C,Ã+C,c              +  óÌ  K  — t        ddt        j                  j                  | «      t        j                  j	                  | «      ddœ|¤Ž5 }t        t        |«      }	 |–— |j                  «        t        j                  |j                  «       «       	 ddd«       y# |j                  «        t        j                  |j                  «       «       w xY w# 1 sw Y   yxY w­w)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.
    Fz.tmp)ÚdeleteÚdirÚprefixÚsuffixN© )
r   r   r   r   Úbasenamer   r	   ÚflushÚfsyncÚfileno)r   ÚkwargsÚfÚresults       r   Úadjacent_tmp_filer.   .   s°   è ø€ ô 
ð 
ØÜ�G‰G�O‰O˜DÓ!Ü�w‰w×Ñ Ó%Øñ	
ð
 ò
ð 
Ü”h Ó"ˆð	&ØŠLà�L‰LŒNÜ�H‰H�V—]‘]“_Õ%÷
ð 
øð �L‰LŒNÜ�H‰H�V—]‘]“_Õ%ú÷
ð 
üs6   ‚AC$ÁCÁB Á#3CÂ	C$Â 5CÃCÃC!ÃC$é   g      Ð?)Ústop_after_delayÚwaitc                óR  — t         j                  j                  | «      sGt         j                  j                  | «      }|| k(  rn"|} t         j                  j                  | «      sŒGt         j                  dk(  r$t        j
                  | t         j                  «      S t        | «      S )zgCheck 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_dirr8   L   su   € ô �g‰g�m‰m˜DÔ!Ü—‘—‘ Ó&ˆØ�TŠ>ØØˆô	 �g‰g�m‰m˜DÕ!ô 
‡w�w�'ÒÜ�y‰y˜œrŸw™wÓ'Ð'ä! $Ó'Ð'ó    c                óæ  ‡— d}dŠt        d«      D ]º  }|dj                  ˆfd„t        d«      D «       «      z   }t        j                  j                  | |«      }	 t        j                  |t        j
                  t        j                  z  t        j                  z  «      }t        j                  |«       t        j                  |«        y t        d	«      ‚# t        $ r Y ŒÓt        $ r Y  yw xY w)
NÚ(accesstest_deleteme_fishfingers_custard_Ú$abcdefghijklmnopqrstuvwxyz0123456789é
   Ú c              3  óH   •K  — | ]  }t        j                  ‰«      –— Œ y ­w©N)ÚrandomÚchoice)Ú.0Ú_Úalphabets     €r   Ú	<genexpr>z)_test_writable_dir_win.<locals>.<genexpr>d   s   øè ø€ Ð!LÁ8¸a¤&§-¡-°×"9Á8ùs   ƒ"é   TFz3Unexpected condition testing for writable directory)ÚrangeÚjoinr   r   ÚopenÚO_RDWRÚO_CREATÚO_EXCLÚcloseÚunlinkÚFileExistsErrorÚPermissionErrorr   )r   r'   rD   r5   ÚfileÚfdrE   s         @r   r6   r6   ^   sÃ   ø€ ð :€HØ5€HÜ�2ŽYˆØ˜"Ÿ'™'Ó!LÄ5ÈÄ8Ó!LÓLÑLˆÜ�w‰w�|‰|˜D $Ó'ˆð	Ü—‘˜œrŸy™y¬2¯:©:Ñ5¼¿	¹	ÑAÓBˆBô �H‰H�RŒLÜ�I‰I�dŒOÙð# ô( ÐGÓ
HÐHøô ò 	ÙÜò 	ò ð	ús   ÁACÃ	C0Ã$C0Ã/C0c                ó¨   ‡— g }t        j                  | «      D ]6  \  Š}}t        j                  ||«      }|j	                  ˆfd„|D «       «       Œ8 |S )z†Returns a list of absolute paths of files beneath path, recursively,
    with filenames which match the UNIX-style shell glob pattern.c              3  ó^   •K  — | ]$  }t         j                  j                  ‰|«      –— Œ& y ­wr@   )r   r   rI   )rC   r,   Úroots     €r   rF   zfind_files.<locals>.<genexpr>€   s!   øè ø€ Ð=±W°”b—g‘g—l‘l 4¨×+±Wùs   ƒ*-)r   ÚwalkÚfnmatchÚfilterÚextend)r   Úpatternr-   rD   ÚfilesÚmatchesrV   s         @r   Ú
find_filesr^   z   sK   ø€ ð €FÜŸ'™' $ž-‰ˆˆa�Ü—.‘. ¨Ó0ˆØ�‰Ó=±WÓ=Õ=ð (ð €Mr9   c                ó€   — t         j                  j                  | «      ryt         j                  j                  | «      S ©Nr   )r   r   ÚislinkÚgetsize©r   s    r   Ú	file_sizerd   „   s(   € ä	‡w�w‡~�~�dÔØÜ�7‰7�?‰?˜4Ó Ð r9   c                ó*   — t        t        | «      «      S r@   )r   rd   rc   s    r   Úformat_file_sizerf   ‹   s   € Ü”y “Ó'Ð'r9   c                ó°   — d}t        j                  | «      D ];  \  }}}|D ]0  }t         j                  j                  ||«      }|t	        |«      z  }Œ2 Œ= |S )Ng        )r   rW   r   rI   rd   )r   ÚsizerV   Ú_dirsr\   ÚfilenameÚ	file_paths          r   Údirectory_sizerl   �   sT   € Ø€DÜ Ÿg™g džmÑˆˆe�UÛˆHÜŸ™Ÿ™ T¨8Ó4ˆIØ”I˜iÓ(Ñ(‰Dñ ð ,ð €Kr9   c                ó*   — t        t        | «      «      S r@   )r   rl   rc   s    r   Úformat_directory_sizern   ˜   s   € Ü”~ dÓ+Ó,Ð,r9   c                ó^  — t        j                  | «      j                  dz  dz  }t         j                  t         j                  v r%t        j                  |j                  «       |«       y t         j                  t         j                  v r#t        j                  |j                  |d¬«       y y )Ni¶  i€  F)Úfollow_symlinks)r   ÚstatÚst_modeÚchmodÚsupports_fdr*   Úsupports_follow_symlinksr5   )Ú	directoryÚtarget_fileÚmodes      r   Úcopy_directory_permissionsry   œ   s|   € ä
�‰�	Ó×"Ñ" UÑ*Ø
ñ	ð 	ô
 
‡x�x”2—>‘>Ñ!Ü
�‰�×#Ñ#Ó% tÕ,Ü	�‰”R×0Ñ0Ñ	0Ü
�‰�×!Ñ! 4¸Ö?ð 
1r9   c              #  ól  K  — g }t        «       }t        j                  t        | «      j	                  «       «      D ]Z  \  }}}t        |«      } |||«      r/|j                  |j                  dd «       |j                  |«       |j                  |«       Œ\ t        |d¬«      D ]  }||vsŒ|–— Œ y­w)zZYields every subdirectory of +path+ that has no files matching the
    predicate under it.NéÿÿÿÿT)Úreverse)
Úsetr   rW   r   ÚresolveÚupdateÚparentsÚaddÚappendÚsorted)	r   Ú	predicateÚdirectoriesÚexcludedÚroot_strrD   Ú	filenamesrV   Úds	            r   Ú_subdirs_without_genericrŠ   ¨   s¢   è ø€ ð €KÜ›%€Hä"$§'¡'¬$¨t«*×*<Ñ*<Ó*>Ö"?Ñˆ�!�YÜ�H‹~ˆÙ�X˜yÔ)ð �O‰O˜DŸL™L¨¨"Ð-Ô.Ø�L‰L˜ÔØ×Ñ˜4Õ ð #@ô �K¨×.ˆØ�HÒØ‹Gñ /ùs   ‚B*B4Â-B4c                ó   — t        | d„ «      S )z?Yields every subdirectory of +path+ that has no files under it.c                ó   — t        |«      dkD  S r`   )Úlen©rV   rˆ   s     r   Ú<lambda>z'subdirs_without_files.<locals>.<lambda>Â   s   € Ä#ÀiÃ.ÐSTÒBTr9   ©rŠ   rc   s    r   Úsubdirs_without_filesr‘   À   s   € ä# DÑ*TÓUÐUr9   c                ó   — t        | d„ «      S )zDYields every subdirectory of +path+ that has no .whl files under it.c                ó&   — t        d„ |D «       «      S )Nc              3  ó>   K  — | ]  }|j                  d «      –— Œ y­w)z.whlN)Úendswith)rC   Úxs     r   rF   z;subdirs_without_wheels.<locals>.<lambda>.<locals>.<genexpr>È   s   è ø€ Ð)PÁiÀ¨!¯*©*°V×*<Áiùs   ‚)ÚanyrŽ   s     r   r�   z(subdirs_without_wheels.<locals>.<lambda>È   s   € ¤cÑ)PÁiÓ)PÔ&Pr9   r�   rc   s    r   Úsubdirs_without_wheelsr˜   Å   s   € ä#ØÑPóð r9   )r   ÚstrÚreturnÚbool)r   r™   r+   r   rš   zGenerator[BinaryIO, None, None])r   r™   r[   r™   rš   z	list[str])r   r™   rš   zint | float)r   r™   rš   r™   )rv   r™   rw   r	   rš   ÚNone)r   r™   r„   z Callable[[str, list[str]], bool]rš   úGenerator[Path])r   r™   rš   r�   )(Ú
__future__r   rX   r   Úos.pathrA   r   Úcollections.abcr   Ú
contextlibr   Úpathlibr   Útempfiler   Útypingr   r	   r
   r   Úpip._internal.utils.compatr   Úpip._internal.utils.miscr   Úpip._internal.utils.retryr   r    r.   Úreplacer8   r6   r^   rd   rf   rl   rn   ry   rŠ   r‘   r˜   r&   r9   r   Ú<module>r©      s¶   ðÝ "ã Û 	Û Û Û 
Ý %Ý %Ý Ý 'ß 0Ó 0å 3Ý 0Ý +óð6 ò&ó ð&ð0 /‰% ¨Ô
.¨r¯z©zÓ
:€ó
(ó$Ió8ó!ó(óó-ó	@ðØ
ðØ:ðàóó0Vô
r9   