Файловый менеджер - Редактировать - /opt/imh-python/lib/python3.9/site-packages/pip/_internal/cli/__pycache__/index_command.cpython-39.pyc
Ðазад
a "�hX � @ s� d Z ddlZddlZddlZddlmZ ddlmZ ddlm Z m Z mZ ddlm Z ddlmZ ddlmZ e r�dd lmZ dd lmZ e�e�Zeed d�d d��ZG dd� de�Zdedd�dd�ZG dd� dee�ZdS )a& Contains command classes which may interact with an index / the network. Unlike its sister module, req_command, this module still uses lazy imports so commands which don't always hit the network (e.g. list w/o --outdated or --uptodate) don't need waste time importing PipSession and friends. � N)� lru_cache)�Values)� TYPE_CHECKING�List�Optional)�certifi)�Command)�CommandContextMixIn)� SSLContext�� PipSessionr ��returnc C s� t jdk rt�d� d S zdd l} W n tyB t�d� Y d S 0 zddlm} W n tyr t�d� Y d S 0 |� | j �}|�t� � � |S )N)� � z7Disabling truststore because Python version isn't 3.10+r z1Disabling truststore since ssl support is missing)� truststorez5Disabling truststore because platform isn't supported)�sys�version_info�logger�debug�ssl�ImportError�warning�pip._vendorr r �PROTOCOL_TLS_CLIENT�load_verify_locationsr �where)r r �ctx� r ��/root/rpmbuild/BUILDROOT/imh-python39-modules-3.9.7-92.el8.x86_64/opt/imh-python/lib/python3.9/site-packages/pip/_internal/cli/index_command.py�_create_truststore_ssl_context s r c sp e Zd ZdZdd�� fdd�Zeeeee d�dd��Z ed d�d d�Zdeee ee d d�d d�Z � ZS )�SessionCommandMixinzE A class mixin for command classes needing _build_session(). Nr c s t � �� d | _d S )N)�super�__init__�_session)�self�� __class__r r r# 9 s zSessionCommandMixin.__init__��optionsr c C sL g }t |dd�s*t |dd�}|r*|�|� t |dd�}|rD|�|� |pJdS )z7Return a list of index urls from user-provided options.�no_indexF� index_urlN�extra_index_urls)�getattr�append�extend)�clsr) � index_urls�url�urlsr r r �_get_index_urls= s z#SessionCommandMixin._get_index_urlsr c C s0 | j du r*| �| �|��| _ | j dus*J �| j S )zGet a default-managed session.N)r$ � enter_context�_build_session)r% r) r r r �get_default_sessionK s z'SessionCommandMixin.get_default_session)r) �retries�timeoutr c C s� ddl m} |j}|r&tj�|�s&J �d|jvr8t� }nd }||rPtj�|d�nd |d ur^|n|j |j | �|�|d�}|jr�|j|_ |jr�|j|_|js�|r�|d ur�|n|j|_|jr�|j|jd�|_d|_|j|_|j |j_|j|j_|S )Nr r zlegacy-certszhttp-v2)�cacher8 � trusted_hostsr1 �ssl_context)�http�httpsF)�pip._internal.network.sessionr � cache_dir�os�path�isabs�deprecated_features_enabledr �joinr8 r; r4 �cert�verify�client_certr9 �proxy�proxies� trust_env� pip_proxy�no_input�auth� prompting�keyring_provider)r% r) r8 r9 r r@ r<