$71 GRAYBYTE WORDPRESS FILE MANAGER $99

SERVER : premium201.web-hosting.com #1 SMP Wed Mar 26 12:08:09 UTC 2025
SERVER IP : 172.67.162.162 | ADMIN IP 216.73.216.85
OPTIONS : CRL = ON | WGT = ON | SDO = OFF | PKEX = OFF
DEACTIVATED : NONE

/opt/alt/python312/lib/python3.12/site-packages/pip/_internal/__pycache__/

HOME
Current File : /opt/alt/python312/lib/python3.12/site-packages/pip/_internal/__pycache__//cache.cpython-312.pyc
�

R`i�(��d�dZddlZddlZddlZddlZddlmZddlmZm	Z	m
Z
mZddlm
Z
mZmZddlmZddlmZddlmZdd	lmZdd
lmZddlmZmZddlmZej>e �Z!d
Z"de	e#e#fde#fd�Z$Gd�d�Z%Gd�de%�Z&Gd�de&�Z'Gd�d�Z(Gd�de%�Z)y)zCache Management
�N)�Path)�Any�Dict�List�Optional)�Tag�interpreter_name�interpreter_version)�canonicalize_name)�InvalidWheelFilename)�	DirectUrl)�Link)�Wheel)�
TempDirectory�
tempdir_kinds)�path_to_urlzorigin.json�d�returnc��tj|ddd��}tj|j	d��j�S)z'Return a stable sha224 of a dictionary.T)�,�:)�	sort_keys�
separators�ensure_ascii�ascii)�json�dumps�hashlib�sha224�encode�	hexdigest)r�ss  ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_internal/cache.py�
_hash_dictr$s7���
�
�1���$�O�A��>�>�!�(�(�7�+�,�6�6�8�8�c���eZdZdZdeddf�fd�Zdedeefd�Zdededee	fd	�Z
dedefd
�Zdedeedee
defd
�Z�xZS)�CachezuAn abstract class - provides cache directories for data from links

    :param cache_dir: The root of the cache.
    �	cache_dirrNc�~��t�|��|r!tjj	|�sJ�|xsd|_y�N)�super�__init__�os�path�isabsr(��selfr(�	__class__s  �r#r,zCache.__init__&s2���
��������
�
�i� 8�8�8�"�*�d��r%�linkc�(�d|ji}|j�%|j�|j||j<|jr|j|d<t	�|d<t�|d<t
|�}|dd|dd|dd|ddg}|S)	z<Get parts of part that must be os.path.joined with cache_dir�urlN�subdirectoryr	r
���)�url_without_fragment�	hash_name�hash�subdirectory_fragmentr	r
r$)r1r3�	key_parts�hashed�partss     r#�_get_cache_path_partszCache._get_cache_path_parts+s����D�5�5�6�	��>�>�%�$�)�)�*?�(,�	�	�I�d�n�n�%��%�%�(,�(B�(B�I�n�%�)9�(:�	�$�%�+>�+@�	�'�(��I�&��
����V�A�a�[�&��1�+�v�a�b�z�B���r%�canonical_package_namec���|jxs|xs|}|rgS|j|�}tjj	|�r%tj
|�D�cgc]}||f��c}SgScc}wr*)r(�get_path_for_linkr-r.�isdir�listdir)r1r3rB�
can_not_cacher.�	candidates      r#�_get_candidateszCache._get_candidatesLsw�� �N�N�*�T�2H�.H�T�PT�H�
���I��%�%�d�+��
�7�7�=�=���79�z�z�$�7G�H�7G�)�Y��%�7G�H�H��	��Is�#A3c��t��)z5Return a directory to store cached items in for link.��NotImplementedError�r1r3s  r#rDzCache.get_path_for_linkVs��!�#�#r%�package_name�supported_tagsc��t��)zaReturns a link to a cached item if it exists, otherwise returns the
        passed link.
        rK)r1r3rNrOs    r#�getz	Cache.getZs
��"�#�#r%)�__name__�
__module__�__qualname__�__doc__�strr,rrrArrIrDrrrQ�
__classcell__�r2s@r#r'r' s�����
+�#�+�$�+�
�$��4��9��B�D��#��$�s�)��$�d�$�s�$�	$��	$��s�m�	$��S�	�		$�

�	$r%r'c�`��eZdZdZdeddf�fd�Zdedefd�Zdedeed	e	e
defd
�Z�xZS)�SimpleWheelCachez&A cache of wheels for future installs.r(rNc�$��t�|�|�yr*)r+r,r0s  �r#r,zSimpleWheelCache.__init__is���
����#r%r3c��|j|�}|jsJ�tjj|jdg|���S)a�Return 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)rAr(r-r.�join)r1r3r@s   r#rDz"SimpleWheelCache.get_path_for_linkls>���*�*�4�0���~�~��~��w�w�|�|�D�N�N�H�=�u�=�=r%rNrOc���g}|s|St|�}|j||�D]w\}}	t|�}t|j�|k7rt
j
d|||��C|j|�s�U|j|j|�||f��y|s|St|�\}	}}tttjj||���S#t$rY��wxYw)NzWIgnoring cached wheel %s for %s as it does not match the expected distribution name %s.)rrIrr�name�logger�debug�	supported�append�support_index_min�minrrr-r.r^)
r1r3rNrO�
candidatesrB�
wheel_name�	wheel_dir�wheel�_s
          r#rQzSimpleWheelCache.get�s���
���K�!2�<�!@��%)�%9�%9�$�@V�%W�!�J�	�
��j�)��!����,�0F�F����H��� ����?�?�>�2������+�+�N�;����
�#&X�2��K�#&�z�?� ��:�y��K������Y�
� C�D�E�E��5(�
��
�s�C#�#	C/�.C/)
rRrSrTrUrVr,rrDrrrrQrWrXs@r#rZrZfsd���0�$�#�$�$�$�>�d�>�s�>�()F��)F��s�m�)F��S�	�	)F�

�)Fr%rZc�$��eZdZdZd�fd�Z�xZS)�EphemWheelCachezBA SimpleWheelCache that creates it's own temporary cache directoryc���ttjd��|_t�|�|jj�y)NT)�kind�globally_managed)rr�EPHEM_WHEEL_CACHE�	_temp_dirr+r,r.)r1r2s �r#r,zEphemWheelCache.__init__�s4���&��0�0�!�
���
	������,�,�-r%)rN)rRrSrTrUr,rWrXs@r#rmrm�s���L�.�.r%rmc��eZdZdedefd�Zy)�
CacheEntryr3�
persistentc�v�||_||_d|_t|jj�j
tz}|j�r,	tj|jd���|_yy#t$r,}tjd||j|�Yd}~yd}~wwxYw)N�utf-8��encodingz7Ignoring invalid cache entry origin file %s for %s (%s))r3ru�originr�	file_path�parent�ORIGIN_JSON_NAME�existsr
�	from_json�	read_text�	Exceptionra�warning�filename)r1r3ru�origin_direct_url_path�es     r#r,zCacheEntry.__init__�s���
��	�$���+/���!%�d�i�i�&9�&9�!:�!A�!A�DT�!T��!�(�(�*�

�'�1�1�*�4�4�g�4�F����+��
�
����M�*��M�M��	���
�s�*B�	B8�"B3�3B8N)rRrSrTr�boolr,�r%r#rtrt�s������r%rtc	���eZdZdZdeddf�fd�Zdedefd�Zdedefd�Zded	e	ed
e
edefd�Zded	e	ed
e
ede	e
fd�Zeded
eddfd��Z�xZS)�
WheelCachez�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.
    r(rNc�b��t�|�|�t|�|_t	�|_yr*)r+r,rZ�_wheel_cacherm�_ephem_cacher0s  �r#r,zWheelCache.__init__�s(���
����#�,�Y�7���+�-��r%r3c�8�|jj|�Sr*)r�rDrMs  r#rDzWheelCache.get_path_for_link����� � �2�2�4�8�8r%c�8�|jj|�Sr*)r�rDrMs  r#�get_ephem_path_for_linkz"WheelCache.get_ephem_path_for_link�r�r%rNrOc�H�|j|||�}|�|S|jSr*)�get_cache_entryr3)r1r3rNrO�cache_entrys     r#rQzWheelCache.get�s/���*�*�4��~�N�����K����r%c��|jj|||��}||ur
t|d��S|jj|||��}||ur
t|d��Sy)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.
        )r3rNrOT)ruFN)r�rQrtr�)r1r3rNrO�retvals     r#r�zWheelCache.get_cache_entry�s}���"�"�&�&��%�)�'�
��
����f��6�6��"�"�&�&��%�)�'�
��
����f��7�7�r%�
download_infoc��t|�tz}|j�rl	tj|jd���}|j|jk7r-tjd|j||j�	|j|j�d��y#t$r!}tjd||�Yd}~�Gd}~wwxYw)Nrwrxz�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~r
rr�r5rar�r��
write_text�to_json)r(r��origin_pathrzr�s     r#�record_download_originz!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)rRrSrTrUrVr,rrDr�rrrrQrtr��staticmethodr
r�rWrXs@r#r�r��s�����.�#�.�$�.�
9�d�9�s�9�9�D�9�S�9�	 ��	 ��s�m�	 ��S�	�		 �

�	 �����s�m���S�	�	�

�*�	��8�J�#�J�i�J�D�J��Jr%r�)*rUrr�loggingr-�pathlibr�typingrrrr�pip._vendor.packaging.tagsrr	r
�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�	getLoggerrRrar}rVr$r'rZrmrtr�r�r%r#�<module>r�s�������	��,�,�Q�Q�9�9�5�*�,�E�0�	��	�	�8�	$�� ��9�$�s�C�x�.�9�S�9�C$�C$�LCF�u�CF�L	.�&�	.���0RJ��RJr%


Current_dir [ NOT WRITEABLE ] Document_root [ WRITEABLE ]


[ Back ]
NAME
SIZE
LAST TOUCH
USER
CAN-I?
FUNCTIONS
..
--
10 Feb 2026 9.37 AM
root / linksafe
0755
__init__.cpython-312.pyc
0.833 KB
8 Jan 2026 7.19 PM
root / linksafe
0644
build_env.cpython-312.pyc
13.962 KB
8 Jan 2026 7.19 PM
root / linksafe
0644
cache.cpython-312.pyc
12.416 KB
8 Jan 2026 7.19 PM
root / linksafe
0644
configuration.cpython-312.pyc
17.013 KB
8 Jan 2026 7.19 PM
root / linksafe
0644
exceptions.cpython-312.pyc
32.643 KB
8 Jan 2026 7.19 PM
root / linksafe
0644
main.cpython-312.pyc
0.7 KB
8 Jan 2026 7.19 PM
root / linksafe
0644
pyproject.cpython-312.pyc
4.894 KB
8 Jan 2026 7.19 PM
root / linksafe
0644
self_outdated_check.cpython-312.pyc
10.337 KB
8 Jan 2026 7.19 PM
root / linksafe
0644
wheel_builder.cpython-312.pyc
13.419 KB
8 Jan 2026 7.19 PM
root / linksafe
0644

GRAYBYTE WORDPRESS FILE MANAGER @ 2025 CONTACT ME
Static GIF