ruạṛ
a eV�iT � @ s� d Z ddlmZ ddlZddlZddlZddlmZ ddlm Z ddl mZ ddlm Z ddlmZ dd lmZ er�dd lmZ ddlmZ ddlmZ e�e�Zed d�dd��ZG dd� de�Zdddd�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. � )�annotationsN)� lru_cache)�Values)� TYPE_CHECKING)�certifi)�Command)�CommandContextMixIn)� SSLContext)�NormalizedName�� PipSessionzSSLContext | None��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 �R/opt/bart/bart_venv/lib/python3.9/site-packages/pip/_internal/cli/index_command.py�_create_truststore_ssl_context! s r c s` e Zd ZdZdd�� fdd�Zeddd�d d ��Zddd�dd �Zdddddd�dd�Z� Z S )�SessionCommandMixinzE A class mixin for command classes needing _build_session(). �Noner c s t � �� d | _d S )N)�super�__init__�_session)�self�� __class__r r r$ = s zSessionCommandMixin.__init__r zlist[str] | None��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_urlsA 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&