ok

Mini Shell

Direktori : /opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/cachecontrol/
Upload File :
Current File : //opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/cachecontrol/adapter.pyc

�
Bu�_c@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((sQ/opt/alt/python36/lib/python3.6/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((sQ/opt/alt/python36/lib/python3.6/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(sQ/opt/alt/python36/lib/python3.6/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)sQ/opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/cachecontrol/adapter.pyR9s:				
				cCs$|jj�tt|�j�dS(N(R
tcloseR
R(R((sQ/opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/cachecontrol/adapter.pyR=�s
N(
t__name__t
__module__R7RRRR R/RR=(((sQ/opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/cachecontrol/adapter.pyRsI(R5R2Rtpip._vendor.requests.adaptersRRRR
RtfilewrapperRR(((sQ/opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/cachecontrol/adapter.pyt<module>s

Zerion Mini Shell 1.0