U ÀÒ.eã@sxddlZddlmZddlmZddlmZddlmZddl m Z dd„Z d d „Z d d „Z dd d„ZedkrteƒdS)éN)Úrequests)ÚCacheControlAdapter)Ú DictCache)Úlogger)ÚArgumentParsercCs"t tj¡t ¡}t |¡dS)N)rZsetLevelÚloggingÚDEBUGZ StreamHandlerZ addHandler)Zhandler©r úA/usr/lib/python3.8/site-packages/pip/_vendor/cachecontrol/_cmd.pyÚ setup_logging s r cCs>ttƒdddd�}t ¡}| d|¡| d|¡|j|_|S)NT)Z cache_etagsZ serializerZ heuristiczhttp://zhttps://)rrrZSessionZmountZ controllerÚcache_controller)ZadapterÚsessr r r Ú get_sessionsÿ  rcCstƒ}|jddd�| ¡S)NÚurlzThe URL to try and cache)Úhelp)rÚ add_argumentÚ parse_args)Úparserr r r Úget_argssrcCsTtƒ}tƒ}| |j¡}tƒ|j |j|j¡|j  |j¡rHt dƒnt dƒdS)NzCached!z Not cached :() rrÚgetrr r Zcache_responseZrequestÚrawZcached_requestÚprint)Úargsr Zrespr r r Úmain$s  rÚ__main__)N)rZ pip._vendorrZ pip._vendor.cachecontrol.adapterrZpip._vendor.cachecontrol.cacherZ#pip._vendor.cachecontrol.controllerrÚargparserr rrrÚ__name__r r r r Ús