File manager - Edit - /opt/imunify360/venv/lib/python3.11/site-packages/pip/_internal/cli/__pycache__/index_command.cpython-311.pyc
Back
� ��]j� � �8 � d Z ddlmZ ddlZddlZddlZddlmZ ddlm Z ddl mZ ddlm Z ddlmZ dd lmZ dd lmZ e rddlmZ ddlmZ dd lmZ ddlmZ ej e� � Ze dd�� � Z G d� de� � Z d d�Z!d!d�Z" G d� dee � � Z#dS )"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)�Iterator)� lru_cache)�Values)� TYPE_CHECKING)�certifi)�Command)�CommandContextMixIn)� SSLContext)�NormalizedName�� PipSession)� UpgradePrompt�return�SSLContext | Nonec �N � dd l } n+# t $ r t � d� � Y d S w xY w ddlm} n+# t $ r t � d� � Y d S w xY w|� | j � � }|� t j � � � � |S )Nr z1Disabling truststore since ssl support is missing)� truststorez5Disabling truststore because platform isn't supported)�ssl�ImportError�logger�warning�pip._vendorr r �PROTOCOL_TLS_CLIENT�load_verify_locationsr �where)r r �ctxs �/builddir/build/BUILD/imunify360-venv-2.6.3/opt/imunify360/venv/lib/python3.11/site-packages/pip/_internal/cli/index_command.py�_create_truststore_ssl_contextr # s� � ��� � � � ��� � � ����J�K�K�K��t�t������*�*�*�*�*�*�*��� � � ����N�O�O�O��t�t����� � � �� 7� 8� 8�C����g�m�o�o�.�.�.��Js � �$/�/�: �$A"�!A"c �R � � e Zd ZdZd� fd�Zedd�� � Zdd �Z ddd�Z� xZ S )�SessionCommandMixinzE A class mixin for command classes needing _build_session(). r �Nonec �V �� t � � � � � d | _ d S )N)�super�__init__�_session)�self� __class__s �r r$ zSessionCommandMixin.__init__; s$ �� � ��������+/�� � � � �optionsr �list[str] | Nonec �� � g }t |dd� � s(t |dd� � }|r|� |� � t |dd� � }|r|� |� � |pdS )z7Return a list of index urls from user-provided options.�no_indexF� index_urlN�extra_index_urls)�getattr�append�extend)�clsr) � index_urls�url�urlss r �_get_index_urlsz#SessionCommandMixin._get_index_urls? s� � � � ��w� �E�2�2� '��'�;��5�5�C�� '��!�!�#�&�&�&��w� 2�D�9�9��� $����d�#�#�#��!�T�!r( r c � � | j �6| � | � |� � � � | _ | j �J �| j S )zGet a default-managed session.)r% � enter_context�_build_session)r&