| Server IP : 127.0.0.1 / Your IP : 216.73.216.109 Web Server : Apache/2.4.54 (Win64) OpenSSL/1.1.1q PHP/8.1.10 System : Windows NT DESKTOP-E5T4RUN 10.0 build 19045 (Windows 10) AMD64 User : SERVERWEB ( 0) PHP Version : 8.1.10 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : C:/cygwin64/lib/python3.9/site-packages/pip/_internal/__pycache__/ |
Upload File : |
a
W��e�6 � @ s> d Z ddlZddlZddlZddlZddlmZmZmZm Z m
Z
mZmZ ddl
mZmZ ddlmZ ddlmZ ddlmZ ddlmZmZ ejZe
d e�Zer�d
ndZdZed
ddddd�Zejej ej!ej"ej#fZ$ej ejej!fZ%ee&�Z'eed�dd�Z(ee e d�dd�Z)eee e f d�dd�Z*G dd� d�Z+dS )a Configuration management setup
Some terminology:
- name
As written in config files.
- value
Value associated with a name
- key
Name combined with it's section (section.name)
- variant
A single word describing where the configuration key-value pair came from
� N)�Any�Dict�Iterable�List�NewType�Optional�Tuple)�ConfigurationError�!ConfigurationFileCouldNotBeLoaded)�appdirs)�WINDOWS)� getLogger)�
ensure_dir�enum�Kindzpip.inizpip.conf)�version�help�user�globalZsite�envzenv-var)�USER�GLOBAL�SITE�ENV�ENV_VAR)�name�returnc C s* | � � �dd�} | �d�r&| dd� } | S )zAMake a name consistent regardless of source (environment or file)�_�-z--� N)�lower�replace�
startswith)r � r# �?/usr/lib/python3.9/site-packages/pip/_internal/configuration.py�_normalize_name2 s
r% c C s( d| vrd| � d�}t |��| �dd�S )N�.zVKey does not contain dot separated section and key. Perhaps you wanted to use 'global.z
' instead?� )r �split)r Z
error_messager# r# r$ �_disassemble_key: s ��r) �r c C st dd� t �d�D �} tj�tjt�}tj�tj�d�t r<dndt�}tj�t �
d�t�}tj| tj
|gtj||giS )Nc S s g | ]}t j�|t��qS r# )�os�path�join�CONFIG_BASENAME)�.0r, r# r# r$ �
<listcomp>E s z+get_configuration_files.<locals>.<listcomp>Zpip�~z.pip)r Zsite_config_dirsr+ r, r- �sys�prefixr. �
expanduserr Zuser_config_dir�kindsr r r )Zglobal_config_filesZsite_config_fileZlegacy_config_fileZnew_config_filer# r# r$ �get_configuration_filesD s �
�
�r6 c s� e Zd ZdZd6eee dd�� fdd�
Zdd�dd�Zee d�d d
�Z
eee e
f d�dd�Ze e
d
�dd�Ze e
dd�dd�Ze dd
�dd�Zdd�dd�Zdd�dd�Zeee e
f d�dd��Zdd�dd�Zee ed�dd�Ze ed �d!d"�Zdd�d#d$�Ze eee e
f ee e
f d%�d&d'�Zeee e f d�d(d)�Zeeeee f d�d*d+�Zeee e
f d,�d-d.�Z ee ef d�d/d0�Z!e edd1�d2d3�Z"e d�d4d5�Z#� Z$S )7�
Configurationa� Handles management of configuration.
Provides an interface to accessing and managing configuration files.
This class converts provides an API that takes "section.key-name" style
keys and stores the value associated with it as "key-name" under the
section "section".
This allows for a clean interface wherein the both the section and the
key-name are preserved in an easy to manage form in the configuration files
and the data stored is also nice.
N)�isolated� load_onlyr c sj t � �� |d ur4|tvr4td�d�ttt�����|| _|| _ dd� t
D �| _dd� t
D �| _g | _
d S )Nz5Got invalid value for load_only - should be one of {}z, c S s i | ]
}|g �qS r# r# �r/ �variantr# r# r$ �
<dictcomp>r s z*Configuration.__init__.<locals>.<dictcomp>c S s i | ]
}|i �qS r# r# r: r# r# r$ r<