$29 GRAYBYTE WORDPRESS FILE MANAGER $82

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

/opt/alt/python310/lib/python3.10/site-packages/pip/_internal/__pycache__/

HOME
Current File : /opt/alt/python310/lib/python3.10/site-packages/pip/_internal/__pycache__//cache.cpython-310.pyc
o

ai�$�@s dZddlZddlZddlZddlZddlmZmZmZm	Z	m
Z
ddlmZm
Z
mZddlmZddlmZddlmZddlmZdd	lmZdd
lmZmZddlmZe�e�Z dee!e!fd
e!fdd�Z"Gdd�d�Z#Gdd�de#�Z$Gdd�de$�Z%Gdd�d�Z&Gdd�de#�Z'dS)zCache Management
�N)�Any�Dict�List�Optional�Set)�Tag�interpreter_name�interpreter_version)�canonicalize_name)�InvalidWheelFilename)�
FormatControl)�Link)�Wheel)�
TempDirectory�
tempdir_kinds)�path_to_url�d�returncCs&tj|dddd�}t�|�d����S)z'Return a stable sha224 of a dictionary.T)�,�:)�	sort_keys�
separators�ensure_ascii�ascii)�json�dumps�hashlib�sha224�encode�	hexdigest)r�s�r!��/builddir/build/BUILDROOT/alt-python310-pip-21.3.1-5.el8.x86_64/opt/alt/python310/lib/python3.10/site-packages/pip/_internal/cache.py�
_hash_dictsr#cs�eZdZdZdededeeddf�fdd�Zd	ede	efd
d�Z
d	edede	efd
d�Zd	edefdd�Z
d	edeede	edefdd�Z�ZS)�CacheanAn abstract class - provides cache directories for data from links


    :param cache_dir: The root of the cache.
    :param format_control: An object of FormatControl class to limit
        binaries being read from the cache.
    :param allowed_formats: which formats of files the cache should store.
        ('binary' and 'source' are the only allowed values)
    �	cache_dir�format_control�allowed_formatsrNcsTt���|rtj�|�sJ�|pd|_||_||_ddh}|j�|�|ks(J�dS)N�source�binary)	�super�__init__�os�path�isabsr%r&r'�union)�selfr%r&r'�_valid_formats��	__class__r!r"r+(s

zCache.__init__�linkcCs�d|ji}|jdur|jdur|j||j<|jr|j|d<t�|d<t�|d<t|�}|dd�|dd�|dd�|dd�g}|S)	z<Get parts of part that must be os.path.joined with cache_dir�urlN�subdirectoryrr	���)�url_without_fragment�	hash_name�hash�subdirectory_fragmentrr	r#)r0r4�	key_parts�hashed�partsr!r!r"�_get_cache_path_parts4s



,zCache._get_cache_path_parts�canonical_package_namecCst|jp	|p	|}|rgS|j�|�}|j�|�sgSg}|�|�}tj�|�r8t�	|�D]	}|�
||f�q.|S�N)r%r&�get_allowed_formatsr'�intersection�get_path_for_linkr,r-�isdir�listdir�append)r0r4rB�
can_not_cache�formats�
candidatesr-�	candidater!r!r"�_get_candidatesUs
zCache._get_candidatescC�t��)z5Return a directory to store cached items in for link.��NotImplementedError�r0r4r!r!r"rFeszCache.get_path_for_link�package_name�supported_tagscCrO)zaReturns a link to a cached item if it exists, otherwise returns the
        passed link.
        rP)r0r4rSrTr!r!r"�getis	z	Cache.get)�__name__�
__module__�__qualname__�__doc__�strrrr+r
rrArrNrFrrrU�
__classcell__r!r!r2r"r$s.
����!����r$csbeZdZdZdededdf�fdd�Zdedefd	d
�Zdede	ede
edefd
d�Z�Z
S)�SimpleWheelCachez&A cache of wheels for future installs.r%r&rNcst��||dh�dS�Nr))r*r+�r0r%r&r2r!r"r+xszSimpleWheelCache.__init__r4cCs,|�|�}|js
J�tjj|jdg|�R�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)r0r4r@r!r!r"rF{s

z"SimpleWheelCache.get_path_for_linkrSrTc
	Cs�g}|s|St|�}|�||�D]5\}}zt|�}Wn	ty#Yqwt|j�|kr4t�d|||�q|�|�s:q|�|�	|�||f�q|sJ|St
|�\}	}}ttt
j�||���S)NzWIgnoring cached wheel %s for %s as it does not match the expected distribution name %s.)r
rNrr�name�logger�debug�	supportedrI�support_index_min�minr
rr,r-r`)
r0r4rSrTrLrB�
wheel_name�	wheel_dir�wheel�_r!r!r"rU�s<��
��zSimpleWheelCache.get)rVrWrXrYrZrr+r
rFrrrrUr[r!r!r2r"r\us����r\cs*eZdZdZdeddf�fdd�Z�ZS)�EphemWheelCachezBA SimpleWheelCache that creates it's own temporary cache directoryr&rNcs&ttjdd�|_t��|jj|�dS)NT)�kind�globally_managed)rr�EPHEM_WHEEL_CACHE�	_temp_dirr*r+r-)r0r&r2r!r"r+�s
�zEphemWheelCache.__init__)rVrWrXrYrr+r[r!r!r2r"rk�srkc@seZdZdedefdd�ZdS)�
CacheEntryr4�
persistentcCs||_||_dSrC)r4rq)r0r4rqr!r!r"r+�s
zCacheEntry.__init__N)rVrWrXr
�boolr+r!r!r!r"rp�s��rpc	s�eZdZdZdededdf�fdd�Zdedefd	d
�Zdedefdd�Z	ded
e
edeedefdd�Z
ded
e
edeede
efdd�Z�ZS)�
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%r&rNcs,t��||dh�t||�|_t|�|_dSr])r*r+r\�_wheel_cacherk�_ephem_cacher^r2r!r"r+�szWheelCache.__init__r4cC�|j�|�SrC)rtrFrRr!r!r"rF��zWheelCache.get_path_for_linkcCrvrC)rurFrRr!r!r"�get_ephem_path_for_link�rwz"WheelCache.get_ephem_path_for_linkrSrTcCs |�|||�}|dur
|S|jSrC)�get_cache_entryr4)r0r4rSrT�cache_entryr!r!r"rU�szWheelCache.getcCsP|jj|||d�}||urt|dd�S|jj|||d�}||ur&t|dd�SdS)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.
        )r4rSrTT)rqFN)rtrUrpru)r0r4rSrT�retvalr!r!r"ry�s
��zWheelCache.get_cache_entry)rVrWrXrYrZrr+r
rFrxrrrrUrpryr[r!r!r2r"rs�s.���
�����rs)(rYrr�loggingr,�typingrrrrrZpip._vendor.packaging.tagsrrr	�pip._vendor.packaging.utilsr
�pip._internal.exceptionsr�#pip._internal.models.format_controlr�pip._internal.models.linkr
�pip._internal.models.wheelr�pip._internal.utils.temp_dirrr�pip._internal.utils.urlsr�	getLoggerrVrbrZr#r$r\rkrprsr!r!r!r"�<module>s*
XF


Current_dir [ NOT WRITEABLE ] Document_root [ WRITEABLE ]


[ Back ]
NAME
SIZE
LAST TOUCH
USER
CAN-I?
FUNCTIONS
..
--
10 Feb 2026 9.36 AM
root / linksafe
0755
__init__.cpython-310.pyc
0.793 KB
9 Jan 2026 3.17 PM
root / linksafe
0644
build_env.cpython-310.pyc
9.378 KB
9 Jan 2026 3.17 PM
root / linksafe
0644
cache.cpython-310.pyc
8.226 KB
9 Jan 2026 3.17 PM
root / linksafe
0644
configuration.cpython-310.pyc
10.876 KB
9 Jan 2026 3.17 PM
root / linksafe
0644
exceptions.cpython-310.pyc
15.78 KB
9 Jan 2026 3.17 PM
root / linksafe
0644
main.cpython-310.pyc
0.646 KB
9 Jan 2026 3.17 PM
root / linksafe
0644
pyproject.cpython-310.pyc
3.646 KB
9 Jan 2026 3.17 PM
root / linksafe
0644
self_outdated_check.cpython-310.pyc
4.439 KB
9 Jan 2026 3.17 PM
root / linksafe
0644
wheel_builder.cpython-310.pyc
8.925 KB
9 Jan 2026 3.17 PM
root / linksafe
0644

GRAYBYTE WORDPRESS FILE MANAGER @ 2025 CONTACT ME
Static GIF