403Webshell
Server IP : 217.160.0.135  /  Your IP : 216.73.217.85
Web Server : Apache
System : Linux www 6.18.52-i1-ampere #1203 SMP Mon Sep 14 18:29:59 CEST 2026 aarch64
User : sws1074145052 ( 1074145052)
PHP Version : 8.3.32
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /lib/python3/dist-packages/pip/_internal/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /lib/python3/dist-packages/pip/_internal/__pycache__/configuration.cpython-311.pyc
�

�/�c�4����dZddlZddlZddlZddlZddlmZmZmZm	Z	m
Z
mZmZddl
mZmZddlmZddlmZddlmZddlmZmZejZe
d	e��Zerd
ndZdZed
dddd���Zejej ej!ej"ej#fZ$ej ejej!fZ%ee&��Z'dedefd�Z(dede	efd�Z)deee	effd�Z*Gd�d��Z+dS)aConfiguration 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�global�site�envzenv-var)�USER�GLOBAL�SITE�ENV�ENV_VAR�name�returnc��|����dd��}|�d��r
|dd�}|S)zAMake a name consistent regardless of source (environment or file)�_�-z--�N)�lower�replace�
startswith)rs �=/usr/lib/python3/dist-packages/pip/_internal/configuration.py�_normalize_namer'2sE���:�:�<�<����S�)�)�D����t�����A�B�B�x���K�c�~�d|vr$d�|��}t|���|�dd��S)N�.zbKey does not contain dot separated section and key. Perhaps you wanted to use 'global.{}' instead?�)�formatr
�split)r�
error_messages  r&�_disassemble_keyr/:sD��
�$���
=�
�&��,�,�	�!��/�/�/��:�:�c�1���r(c���d�tjd��D��}tj�t
jt��}tj�tj�d��trdndt��}tj�tj
d��t��}tj|tj
|gtj||giS)Nc�X�g|]'}tj�|t����(S�)�os�path�join�CONFIG_BASENAME)�.0r4s  r&�
<listcomp>z+get_configuration_files.<locals>.<listcomp>Es5�����04�����T�?�+�+���r(�pip�~z.pip)r�site_config_dirsr3r4r5�sys�prefixr6�
expanduserr
�user_config_dir�kindsrrr)�global_config_files�site_config_file�legacy_config_file�new_config_files    r&�get_configuration_filesrEDs�����8?�8P�QV�8W�8W������w�|�|�C�J��@�@������
����3����$���f�����
�g�l�l�7�#:�5�#A�#A�?�S�S�O�
��)�
�
�%�&�
�
�'��9��r(c�"��eZdZdZd"dedeeddf�fd�
Zd#d�Zdee	fd�Z
deee	e
ffd	�Zd
e	de
fd�Zd
e	de
ddfd
�Zd
e	ddfd�Zd#d�Zd#d�Zedee	e
ffd���Zd#d�Zdede	defd�Zde	defd�Zd#d�Zde	deee	e
fdee	e
ffd�Zdeee	e	ffd�Zdeeeee	ffd�Zdedee	e
ffd�Z dee	effd�Z!de	deddfd �Z"de	fd!�Z#�xZ$S)$�
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_onlyrc
�z��t�����|�V|tvrMtd�d�t
tt���������||_||_	d�tD��|_d�tD��|_g|_
dS)Nz5Got invalid value for load_only - should be one of {}z, c��i|]}|g��Sr2r2�r7�variants  r&�
<dictcomp>z*Configuration.__init__.<locals>.<dictcomp>rs-��H
�H
�H
�#�G�R�H
�H
�H
r(c��i|]}|i��Sr2r2rLs  r&rNz*Configuration.__init__.<locals>.<dictcomp>us'��4
�4
�4
�#�G�R�4
�4
�4
r()�super�__init__�VALID_LOAD_ONLYr
r,r5�map�reprrHrI�OVERRIDE_ORDER�_parsers�_config�_modified_parsers)�selfrHrI�	__class__s   �r&rQzConfiguration.__init__es����
��������� �Y�o�%E�%E�$�G�N�N��I�I�c�$��8�8�9�9�����
�
!��
�"���H
�H
�'5�H
�H
�H
��
�4
�4
�'5�4
�4
�4
���EG����r(c�h�|���|js|���dSdS)z<Loads configuration from configuration files and environmentN)�_load_config_filesrH�_load_environment_vars�rYs r&�loadzConfiguration.loadzs@�����!�!�!��}�	*��'�'�)�)�)�)�)�	*�	*r(c�|�|j�
Jd���	|���dS#t$rYdSwxYw)z7Returns the file with highest priority in configurationNz)Need to be specified a file to be editingr)rI�_get_parser_to_modify�
IndexErrorr^s r&�get_file_to_editzConfiguration.get_file_to_edit�sW���~�)�)�+V�)�)�)�	��-�-�/�/��2�2���	�	�	��4�4�	���s�-�
;�;c�4�|j���S)z`Returns key-value pairs like dict.items() representing the loaded
        configuration
        )�_dictionary�itemsr^s r&rfzConfiguration.items�s����%�%�'�'�'r(�keyc��|}t|��}	|j|S#t$r"t|��t	d|�����wxYw)z#Get a value from the configuration.�No such key - )r're�KeyErrorr/r
)rYrg�orig_keys   r&�	get_valuezConfiguration.get_value�sn�����c�"�"��	B��#�C�(�(���	B�	B�	B�
�S�!�!�!�$�%@�h�%@�%@�A�A�A�		B���s	� �,A�valuec��t|��}|���|jsJ�|���\}}|�St	|��\}}|�|��s|�|��|�|||��||j|j|<|�	||��dS)z$Modify a value in the configuration.N)
r'�_ensure_have_load_onlyrIrar/�has_section�add_section�setrW�_mark_as_modified)rYrgrm�fname�parser�sectionrs       r&�	set_valuezConfiguration.set_value�s����c�"�"���#�#�%�%�%��~�����2�2�4�4�
��v���,�S�1�1�M�G�T��%�%�g�.�.�
,��"�"�7�+�+�+��J�J�w��e�,�,�,�,1���T�^�$�S�)����u�f�-�-�-�-�-r(c��|}t|��}|���|jsJ�||j|jvrt	d|�����|���\}}|��t
|��\}}|�|��r|�||��st	d���|�	|��s|�
|��|�||��|j|j|=dS)z#Unset a value in the configuration.riNz4Fatal Internal error [id=1]. Please report as a bug.)r'rorIrWr
rar/rp�
remove_optionrf�remove_sectionrs)rYrgrkrtrurvrs       r&�unset_valuezConfiguration.unset_value�s'�����c�"�"���#�#�%�%�%��~�����d�l�4�>�2�2�2�$�%@�h�%@�%@�A�A�A��2�2�4�4�
��v���,�S�1�1�M�G�T��"�"�7�+�+�
�06�0D�0D�W�d�0S�0S�
�)�J����
�<�<��(�(�
/��%�%�g�.�.�.��"�"�5�&�1�1�1��L���(��-�-�-r(c�P�|���|jD]�\}}t�d|��t	t
j�|����t|d��5}|�	|��ddd��n#1swxYwY��dS)z!Save the current in-memory state.z
Writing to %s�wN)
rorX�logger�inforr3r4�dirname�open�write)rYrtru�fs    r&�savezConfiguration.save�s����#�#�%�%�%�!�3�	 �	 �M�E�6��K�K���/�/�/�
�r�w���u�-�-�.�.�.��e�S�!�!�
 �Q����Q����
 �
 �
 �
 �
 �
 �
 �
 �
 �
 �
 ����
 �
 �
 �
 ��
	 �	 s�8B�B	�!B	c�r�|j�td���t�d|j��dS)Nz'Needed a specific file to be modifying.z$Will be working with %s variant only)rIr
r~�debugr^s r&roz$Configuration._ensure_have_load_only�s6���>�!�$�%N�O�O�O����;�T�^�L�L�L�L�Lr(c�^�i}tD]"}|�|j|���#|S)z3A dictionary representing the loaded configuration.)rU�updaterW)rY�retvalrMs   r&rezConfiguration._dictionary�s9��
��%�	1�	1�G��M�M�$�,�w�/�0�0�0�0��
r(c���t|�����}|tjdd�tjgkrt�d��dS|���D]q\}}|D]i}|j	�(||j	krt�d||���1|�
||��}|j|�||f���j�rdS)z,Loads configuration from configuration filesrr+zZSkipping loading configuration files due to environment's PIP_CONFIG_FILE being os.devnullNz Skipping file '%s' (variant: %s))
�dict�iter_config_filesr@rr3�devnullr~r�rfrI�
_load_filerV�append)rY�config_filesrM�filesrtrus      r&r\z Configuration._load_config_files�s���D�2�2�4�4�5�5����	�"�1�Q�3�'�B�J�<�7�7��L�L�A�
�
�
�
�F�*�0�0�2�2�	?�	?�N�G�U��

?�

?���>�-�'�T�^�2K�2K��L�L�!C�U�G�T�T�T������%�8�8���
�g�&�-�-�u�f�o�>�>�>�>�

?�	?�	?r(rMrtc�(�t�d||��|�|��}|���D]K}|�|��}|j|�|�||�����L|S)Nz'For variant '%s', will try loading '%s')r~�verbose�_construct_parser�sectionsrfrWr��_normalized_keys)rYrMrtrurvrfs      r&r�zConfiguration._load_files������@�'�5�Q�Q�Q��'�'��.�.�����(�(�	P�	P�G��L�L��)�)�E��L��!�(�(��)>�)>�w��)N�)N�O�O�O�O��
r(c�N�tj��}tj�|��rrtjd��}	|�||���nE#t$rtd|�d�|����tj
$r}t|����d}~wwxYw|S)NF)�encodingzcontains invalid z characters)�reasonrt)�error)�configparser�RawConfigParserr3r4�exists�locale�getpreferredencoding�read�UnicodeDecodeErrorr�Error)rYrtru�locale_encodingr�s     r&r�zConfiguration._construct_parsers����-�/�/��
�7�>�>�%� � �	E�$�9�%�@�@�O�

E����E�O��<�<�<�<��%�
�
�
�7�K��K�K�K������ �%�
E�
E�
E�7�e�D�D�D�D�����
E�����
s�A � -B"�
B�B"c��|jtj�|�d|�������dS)z.Loads configuration from environment variablesz:env:N)rWr@rr�r��get_environ_varsr^s r&r]z$Configuration._load_environment_vars#sL����U�]�#�*�*��!�!�'�4�+@�+@�+B�+B�C�C�	
�	
�	
�	
�	
r(rvrfc�N�i}|D]\}}|dzt|��z}|||<� |S)z�Normalizes items to construct a dictionary with normalized keys.

        This routine is where the names become keys and are made the same
        regardless of source - configuration files or environment.
        r*)r')rYrvrf�
normalizedr�valrgs       r&r�zConfiguration._normalized_keys)sC���
��	"�	"�I�D�#��C�-�/�$�"7�"7�7�C�!�J�s�O�O��r(c#��K�tj���D]E\}}|�d��r+|dd����}|t
vr||fV��FdS)z@Returns a generator with all environmental vars with prefix PIP_�PIP_�N)r3�environrfr%r#�ENV_NAMES_IGNORED)rYrgr�rs    r&r�zConfiguration.get_environ_vars7st�����
�(�(�*�*�	$�	$�H�C���~�~�f�%�%�
$��1�2�2�w�}�}�����0�0�0���)�O�O�O��		$�	$r(c#��K�tj�dd��}|�tj|gfV�ntjgfV�t��}tj|tjfV�|jo!|otj�	|��}|r tj
|tj
fV�tj|tjfV�dS)zYields variant and configuration files associated with it.

        This should be treated like items of a dictionary.
        �PIP_CONFIG_FILEN)r3r��getr@rrErrHr4r�rr)rY�config_filer��should_load_user_configs    r&r�zConfiguration.iter_config_files@s������j�n�n�%6��=�=���"��)�k�]�*�*�*�*�*��)�R�-����.�0�0���l�L���6�6�6�6�6�'+�m�"3�#
��7�B�G�N�N�;�7�7�9
��#�	7��*�l�5�:�6�6�6�6�6��j�,�u�z�2�2�2�2�2�2�2r(c��|j|S)z#Get values present in a config file)rW)rYrMs  r&�get_values_in_configz"Configuration.get_values_in_config^s���|�G�$�$r(c�j�|jsJ�|j|j}|std���|dS)Nz4Fatal Internal error [id=2]. Please report as a bug.���)rIrVr
)rY�parserss  r&raz#Configuration._get_parser_to_modifybsG���~�����-���/���	�$�F���
�
�r�{�r(ruc�X�||f}||jvr|j�|��dSdS�N)rXr�)rYrtru�file_parser_tuples    r&rszConfiguration._mark_as_modifiedps@��"�F�O���D�$:�:�:��"�)�)�*;�<�<�<�<�<�;�:r(c�0�|jj�d|j�d�S)N�(�))rZ�__name__rer^s r&�__repr__zConfiguration.__repr__us!���.�)�A�A�D�,<�A�A�A�Ar(r�)rN)%r��
__module__�__qualname__�__doc__�boolrrrQr_�strrcrr	rrfrlrwr{r�ro�propertyrrer\r�r�r�r]r�r�rr�r�rarsr��
__classcell__)rZs@r&rGrGWs=���������G�G��G�(�4�.�G�D�G�G�G�G�G�G�**�*�*�*��(�3�-�����(�x��c�3�h��0�(�(�(�(�
B�S�
B�S�
B�
B�
B�
B�.�S�.��.��.�.�.�.�&.�s�.�t�.�.�.�.�: � � � �"M�M�M�M�
�	�T�#�s�(�^�	�	�	��X�	�?�?�?�?�.�$��s��������s�������*
�
�
�
����#+�E�#�s�(�O�#<��	
�c�3�h������$�(�5��c��?�";�$�$�$�$�3�8�E�$��S�	�/�,B�#C�3�3�3�3�<%�D�%�T�#�s�(�^�%�%�%�%��u�S�/�-A�'B�����=�s�=�O�=��=�=�=�=�
B�#�B�B�B�B�B�B�B�Br(rG),r�r�r�r3r<�typingrrrrrrr	�pip._internal.exceptionsr
r�pip._internal.utilsr�pip._internal.utils.compatr
�pip._internal.utils.loggingr�pip._internal.utils.miscrrr�r�rr6r�r@rrrrrrUrRr�r~r'r/rErGr2r(r&�<module>r�s-��������
�
�
�
�	�	�	�	�
�
�
�
�F�F�F�F�F�F�F�F�F�F�F�F�F�F�F�F�F�F���������(�'�'�'�'�'�.�.�.�.�.�.�1�1�1�1�1�1�5�5�5�5�5�5�5�5��.���w�v�s����&�6�)�)�J��%��	
��	��	�
��	�	�	����u�z�5�:�u�y�%�-�O���*�e�l�E�J�6��	��8�	�	���#��#������3��4��9�������d�D��I�o�!6�����&_B�_B�_B�_B�_B�_B�_B�_B�_B�_Br(

Youez - 2016 - github.com/yon3zu
LinuXploit