관리-도구
편집 파일: adapter.cpython-311.pyc
� �Re � �j � d dl Z d dlZd dlZd dlmZ ddlmZ ddlmZ ddl m Z G d� de� � ZdS ) � N)�HTTPAdapter� )�CacheController)� DictCache)�CallbackFileWrapperc �X � � e Zd ZddhZ d � fd� Zd� fd� Z d� fd� Z� fd �Z� xZS ) �CacheControlAdapter�PUT�DELETENTc �� �� t t | � � j |i |�� |�t � � n|| _ || _ |pd| _ |pt } | | j ||�� � | _ d S )N)�GET)�cache_etags� serializer) �superr �__init__r �cache� heuristic�cacheable_methodsr � controller)�selfr r �controller_classr r r �args�kw�controller_factory� __class__s ���/builddir/build/BUILDROOT/alt-python311-pip-21.3.1-3.el8.x86_64/opt/alt/python311/lib/python3.11/site-packages/pip/_vendor/cachecontrol/adapter.pyr zCacheControlAdapter.__init__ s� �� � 2��!�4�(�(�1�4�>�2�>�>�>�$)�M�Y�[�[�[�u�� �"���!2�!>�h���-�@���,�,��J�K�J� � � ����� c �l �� |p| j }|j |v r | j � |� � }n# t j $ r d}Y nw xY w|r| � ||d�� � S |j � | j � |� � � � t t | � � j |fi |��}|S )z� 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. NT)� from_cache) r �methodr �cached_request�zlib�error�build_response�headers�update�conditional_headersr r �send)r �requestr r � cacheable�cached_response�respr s �r r( zCacheControlAdapter.send$ s� �� � &�?��)?� ��>�Y�&�&� '�"&�/�"@�"@��"I�"I�����:� '� '� '�"&���� '����� V��*�*�7�O�PT�*�U�U�U� �O�"�"�4�?�#F�#F�w�#O�#O�P�P�P�4�u�(�$�/�/�4�W�C�C��C�C���s �0 �A�AFc �> �� � |p| j }|�s|j |v �r| j r| j � |� � }|j dk rN| j � ||� � }||urd}|� d�� � |� � � |}n�|j dk r| j � ||� � net |j t j | j j ||� � � � |_ |j r&|j � � fd�}t! j ||� � |_ t% t&