Your IP : 52.15.191.241


Current Path : /opt/alt/python27/lib/python2.7/site-packages/pip/_internal/network/
Upload File :
Current File : //opt/alt/python27/lib/python2.7/site-packages/pip/_internal/network/cache.pyc

�
�Rec@s�dZddlZddlmZddlmZddlmZddlm	Z	ddl
mZmZddl
mZdd	lmZer�dd
lmZmZnd�Zed��Zd
efd��YZdS(sHTTP cache implementation.
i����N(tcontextmanager(t	BaseCache(t	FileCache(tResponse(tadjacent_tmp_filetreplace(t
ensure_dir(tMYPY_CHECK_RUNNING(tOptionaltIteratorcCst|dt�S(Nt
from_cache(tgetattrtFalse(tresponse((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/network/cache.pyt
is_from_cachesccs'y	dVWnttfk
r"nXdS(svIf we can't access the cache then we can just skip caching and process
    requests as if caching wasn't enabled.
    N(tOSErrortIOError(((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/network/cache.pytsuppressed_cache_errorss	t
SafeFileCachecBs;eZdZd�Zd�Zd�Zd�Zd�ZRS(sw
    A file based cache which is safe to use even when the target directory may
    not be accessible or writable.
    cCs8|dk	std��tt|�j�||_dS(Ns!Cache directory must not be None.(tNonetAssertionErrortsuperRt__init__t	directory(tselfR((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/network/cache.pyR*scCs<tj|�}t|d �|g}tjj|j|�S(Ni(RtencodetlisttostpathtjoinR(Rtnamethashedtparts((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/network/cache.pyt_get_cache_path0sc	CsE|j|�}t��'t|d��}|j�SWdQXWdQXdS(Ntrb(R!Rtopentread(RtkeyRtf((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/network/cache.pytget9s
c
Csk|j|�}t��Mttjj|��t|��}|j|�WdQXt|j	|�WdQXdS(N(
R!RRRRtdirnameRtwriteRR(RR%tvalueRR&((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/network/cache.pytset@s
cCs0|j|�}t��tj|�WdQXdS(N(R!RRtremove(RR%R((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/network/cache.pytdeleteKs
(t__name__t
__module__t__doc__RR!R'R+R-(((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/network/cache.pyR$s					(R0Rt
contextlibRtpip._vendor.cachecontrol.cacheRtpip._vendor.cachecontrol.cachesRtpip._vendor.requests.modelsRtpip._internal.utils.filesystemRRtpip._internal.utils.miscRtpip._internal.utils.typingRttypingRR	RRR(((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/network/cache.pyt<module>s	

?>