HEX
Server: Apache
System: Linux zacp120.webway.host 4.18.0-553.50.1.lve.el8.x86_64 #1 SMP Thu Apr 17 19:10:24 UTC 2025 x86_64
User: govancoz (1003)
PHP: 8.3.26
Disabled: exec,system,passthru,shell_exec,proc_close,proc_open,dl,popen,show_source,posix_kill,posix_mkfifo,posix_getpwuid,posix_setpgid,posix_setsid,posix_setuid,posix_setgid,posix_seteuid,posix_setegid,posix_uname
Upload Files
File: //usr/lib/python3.8/site-packages/pip/_internal/network/__pycache__/cache.cpython-38.pyc
U

��.e��@s�dZddlZddlmZddlmZddlmZddlm	Z	m
Z
ddlmZddl
mZerhdd	lmZed
d��ZGdd
�d
e�ZdS)zHTTP cache implementation.
�N)�contextmanager)�	BaseCache)�	FileCache)�adjacent_tmp_file�replace)�
ensure_dir)�MYPY_CHECK_RUNNING)�Optionalc	cs(z
dVWnttfk
r"YnXdS)zvIf we can't access the cache then we can just skip caching and process
    requests as if caching wasn't enabled.
    N)�OSError�IOError�rr�?/usr/lib/python3.8/site-packages/pip/_internal/network/cache.py�suppressed_cache_errorss
rcs@eZdZdZ�fdd�Zdd�Zdd�Zdd	�Zd
d�Z�Z	S)�
SafeFileCachezw
    A file based cache which is safe to use even when the target directory may
    not be accessible or writable.
    cs(|dk	std��tt|���||_dS)Nz!Cache directory must not be None.)�AssertionError�superr�__init__�	directory)�selfr��	__class__rr
r&szSafeFileCache.__init__cCs4t�|�}t|dd��|g}tjj|jf|��S)N�)r�encode�list�os�path�joinr)r�nameZhashed�partsrrr
�_get_cache_path,s
zSafeFileCache._get_cache_pathcCsR|�|�}t��8t|d��"}|��W5QR�W5QR�SQRXW5QRXdS)N�rb)rr�open�read)r�keyr�frrr
�get5s
zSafeFileCache.getc
CsZ|�|�}t��@ttj�|��t|��}|�|�W5QRXt|j	|�W5QRXdS�N)
rrrrr�dirnamer�writerr)rr#�valuerr$rrr
�set<s

zSafeFileCache.setc	Cs*|�|�}t��t�|�W5QRXdSr&)rrr�remove)rr#rrrr
�deleteGs
zSafeFileCache.delete)
�__name__�
__module__�__qualname__�__doc__rrr%r*r,�
__classcell__rrrr
r s	r)r0r�
contextlibrZpip._vendor.cachecontrol.cacherZpip._vendor.cachecontrol.cachesrZpip._internal.utils.filesystemrrZpip._internal.utils.miscrZpip._internal.utils.typingr�typingr	rrrrrr
�<module>s