Файловый менеджер - Редактировать - /opt/imh-python/lib/python3.9/site-packages/pip/_vendor/cachecontrol/__pycache__/adapter.cpython-39.pyc
Ðазад
a "�h� � @ s� 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 d� de�ZdS )� )�annotationsN)� TYPE_CHECKING�Any� Collection�Mapping)�HTTPAdapter)� DictCache)�PERMANENT_REDIRECT_STATUSES�CacheController)�CallbackFileWrapper)�PreparedRequest�Response)�HTTPResponse)� BaseCache)� BaseHeuristic)� Serializerc s� e Zd Zh d�Zd dddddd d d dd� � fd d� Zd!ddddddd dd�� fdd� Zd"dddd dd�� fdd� Zdd�� fdd�Z� ZS )#�CacheControlAdapter> �DELETE�PATCH�PUTNTzBaseCache | None�boolztype[CacheController] | NonezSerializer | NonezBaseHeuristic | NonezCollection[str] | Noner �None) �cache�cache_etags�controller_class� serializer� heuristic�cacheable_methods�args�kw�returnc sT t � j|i |�� |d u r t� n|| _|| _|p2d| _|p<t} | | j||d�| _d S )N)�GET)r r )�super�__init__r r r r r � controller) �selfr r r r r r r r �controller_factory�� __class__� ��/root/rpmbuild/BUILDROOT/imh-python39-modules-3.9.7-92.el8.x86_64/opt/imh-python/lib/python3.9/site-packages/pip/_vendor/cachecontrol/adapter.pyr# s �zCacheControlAdapter.__init__Fr z7None | float | tuple[float, float] | tuple[float, None]z bool | strz4None | bytes | str | tuple[bytes | str, bytes | str]zMapping[str, str] | Noner )�request�stream�timeout�verify�cert�proxiesr r c s� |p| j }|j|v rfz| j�|�} W n tjy< d} Y n0 | rR| j|| dd�S |j�| j� |�� t � �||||||�} | 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"