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.9/site-packages/pip/_internal/network/__pycache__/cache.cpython-39.pyc
a

?�f	�@s�dZddlZddlmZddlmZddlmZddlm	Z	ddl
mZmZddl
mZdd	lmZerxdd
lmZmZdd�Zed
d��ZGdd�de�ZdS)zHTTP cache implementation.
�N)�contextmanager)�	BaseCache)�	FileCache)�Response)�adjacent_tmp_file�replace)�
ensure_dir)�MYPY_CHECK_RUNNING)�Optional�IteratorcCst|dd�S)NZ
from_cacheF)�getattr)Zresponse�r
�?/usr/lib/python3.9/site-packages/pip/_internal/network/cache.py�
is_from_cachesrc	cs&z
dVWnttfy Yn0dS)zvIf we can't access the cache then we can just skip caching and process
    requests as if caching wasn't enabled.
    N)�OSError�IOErrorr
r
r
r�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(|dusJd��tt|���||_dS)Nz!Cache directory must not be None.)�superr�__init__�	directory)�selfr��	__class__r
rr*szSafeFileCache.__init__cCs6t�|�}t|dd��|g}tjj|jg|�R�S)N�)r�encode�list�os�path�joinr)r�nameZhashed�partsr
r
r�_get_cache_path0s
zSafeFileCache._get_cache_pathc	Cst|�|�}t��Pt|d��&}|��Wd�Wd�S1sH0YWd�n1sf0YdS)N�rb)r"r�open�read)r�keyr�fr
r
r�get9s
zSafeFileCache.getc	Cs�|�|�}t��^ttj�|��t|��}|�|�Wd�n1sJ0Yt|j	|�Wd�n1st0YdS�N)
r"rrrr�dirnamer�writerr )rr&�valuerr'r
r
r�set@s

(zSafeFileCache.setcCs>|�|�}t��t�|�Wd�n1s00YdSr))r"rr�remove)rr&rr
r
r�deleteKs
zSafeFileCache.delete)
�__name__�
__module__�__qualname__�__doc__rr"r(r-r/�
__classcell__r
r
rrr$s	r)r3r�
contextlibrZpip._vendor.cachecontrol.cacherZpip._vendor.cachecontrol.cachesrZpip._vendor.requests.modelsrZpip._internal.utils.filesystemrrZpip._internal.utils.miscrZpip._internal.utils.typingr	�typingr
rrrrr
r
r
r�<module>s