관리-도구
편집 파일: _collections.cpython-311.pyc
� �܋fl, � � � d dl mZ d dlmZmZ n# e$ r d dlmZmZ Y nw xY w d dlmZ n# e$ r G d� d� � ZY nw xY wd dlm Z ddl mZ dd lm Z dd lmZmZ ddgZ e� � Z G d � de� � Z G d� de� � ZdS )� )�absolute_import)�Mapping�MutableMapping)�RLockc � � e Zd Zd� Zd� ZdS )r c � � d S �N� ��selfs �W/opt/cloudlinux/venv/lib64/python3.11/site-packages/pip/_vendor/urllib3/_collections.py� __enter__zRLock.__enter__ � � ��D� c � � d S r r )r �exc_type� exc_value� tracebacks r �__exit__zRLock.__exit__ r r N)�__name__� __module__�__qualname__r r r r r r r s2 � � � � � � � � � � � � � r r )�OrderedDict� )� InvalidHeader)�six)�iterkeys� itervalues�RecentlyUsedContainer�HTTPHeaderDictc �H � e Zd ZdZeZdd�Zd� Zd� Zd� Z d� Z d � Zd � Zd� Z dS ) r a� 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 � Nc �z � || _ || _ | � � � | _ t � � | _ d S r )�_maxsize�dispose_func�ContainerCls� _containerr �lock)r �maxsizer% s r �__init__zRecentlyUsedContainer.__init__/ s3 � ��� �(����+�+�-�-����G�G�� � � r c � � | j 5 | j � |� � }|| j |<