ó â\e[c@s~ddlZddlZddlZddlmZddlmZddlmZddl m Z defd„ƒYZ dS( iÿÿÿÿN(t HTTPAdapteri(tCacheController(t DictCache(tCallbackFileWrappertCacheControlAdaptercBsSeZddhZdeddddd„Zdd„Zedd„Zd„Z RS(tPUTtDELETEc Osqtt|ƒj||Ž|p%tƒ|_||_|p=d|_|pLt} | |jd|d|ƒ|_dS(NtGETt cache_etagst serializer(sGET( tsuperRt__init__Rtcachet heuristictcacheable_methodsRt controller( tselfR Rtcontroller_classR R Rtargstkwtcontroller_factory((s?/tmp/pip-install-0xiv62/pip/pip/_vendor/cachecontrol/adapter.pyR s   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_requesttzlibterrortNonetbuild_responsetTruetheaderstupdatetconditional_headersR Rtsend(RtrequestRRt cacheabletcached_responsetresp((s?/tmp/pip-install-0xiv62/pip/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?/tmp/pip-install-0xiv62/pip/pip/_vendor/cachecontrol/adapter.pyt_update_chunk_lengthns(RRR tapplytstatusRtupdate_cached_responseRtreadtFalset release_conntcache_responseRR't functoolstpartialtchunkedR*ttypest MethodTypeR RRtinvalidating_methodstokt cache_urlturlR tdeleteR( RR!tresponseRRR"R#R*R$R9((R)s?/tmp/pip-install-0xiv62/pip/pip/_vendor/cachecontrol/adapter.pyR9s:           cCs$|jjƒtt|ƒjƒdS(N(R tcloseR R(R((s?/tmp/pip-install-0xiv62/pip/pip/_vendor/cachecontrol/adapter.pyR=ƒs N( t__name__t __module__R7RRR R R/RR=(((s?/tmp/pip-install-0xiv62/pip/pip/_vendor/cachecontrol/adapter.pyR s   I( R5R2Rtpip._vendor.requests.adaptersRRRR Rt filewrapperRR(((s?/tmp/pip-install-0xiv62/pip/pip/_vendor/cachecontrol/adapter.pyts