ok
Direktori : /opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/cachecontrol/ |
Current File : //opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/cachecontrol/adapter.pyc |
� Bu�_c @ s~ d d l Z d d l 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 e f d � � YZ d S( i����N( t HTTPAdapteri ( t CacheController( t DictCache( t CallbackFileWrappert CacheControlAdapterc B sS e Z d d h Z d e d d d d d � Z d d � Z e d d � Z d � Z RS( t PUTt DELETEc O s} t t | � j | | � | d k r. t � n | | _ | | _ | pI d | _ | pX t } | | j d | d | �| _ d S( Nt GETt cache_etagst serializer( R ( t superR t __init__t NoneR t cachet heuristict cacheable_methodsR t controller( t selfR R t controller_classR R R t argst kwt controller_factory( ( sQ /opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/cachecontrol/adapter.pyR s c K s� | p | j } | j | k r� y | j j | � } Wn t j k rP d } n X| rm | j | | d t �S| j j | j j | � � n t 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( R t methodR t cached_requestt zlibt errorR t build_responset Truet headerst updatet conditional_headersR R t send( R t requestR R t cacheablet cached_responset resp( ( sQ /opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/cachecontrol/adapter.pyR $ s c s� | p | j } | r*| j | k r*| j rC | j j | � } n | j d k r� | j j | | � } | | k r| t } n | j d t � | j � | } q*| j d k r� | j j | | � q*t | j t j | j j | | � � | _ | j r*| j � � f d � } t j | | � | _ q*n t t | � j | | � } | j | j k r�| j r�| j j | j � } | j j | � 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 i0 t decode_contenti- c s* � � | j d k r&