
    As<g                        d dl mZ d dlZd dlmZ d dlmZ d dlmZ d dl	m
Z
 d dlmZ d dlmZ erd d	lmZ d d
lmZ ddZddZddZddZedk(  r e        yy)    )annotationsN)ArgumentParser)TYPE_CHECKING)requests)CacheControlAdapter)	DictCache)logger)	Namespace)CacheControllerc                     t        j                  t        j                         t        j                         } t        j
                  |        y )N)r	   setLevelloggingDEBUGStreamHandler
addHandler)handlers    [/home/kevstigneev/proxy/myenv/lib/python3.12/site-packages/pip/_vendor/cachecontrol/_cmd.pysetup_loggingr      s.    
OOGMM"##%G
g    c                     t        t               dd d       } t        j                         }|j	                  d|        |j	                  d|        | j
                  |_        |S )NT)cache_etags
serializer	heuristiczhttp://zhttps://)r   r   r   Sessionmount
controllercache_controller)adaptersesss     r   get_sessionr       sV    !$$G DJJy'"JJz7##..DKr   c                 \    t               } | j                  dd       | j                         S )NurlzThe 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                        rt        d       y t        d       y )NzCached!zNot cached :()r'   r    getr"   r   r   cache_responserequestrawcached_requestprint)argsr   respr   s       r   mainr1   .   sy    :D=D 88DHHD O 	  ##DLL$((; &&t||4ior   __main__)returnNone)r3   zrequests.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   <module>r>      sP    #  #     @ 4 6"C	. zF r   