R`i d dl mZ d dlZd dlmZ d dlmZ d dlmZ d dl m
Z
d dlmZ d dl
mZ erd d lmZ d d
l
mZ ddZddZdd
ZddZedk( r e yy) )annotationsN)ArgumentParser)
TYPE_CHECKING)requests)CacheControlAdapter) DictCache)logger) Namespace)CacheControllerc t j t j t j } t j
| y )N)r setLevelloggingDEBUG
StreamHandler
addHandler)handlers /builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/cachecontrol/_cmd.py
setup_loggingr s.
OOGMM"##%G
g c t t dd d } t j }|j d| |j d| | j
|_ |S )NT)cache_etags
serializer heuristiczhttp://zhttps://)r r r Sessionmount
controllercache_controller)adaptersesss r get_sessionr sV !$$G DJJy'"JJz7##..DKr c \ t } | j dd | j S )NurlzThe URL to try and cache)help)r add_argument
parse_args)parsers r get_argsr' ( s-
F
$>?r c > t } t }|j | j }t |j
}|j
|j |j |j |j rt d y t d y )NzCached!z
Not cached :()r' r getr" r r cache_responserequestrawcached_requestprint)argsr respr s r mainr1 . sy :D=D 88DHHD O
##DLL$((; &&t||4
i
or __main__)returnNone)r3 zrequests.Session)r3 r
)
__future__r r argparser typingr pip._vendorr pip._vendor.cachecontrol.adapterr pip._vendor.cachecontrol.cacher #pip._vendor.cachecontrol.controllerr r
r r r r' r1 __name__ r r