3
”Re ã @ sx d dl Z d dlmZ d dlmZ d dlmZ d dlmZ d dl m
Z
dd„ Zd d
„ Zdd„ Z
dd
d„Zedkrteƒ dS )é N)Úrequests)ÚCacheControlAdapter)Ú DictCache)Úlogger)ÚArgumentParserc C s" t jtjƒ tjƒ } t j| ƒ d S )N)r ÚsetLevelÚloggingÚDEBUGÚ
StreamHandlerÚ
addHandler)Úhandler© r
úŒ/builddir/build/BUILDROOT/alt-python36-pip-20.2.4-5.el8.x86_64/opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/cachecontrol/_cmd.pyÚ
setup_logging s r c C s> t tƒ dd d d�} tjƒ }|jd| ƒ |jd| ƒ | j|_|S )NT)Úcache_etagsÚ
serializerÚ heuristiczhttp://zhttps://)r r r ÚSessionÚmountÚ
controllerÚcache_controller)ÚadapterÚsessr
r
r Úget_session s r c C s t ƒ } | jddd� | jƒ S )NÚurlzThe URL to try and cache)Úhelp)r Úadd_argumentÚ
parse_args)Úparserr
r
r Úget_args s r c C sT t ƒ } tƒ }|j| jƒ}tƒ |jj|j|jƒ |jj |jƒrHt
dƒ nt
dƒ d S )NzCached!z
Not cached :()r r Úgetr r r Úcache_responseÚrequestÚrawÚcached_requestÚprint)Úargsr Úrespr
r
r Úmain$ s
r( Ú__main__)N)r Úpip._vendorr Z pip._vendor.cachecontrol.adapterr Zpip._vendor.cachecontrol.cacher Z#pip._vendor.cachecontrol.controllerr Úargparser r r r r( Ú__name__r
r
r
r Ú