AlkantarClanX12
Current Path : /proc/self/root/lib/python2.7/site-packages/pip/_vendor/urllib3/ |
Current File : //proc/self/root/lib/python2.7/site-packages/pip/_vendor/urllib3/_collections.pyo |
� ��abc @@ s� d d l m Z d d l m Z m Z y d d l m Z Wn$ e k r` d d d � � YZ n Xy d d l m Z Wn! e k r� d d l m Z n Xd d l m Z m Z m Z d d g Z e � Z d e f d � � YZ d e f d � � YZ d S( i ( t absolute_import( t Mappingt MutableMapping( t RLockR c B@ s e Z d � Z d � Z RS( c C@ s d S( N( ( t self( ( sD /usr/lib/python2.7/site-packages/pip/_vendor/urllib3/_collections.pyt __enter__ s c C@ s d S( N( ( R t exc_typet exc_valuet traceback( ( sD /usr/lib/python2.7/site-packages/pip/_vendor/urllib3/_collections.pyt __exit__ s ( t __name__t __module__R R ( ( ( sD /usr/lib/python2.7/site-packages/pip/_vendor/urllib3/_collections.pyR s ( t OrderedDicti ( t iterkeyst itervaluest PY3t RecentlyUsedContainert HTTPHeaderDictc B@ sb e Z d Z e Z d d d � Z d � Z d � Z d � Z d � Z d � Z d � Z d � Z RS( s� Provides a thread-safe dict-like container which maintains up to ``maxsize`` keys while throwing away the least-recently-used keys beyond ``maxsize``. :param maxsize: Maximum number of recent elements to retain. :param dispose_func: Every time an item is evicted from the container, ``dispose_func(value)`` is called. Callback which will get called i c C@ s1 | | _ | | _ | j � | _ t � | _ d S( N( t _maxsizet dispose_funct ContainerClst _containerR t lock( R t maxsizeR ( ( sD /usr/lib/python2.7/site-packages/pip/_vendor/urllib3/_collections.pyt __init__+ s c C@ s7 | j �( | j j | � } | | j | <| SWd QXd S( N( R R t pop( R t keyt item( ( sD /usr/lib/python2.7/site-packages/pip/_vendor/urllib3/_collections.pyt __getitem__2 s c C@ s� t } | j �] | j j | t � } | | j | <t | j � | j k rh | j j d t � \ } } n Wd QX| j r� | t k r� | j | � n d S( Nt last( t _NullR R t gett lenR t popitemt FalseR ( R R t valuet evicted_valuet _key( ( sD /usr/lib/python2.7/site-packages/pip/_vendor/urllib3/_collections.pyt __setitem__9 s $c C@ s? | j � | j j | � } Wd QX| j r; | j | � n d S( N( R R R R ( R R R# ( ( sD /usr/lib/python2.7/site-packages/pip/_vendor/urllib3/_collections.pyt __delitem__H s c C@ s! | j � t | j � SWd QXd S( N( R R R ( R ( ( sD /usr/lib/python2.7/site-packages/pip/_vendor/urllib3/_collections.pyt __len__O s c C@ s t d � � d S( Ns7 Iteration over this class is unlikely to be threadsafe.( t NotImplementedError( R ( ( sD /usr/lib/python2.7/site-packages/pip/_vendor/urllib3/_collections.pyt __iter__S s c C@ s` | j �'