403Webshell
Server IP : 209.209.40.120  /  Your IP : 216.73.217.112
Web Server : Microsoft-IIS/10.0
System : Windows NT NEWWWW 10.0 build 17763 (Windows Server 2019) i586
User : NEWWWW$ ( 0)
PHP Version : 8.3.30
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  C:/Python312/Lib/site-packages/pip/_internal/commands/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : C:/Python312/Lib/site-packages/pip/_internal/commands/__pycache__/configuration.cpython-312.pyc
�

�k�f&&����ddlZddlZddlZddlmZddlmZmZmZddl	m
Z
ddlmZm
Z
ddlmZmZmZmZddlmZddlmZdd	lmZmZej4e�ZGd
�de
�Zy)�N)�Values)�Any�List�Optional)�Command)�ERROR�SUCCESS)�
Configuration�Kind�get_configuration_files�kinds)�PipError)�
indent_log)�get_prog�write_outputc�>�eZdZdZdZdZdd�Zdedee	de
fd	�Zded
ede
efd�Zdedee	ddfd�Zdedee	ddfd
�Zdedee	ddfd�Zdedee	ddfd�Zdedee	ddfd�Zdeddfd�Zdd�Zdedee	ddfd�Zdee	de	de
defd�Zdd�Zdede	fd�Zy)�ConfigurationCommanda�
    Manage local and global configuration.

    Subcommands:

    - list: List the active configuration (or from the file specified)
    - edit: Edit the configuration file in an editor
    - get: Get the value associated with command.option
    - set: Set the command.option=value
    - unset: Unset the value associated with command.option
    - debug: List the configuration files and values defined under them

    Configuration keys should be dot separated command and option name,
    with the special prefix "global" affecting any command. For example,
    "pip config set global.index-url https://example.org/" would configure
    the index url for all commands, but "pip config set download.timeout 10"
    would configure a 10 second timeout only for "pip download" commands.

    If none of --user, --global and --site are passed, a virtual
    environment configuration file is used if one is active and the file
    exists. Otherwise, all modifications happen to the user file by
    default.
    Ta$
        %prog [<file-option>] list
        %prog [<file-option>] [--editor <editor-path>] edit

        %prog [<file-option>] get command.option
        %prog [<file-option>] set command.option value
        %prog [<file-option>] unset command.option
        %prog [<file-option>] debug
    �returnNc�P�|jjddddd��|jjdddd	d
��|jjdddd	d
��|jjdddd	d��|jjd|j�y)Nz--editor�editor�storez\Editor to use to edit the file. Uses VISUAL or EDITOR environment variables if not provided.)�dest�action�default�helpz--global�global_file�
store_trueFz+Use the system-wide configuration file onlyz--user�	user_filez$Use the user configuration file onlyz--site�	site_filez3Use the current environment configuration file onlyr)�cmd_opts�
add_option�parser�insert_option_group��selfs �FC:\Python312\Lib\site-packages\pip/_internal/commands/configuration.py�add_optionsz ConfigurationCommand.add_options:s����
�
� � �����9�
	!�		
�	
�
�
� � �����>�	!�	
�	
�
�
� � �����7�	!�	
�	
�
�
� � �����F�	!�	
�	
���'�'��4�=�=�9��options�argsc���|j|j|j|j|j|j
d�}|r|d|vr4tjddjt|���tS|d}	|j||dv��}t|j|��|_|j j#�	||||dd�t$S#t$r2}tj|jd�tcYd}~Sd}~wwxYw#t$r2}tj|jd�tcYd}~Sd}~wwxYw)	N)�list�edit�get�set�unset�debugrzNeed an action (%s) to perform.z, )r.r/r0r-)�
need_value)�isolated�	load_only�)�list_values�open_in_editor�get_name�set_name_value�
unset_name�list_config_values�logger�error�join�sortedr�_determine_filerr*r
�
isolated_mode�
configuration�loadr	)r%r)r*�handlersrr4�es       r&�runzConfigurationCommand.run`sF���$�$��'�'��=�=��&�&��_�_��,�,�

���t�A�w�h�.��L�L�1��	�	�&��*�+�
��L��a���	��,�,��V�/N�%N�-��I�+��*�*�i�
���	
�����!�	��H�V��W�d�1�2�h�/�
���#�	��L�L������#��L��	���	��L�L������#��L��	�s<�	C*�D(�*	D%�3'D �D%� D%�(	E#�1'E�E#�E#r2c��tj|jftj|jftj
|jffD��cgc]	\}}|r|��}}}|sN|sytd�t�tj
D��rtj
StjSt|�dk(r|dStd��cc}}w)Nc3�ZK�|]#}tjj|����%y�w)N)�os�path�exists)�.0�site_config_files  r&�	<genexpr>z7ConfigurationCommand._determine_file.<locals>.<genexpr>�s&�����$������/�0��s�)+r5rzLNeed exactly one file to operate upon (--user, --site, --global) to perform.)r
�USERr�GLOBALr�SITEr�anyr�lenr)r%r)r2�key�value�file_optionss      r&r@z$ConfigurationCommand._determine_file�s������W�.�.�/����w�2�2�3����W�.�.�/��
���U�
�

�
��
������(?�(A�%�*�*�(M����z�z�!��z�z�!�
��
�!�
#���?�"��
5�
�	
��1
s�Cc��|j|dd��t|jj��D]\}}t	d||��y)Nr,r��n�%s=%r)�_get_n_argsr?rB�itemsr�r%r)r*rTrUs     r&r6z ConfigurationCommand.list_values�sJ������v���+� ��!3�!3�!9�!9�!;�<�	.�J�C����#�u�-�	.r(c�z�|j|dd��}|jj|�}td|�y)Nz
get [name]r5rXz%s)r[rB�	get_valuerr]s     r&r8zConfigurationCommand.get_name�s9�����t�\�Q��7���"�"�,�,�S�1���T�5�!r(c��|j|dd��\}}|jj||�|j�y)Nzset [name] [value]�rX)r[rB�	set_value�_save_configurationr]s     r&r9z#ConfigurationCommand.set_name_value�s@���%�%�d�,@�A�%�F�
��U����$�$�S�%�0�� � �"r(c��|j|dd��}|jj|�|j�y)Nzunset [name]r5rX)r[rB�unset_valuerc)r%r)r*rTs    r&r:zConfigurationCommand.unset_name�s9�����t�^�q��9�����&�&�s�+�� � �"r(c��|j|dd��|j�t|jj	��D]j\}}td|�|D]T}t
�5tjj|�}td||�|r|j|�ddd��V�ly#1swY�cxYw)z9List config key-value pairs across different config filesr1rrX�%s:z%s, exists: %rN)r[�print_env_var_valuesr?rB�iter_config_filesrrrIrJrK�print_config_file_values)r%r)r*�variant�files�fname�file_existss       r&r;z'ConfigurationCommand.list_config_values�s�������w�!��,��!�!�#�%�T�%7�%7�%I�%I�%K�L�	?�N�G�U����(��
?���\�?�"$�'�'�.�.��"7�K� �!1�5�+�F�"��5�5�g�>�	?�?�
?�	?�?�?�s
�)AB6�6B?rkc��|jj|�j�D]%\}}t�5t	d||�ddd��'y#1swY�2xYw)z.Get key-value pairs from the file of a variantz%s: %sN)rB�get_values_in_configr\rr)r%rk�namerUs    r&rjz-ConfigurationCommand.print_config_file_values�sZ���-�-�B�B�7�K�Q�Q�S�	4�K�D�%���
4��X�t�U�3�
4�
4�	4�
4�
4�s�A�A	c���tdd�t�5t|jj	��D]%\}}d|j���}td||��'	ddd�y#1swYyxYw)z5Get key-values pairs present as environment variablesrg�env_var�PIP_rZN)rrr?rB�get_environ_vars�upper)r%rTrUrss    r&rhz)ConfigurationCommand.print_env_var_values�sk���U�I�&�
�\�	6�$�T�%7�%7�%H�%H�%J�K�
6�
��U� �����
�.���W�g�u�5�
6�	6�	6�	6�s�AA-�-A6c�z�|j|�}|jj�}|�td��d|vrtd|����	t	j
|�d|�d�d��y#t$r}|js||_�d}~wtj$r}td|j����d}~wwxYw)Nz%Could not determine appropriate file.�"z4Can not open an editor for a file name containing "
z "T)�shellz(Editor Subprocess exited with exit code )
�_determine_editorrB�get_file_to_editr�
subprocess�
check_call�FileNotFoundError�filename�CalledProcessError�
returncode)r%r)r*rrmrEs      r&r7z#ConfigurationCommand.open_in_editor�s����'�'��0���"�"�3�3�5���=��B�C�C�
�E�\��G��w�O��
�	V��!�!�V�H�B�u�g�Q�"7�t�D�� �	��:�:�#��
����,�,�	V��E�a�l�l�^�T�U�U��	V�s$�A*�*	B:�3B�B:�B5�5B:�examplerYc�t�t|�|k7rd|�dt��d|�d�}t|��|dk(r|dS|S)zAHelper to make sure the command got the right number of argumentsz-Got unexpected number of arguments, expected z
. (example: "z config z")r5r)rSrr)r%r*r�rY�msgs     r&r[z ConfigurationCommand._get_n_args�sT���t�9��>�?��s�C�&�j�\��'��"�>�
��3�-����6���7�N��Kr(c��	|jj�y#t$r!tj	d�td��wxYw)Nz:Unable to save configuration. Please report this as a bug.zInternal Error.)rB�save�	Exceptionr<�	exceptionrr$s r&rcz(ConfigurationCommand._save_configurationsG��	.����#�#�%���	.����L�
��,�-�-�		.�s	��*Ac���|j�|jSdtjvrtjdSdtjvrtjdStd��)N�VISUAL�EDITORz"Could not determine editor to use.)rrI�environr)r%r)s  r&rzz&ConfigurationCommand._determine_editorsX���>�>�%��>�>�!�
����
#��:�:�h�'�'�
����
#��:�:�h�'�'��?�@�@r()rN)�__name__�
__module__�__qualname__�__doc__�ignore_require_venv�usager'rr�str�intrF�boolrrr@r6r8r9r:r;rjrhr7rr[rcrz�r(r&rrsi���0��
�E�$:�L+�6�+��c��+�s�+�Z
�v�
�4�
�H�T�N�
�<.�6�.��c��.�t�.�"��"�d�3�i�"�D�"�#�f�#�D��I�#�$�#�#�&�#��S�	�#�d�#�?�&�?��S�	�?�d�?� 4��4��4�6�V�f�V�D��I�V�$�V�,��S�	��C��C��C��	.�A��A�C�Ar(r)�loggingrIr|�optparser�typingrrr�pip._internal.cli.base_commandr�pip._internal.cli.status_codesrr	�pip._internal.configurationr
rrr
�pip._internal.exceptionsr�pip._internal.utils.loggingr�pip._internal.utils.miscrr�	getLoggerr�r<rr�r(r&�<module>r�sT���	���&�&�2�9���.�2�;�	��	�	�8�	$��BA�7�BAr(

Youez - 2016 - github.com/yon3zu
LinuXploit