HEX
Server: Microsoft-IIS/10.0
System: Windows NT ITPWINWEBSVR22 10.0 build 20348 (Windows Server 2022) AMD64
User: www.conferencesearch.co.uk (0)
PHP: 8.3.30
Disabled: NONE
Upload Files
File: D:/Python311/Lib/site-packages/pip/_internal/utils/__pycache__/subprocess.cpython-311.pyc
�

�mi#���ddlmZddlZddlZddlZddlZddlmZmZddl	m
Z
mZmZm
Z
ddlmZddlmZmZddlmZddlmZmZdd	lmZee
eefZd.d�Zd/d�Zd0d�Z									d1d2d*�Z d3d-�Z!dS)4�)�annotationsN)�Iterable�Mapping)�Any�Callable�Literal�Union)�escape)�SpinnerInterface�open_spinner)�InstallationSubprocessError)�VERBOSE�subprocess_logger)�
HiddenText�args�str | HiddenText | CommandArgs�return�CommandArgsc��g}|D]B}t|t��r|�|���-|�|���C|S)z&
    Create a CommandArgs object.
    )�
isinstance�list�extend�append)r�command_args�args   �@D:\Python311\Lib\site-packages\pip/_internal/utils/subprocess.py�make_commandrsb��!#�L��%�%���c�4� � �	%�����$�$�$�$�
����$�$�$�$����list[str] | CommandArgs�strc�@�d�d�|D����S)z/
    Format command arguments for display.
    � c3�K�|]N}t|t��r!tjt	|����ntj|��V��OdS)N)rr�shlex�quoter ��.0rs  r�	<genexpr>z&format_command_args.<locals>.<genexpr>.sd�������",�C��!<�!<�R���C��H�H����%�+�c�BR�BR������r)�join�rs r�format_command_argsr+%s6���8�8���������r�	list[str]c��d�|D��S)z=
    Return the arguments in their raw, unredacted form.
    c�J�g|] }t|t��r|jn|��!S�)rr�secretr&s  r�
<listcomp>z'reveal_command_args.<locals>.<listcomp>8s-��O�O�O�3�*�S�*�5�5�>�C�J�J�3�O�O�Orr/r*s r�reveal_command_argsr24s��P�O�$�O�O�O�OrF�raiseT�cmd�show_stdout�bool�cwd�
str | None�
on_returncode�"Literal['raise', 'warn', 'ignore']�extra_ok_returncodes�Iterable[int] | None�
extra_environ�Mapping[str, Any] | None�
unset_environ�Iterable[str] | None�spinner�SpinnerInterface | None�log_failed_cmd�bool | None�stdout_only�command_descc
	���|�g}|�g}|rtj}tj}ntj}t
}tj��|k}
|
o|du}|d|
��tj�	��}|r|�
|��|D]}|�|d���	tj
t|��tjtj|	stjntj||d���}n+#t"$r}|rtjd||
���d}~wwxYwg}|	�s|jsJ�|jsJ�|j���	|j���}|snR|���}|�|dz��||��|r|sJ�|����n	|���|jr|j���n&#|jr|j���wwxYwd�|��}n�|���\}}|���D]
}||���|�|��|���D]
}||���|�|��|}|jo|j|v}|r1|sJ�|r|�d	��n|�d
��|r�|dkr�tA|
|j|
s|nd���}|rttj!d
|ddi���tjdtEtG|����ddi���tjdtE|pd��ddi���|�|dkrtj$d|
|j|��n|dkrntKd|�����|S)a�
    Args:
      show_stdout: if true, use INFO to log the subprocess's stderr and
        stdout streams.  Otherwise, use DEBUG.  Defaults to False.
      extra_ok_returncodes: an iterable of integer return codes that are
        acceptable, in addition to 0. Defaults to None, which means [].
      unset_environ: an iterable of environment variable names to unset
        prior to calling subprocess.Popen().
      log_failed_cmd: if false, failed commands are not logged, only raised.
      stdout_only: if true, return only stdout, else return both. When true,
        logging of both stdout and stderr occurs when the subprocess has
        terminated, else logging occurs as subprocess output is produced.
    NzRunning command %s�backslashreplace)�stdin�stdout�stderrr7�env�errorsz#Error %s while executing command %sT�
��error�doner3)�command_description�	exit_code�output_linesz%s�rich)�extraz*[bold magenta]full command[/]: [blue]%s[/]�markupz[bold magenta]cwd[/]: %sz	[inherit]�warnz$Command "%s" had error code %s in %s�ignorezInvalid value: on_returncode=)&r�info�logging�INFO�verboser�getEffectiveLevel�os�environ�copy�update�pop�
subprocess�Popenr2�PIPE�STDOUT�	Exception�criticalrJrI�close�readline�rstripr�spin�waitr)�communicate�
splitlines�
returncode�finishr
rPr
r+�warning�
ValueError)r4r5r7r9r;r=r?rArCrErF�log_subprocess�
used_level�showing_subprocess�use_spinnerrL�name�proc�exc�
all_output�line�output�out�err�out_line�err_line�proc_had_errorrPs                            r�call_subprocessr�;s���6�"�!�����
� ��.?�.D���\�
�
�+�2���
�+�<�>�>�*�L��)�(�@�W�D�-@�K��N�'��6�6�6�
�*�/�/�
�
�C��"��
�
�=�!�!�!���������d����������$�$��/��?�,7�L�:�$�$�Z�_���%�	
�	
�	
���������	��&�5���
�
�
�
	����������J��#��{�����z�����
������	���,�,�.�.�D��
���;�;�=�=�D����d�T�k�*�*�*�
�N�4� � � ��
�����������	�	$��I�I�K�K�K��{�
$���!�!�#�#�#����{�
$���!�!�#�#�#�#�
$��������$�$����#�#�%�%���S����(�(�	%�	%�H��N�8�$�$�$�$����#�������(�(�	%�	%�H��N�8�$�$�$�$����#�������_�T���@T�)T�N��#������	#��N�N�7�#�#�#�#��N�N�6�"�"�"��P��G�#�	P�/�$0��/�/A�K�Z�Z�t����E�
�
�!�'��e�F�D�>�J�J�J�J�!�)�@��.�s�3�3�4�4�#�T�*�����
"�)�.��3�-�+�.�.�#�T�*������K�
�f�
$�
	P��%�6�����	
�
�
�
��h�
&�	P���N�]�N�N�O�O�O��Ms%�2AD�
D/�D*�*D/�H�#H*�message�Callable[..., None]c���		dd�fd
�
}|S)
z�Provide a subprocess_runner that shows a spinner message.

    Intended for use with for BuildBackendHookCaller. Thus, the runner has
    an API that matches what's expected by BuildBackendHookCaller.subprocess_runner.
    Nr4r,r7r8r=r>r�Nonec���t���5}t|�|||���ddd��dS#1swxYwYdS)N)rFr7r=rA)rr�)r4r7r=rAr�s    �r�runnerz+runner_with_spinner_message.<locals>.runner�s����
�'�
"�
"�	�g���$��+��
�
�
�
�	�	�	�	�	�	�	�	�	�	�	�	����	�	�	�	�	�	s�3�7�7)NN)r4r,r7r8r=r>rr�r/)r�r�s` r�runner_with_spinner_messager��s5����26���������Mr)rrrr)rrrr )rrrr,)	FNr3NNNNTF)r4rr5r6r7r8r9r:r;r<r=r>r?r@rArBrCrDrErDrFr rr )r�r rr�)"�
__future__rr[r_r$rd�collections.abcrr�typingrrrr	�pip._vendor.rich.markupr
�pip._internal.cli.spinnersrr�pip._internal.exceptionsr
�pip._internal.utils.loggingrr�pip._internal.utils.miscrrr rrr+r2r�r�r/rr�<module>r�s���"�"�"�"�"�"�����	�	�	�	���������-�-�-�-�-�-�-�-�0�0�0�0�0�0�0�0�0�0�0�0�*�*�*�*�*�*�E�E�E�E�E�E�E�E�@�@�@�@�@�@�B�B�B�B�B�B�B�B�/�/�/�/�/�/��5��j��)�*������"����P�P�P�P���8?�15�.2�*.�'+�"&�$�e�e�e�e�e�P�����r