Your IP : 18.226.98.244


Current Path : /opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/cachecontrol/
Upload File :
Current File : //opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/cachecontrol/adapter.pyc

�
�Rec@s~ddlZddlZddlZddlmZddlmZddlmZddl	m
Z
defd��YZdS(	i����N(tHTTPAdapteri(tCacheController(t	DictCache(tCallbackFileWrappertCacheControlAdaptercBsSeZddhZdeddddd�Zdd�Zedd�Zd�Z	RS(tPUTtDELETEc
Os}tt|�j||�|dkr.t�n||_||_|pId|_|pXt}	|	|jd|d|�|_	dS(NtGETtcache_etagst
serializer(R(
tsuperRt__init__tNoneRtcachet	heuristictcacheable_methodsRt
controller(
tselfR
Rtcontroller_classR	RRtargstkwtcontroller_factory((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/cachecontrol/adapter.pyRs	cKs�|p|j}|j|kr�y|jj|�}Wntjk
rPd}nX|rm|j||dt�S|j	j
|jj|��ntt
|�j||�}|S(s�
        Send a request. Use the request information to see if it
        exists in the cache and cache the response if we need to and can.
        t
from_cacheN(RtmethodRtcached_requesttzlibterrorRtbuild_responsetTruetheaderstupdatetconditional_headersR
Rtsend(RtrequestRRt	cacheabletcached_responsetresp((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/cachecontrol/adapter.pyR $s
c
s�|p|j}|r*|j|kr*|jrC|jj|�}n|jdkr�|jj||�}||k	r|t}n|jdt	�|j
�|}q*|jdkr�|jj||�q*t|j
tj|jj||��|_
|jr*|j��fd�}tj||�|_q*ntt|�j||�}|j|jkr�|jr�|jj|j�}	|jj|	�n||_|S(s�
        Build a response by making a request or using the cache.

        This will end up calling send and returning a potentially
        cached response
        i0tdecode_contenti-cs*��|jdkr&|jj�ndS(Ni(t
chunk_leftt_fpt_close(R(tsuper_update_chunk_length(s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/cachecontrol/adapter.pyt_update_chunk_lengthns(RRRtapplytstatusRtupdate_cached_responseRtreadtFalsetrelease_conntcache_responseRR't	functoolstpartialtchunkedR*ttypest
MethodTypeR
RRtinvalidating_methodstokt	cache_urlturlR
tdeleteR(
RR!tresponseRRR"R#R*R$R9((R)s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/cachecontrol/adapter.pyR9s:				
				cCs$|jj�tt|�j�dS(N(R
tcloseR
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/_vendor/cachecontrol/adapter.pyR=�s
N(
t__name__t
__module__R7RRRR R/RR=(((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/cachecontrol/adapter.pyRsI(R5R2Rtpip._vendor.requests.adaptersRRRR
RtfilewrapperRR(((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/cachecontrol/adapter.pyt<module>s

?>