Uname : Linux premium36.web-hosting.com 4.18.0-553.44.1.lve.el8.x86_64 #1 SMP Thu Mar 13 14:29:12 UTC 2025 x86_64
Soft : LiteSpeed
Ip : 198.54.115.237
Port : 443
~
/
opt
/
hc_python
/
lib64
/
python3.12
/
site-packages
/
pip
/
_vendor
/
cachecontrol
/
__pycache__
[ HOME ]
Exec
Submit
adapter.cpython-312.pyc
� p�/i� � �� � d dl mZ d dlZd dlZd dlZd dlZd dlmZmZm Z m Z d dlmZ d dl mZ d dlmZmZ d dlmZ er d dlmZmZ d d lmZ d d l mZ d dlmZ d dlmZ G d � de� Zy)� )�annotationsN)� TYPE_CHECKING�Any� Collection�Mapping)�HTTPAdapter)� DictCache)�PERMANENT_REDIRECT_STATUSES�CacheController)�CallbackFileWrapper)�PreparedRequest�Response)�HTTPResponse)� BaseCache)� BaseHeuristic)� Serializerc � � � e Zd Zh d�Z d d� fd� Z d d � fd� Z d d� fd� Zd� fd�Z� xZS ) �CacheControlAdapter> �PUT�PATCH�DELETEc � �� t � | � |i |�� |� t � n|| _ || _ |xs d| _ |xs t } | | j ||�� | _ y )N)�GET)�cache_etags� serializer)�super�__init__r �cache� heuristic�cacheable_methodsr � controller)�selfr r �controller_classr r r �args�kw�controller_factory� __class__s ��O/opt/hc_python/lib/python3.12/site-packages/pip/_vendor/cachecontrol/adapter.pyr zCacheControlAdapter.__init__ s\ �� � ���$�%�"�%�$)�M�Y�[�u�� �"���!2�!>�h���-�@���,��J�J�K�J� ��� c �n �� |xs | j }|j |v rf | j j |� } | r| j || d�� S |j j | j j |� � t �| �- ||||||� } | S # t j $ r d} Y �ww xY w)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 �send)r"