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/__pycache__/exceptions.cpython-311.pyc
�

�mi�s���dZddlmZddlZddlZddlZddlZddlZddlZddl	Z	ddl
mZddlm
Z
mZmZddlmZmZddlmZddlmZdd	lmZmZmZdd
lmZddlmZer ddlm Z dd
l!m"Z"m#Z#ddl$m%Z%ddl&m'Z'ddl(m)Z)ej*e+��Z,dod�Z-dpd�Z.Gd�de/��Z0Gd�d e0��Z1Gd!�d"e0��Z2Gd#�d$e0��Z3Gd%�d&e3��Z4Gd'�d(e1��Z5Gd)�d*e1��Z6Gd+�d,e0��Z7Gd-�d.e3��Z8Gd/�d0e3��Z9Gd1�d2e3��Z:Gd3�d4e3��Z;Gd5�d6e0��Z<Gd7�d8e0��Z=Gd9�d:e0��Z>Gd;�d<e0��Z?Gd=�d>e0��Z@Gd?�d@e3��ZAGdA�dBe3��ZBGdC�dDe3��ZCGdE�dFe3��ZDGdG�dHe3��ZEGdI�dJe1e3��ZFGdK�dLe1e3��ZGGdM�dNe3��ZHGdO�dPe3��ZIGdQ�dReI��ZJGdS�dTeI��ZKGdU�dVeI��ZLGdW�dXeI��ZMGdY�dZeI��ZNGd[�d\e3��ZOGd]�d^e2��ZPd_e	jQ�d`�ZRGda�dbe1��ZSGdc�dde1��ZTGde�dfe1��ZUGdg�dhe1��ZVGdi�dje1��ZWGdk�dle1��ZXGdm�dne1��ZYdS)qz�Exceptions used throughout package.

This module MUST NOT try to import from anything within `pip._internal` to
operate. This is expected to be importable from any/all files within the
subpackage and, thus, should not depend on them.
�)�annotationsN)�Iterator)�chain�groupby�repeat)�
TYPE_CHECKING�Literal)�InvalidRequirement)�InvalidVersion)�Console�ConsoleOptions�RenderResult)�escape)�Text)�_Hash)�Request�Response)�BaseDistribution)�
_FileDownload)�InstallRequirement�s�str�return�boolc�0�tjd|��duS)Nz^[a-z]+(-[a-z]+)*$)�re�match)rs �:D:\Python311\Lib\site-packages\pip/_internal/exceptions.py�_is_kebab_caser*s��
�8�)�1�-�-�T�9�9��
Text | str�consoler�prefix�indentrc��t|t��r|}n|�|��}|�|d���|�d|��d����|�d�����zS)N�ignore)�overflow�
T)�allow_blank)�
isinstancer�
render_str�join�split)rr"r#r$�texts     r�_prefix_with_indentr/.s����!�T���%�����!�!�!�$�$�����f�x��8�8�7�;M�;M��V�
�
��<N�<�<�
�d�4�:�:�$�:�'�'�(�(�)�)r c��eZdZdZdS)�PipErrorzThe base pip error.N��__name__�
__module__�__qualname__�__doc__�r rr1r1?s���������r r1c�L��eZdZUdZded<ddddd�d�fd�Zdd�Zdd�Z�xZS)�DiagnosticPipErrora�An error, that presents diagnostic information to the user.

    This contains a bunch of logic, to enable pretty presentation of our error
    messages. Each error gets a unique reference. Each error can also include
    additional context, a hint and/or a note -- which are presented with the
    main error message in a consistent style.

    This is adapted from the error output styling in `sphinx-theme-builder`.
    r�	reference�errorN)�kindr:�	note_stmt�linkr<�Literal['error', 'warning']�
str | None�message�
str | Text�context�str | Text | None�	hint_stmtr=r>r�Nonec�P��|�!t|d��s
Jd���|j}t|��s
Jd���||_||_||_||_||_||_||_t���
d|jj�d|j�d���dS)Nr:zerror reference not provided!z#error reference must be kebab-case!�<z: �>)
�hasattrr:rr<rArCr=rEr>�super�__init__�	__class__r3)	�selfr<r:rArCrEr=r>rMs	        �rrLzDiagnosticPipError.__init__Ps�����	'��4��-�-�N�N�/N�N�N�N���I��i�(�(�O�O�*O�O�O�O���	�"���������"���"�����	�
�����I�T�^�4�I�I���I�I�I�J�J�J�J�Jr c
�r�d|jj�d|j�d|j�d|j�d|j�d|j�d�
S)NrHz(reference=z
, message=z
, context=z, note_stmt=z, hint_stmt=z)>)rMr3r:rArCr=rE�rNs r�__repr__zDiagnosticPipError.__repr__nss��
���'�
�
���
�
��|�
�
��|�
�
���	
�
�
��
�
�
�	
r r"r�optionsr
rc#�PK�|jdkrdnd}d|�d|j�d|j�d�V�dV�|jsg|j�Et	|j|d|�d	�d|�d
����V�t	|j|d|�d�d|�d
����V�n8t	|j|dd���V�n|jV�|j�
dV�|jV�|j�|j�dV�|j�t	|j|dd���V�|j�t	|j|dd���V�|j�dV�d|j��V�dSdS)Nr;�red�yellow�[z bold]z[/]: [bold]z[/]�u]×[/] u]│[/] )r#r$u]╰─>[/] z]   [/] u[red]×[/] z  z[magenta bold]note[/]: z      z[cyan bold]hint[/]: zLink: )	r<r:�
ascii_onlyrCr/rAr=rEr>)rNr"rR�colours    r�__rich_console__z#DiagnosticPipError.__rich_console__ys)����
�)�w�.�<���H��I�&�I�I��	�I�I�d�n�I�I�I�I�I�I������!�	#��|�
�)��L��.�v�.�.�.�/�v�/�/�/�	������*��L��3�v�3�3�3�/�v�/�/�/�	�������*��L��(��	��������,�����|�
#������l�"�"�"��>�	���	��H�H�H��>�	�%����0��	���
�
�
��>�	�%����-��	���
�
�
��9�	'��H�H�H�&�4�9�&�&�&�&�&�&�&�	'�	'r )r<r?r:r@rArBrCrDrErDr=rDr>r@rrF�rr)r"rrRr
rr)	r3r4r5r6�__annotations__rLrQrZ�
__classcell__�rMs@rr9r9Cs������������N�N�N�
-4� $�(,��K�K�K�K�K�K�K�K�<	
�	
�	
�	
�:'�:'�:'�:'�:'�:'�:'�:'r r9c��eZdZdZdS)�ConfigurationErrorz"General exception in configurationNr2r7r rr`r`�s������,�,�,�,r r`c��eZdZdZdS)�InstallationErrorz%General exception during installationNr2r7r rrbrb�s������/�/�/�/r rbc�$��eZdZdZd	�fd�Z�xZS)
�FailedToPrepareCandidatea
Raised when we fail to prepare a candidate (i.e. fetch and generate metadata).

    This is intentionally not a diagnostic error, since the output will be presented
    above this error, when this occurs. This should instead present information to the
    user.
    �package_namer�requirement_chain�failed_steprrFc���t���d|�d|�������||_||_||_dS)NzFailed to build 'z' when )rKrL�lowerrerfrg)rNrerfrgrMs    �rrLz!FailedToPrepareCandidate.__init__�sX���	�����W�\�W�W�+�BS�BS�BU�BU�W�W�X�X�X�(���!2���&����r )rerrfrrgrrrF)r3r4r5r6rLr]r^s@rrdrd�sG���������'�'�'�'�'�'�'�'�'�'r rdc�(��eZdZdZdZd�fd�Z�xZS)	�MissingPyProjectBuildRequireszNRaised when pyproject.toml has `build-system`, but no `build-system.requires`.z'missing-pyproject-build-system-requires�packagerrrFc���t���dt|����td��dtd�����dS)N�Can not process zrThis package has an invalid pyproject.toml file.
The [build-system] table is missing the mandatory `requires` key.�;This is an issue with the package mentioned above, not pip.�+See PEP 518 for the detailed specification.�rArCr=rE�rKrLrr)rNrlrMs  �rrLz&MissingPyProjectBuildRequires.__init__�sd���
�����8�v�g���8�8��T���T��H�I�I�	�	
�	
�	
�	
�	
r )rlrrrF�r3r4r5r6r:rLr]r^s@rrkrk�sH�������X�X�9�I�	
�	
�	
�	
�	
�	
�	
�	
�	
�	
r rkc�(��eZdZdZdZd	�fd�Z�xZS)
�InvalidPyProjectBuildRequiresz>Raised when pyproject.toml an invalid `build-system.requires`.z'invalid-pyproject-build-system-requiresrlr�reasonrrFc���t���dt|����td|����dtd�����dS)NrnzKThis package has an invalid `build-system.requires` key in pyproject.toml.
rorprqrr)rNrlrvrMs   �rrLz&InvalidPyProjectBuildRequires.__init__�sp���
�����8�v�g���8�8��-�$*�-�-���T��H�I�I�	�	
�	
�	
�	
�	
r )rlrrvrrrFrsr^s@rruru�sH�������H�H�9�I�	
�	
�	
�	
�	
�	
�	
�	
�	
�	
r ruc�"�eZdZdZdd�Zdd	�Zd
S)
�NoneMetadataErrora4Raised when accessing a Distribution's "METADATA" or "PKG-INFO".

    This signifies an inconsistency, when the Distribution claims to have
    the metadata file (if not, raise ``FileNotFoundError`` instead), but is
    not actually able to produce its content. This may be due to permission
    errors.
    �distr�
metadata_namerrrFc�"�||_||_dS)z�
        :param dist: A Distribution object.
        :param metadata_name: The name of the metadata being accessed
            (can be "METADATA" or "PKG-INFO").
        N)rzr{)rNrzr{s   rrLzNoneMetadataError.__init__�s����	�*����r c�&�d|j�d|j��S)NzNone z" metadata found for distribution: )r{rzrPs r�__str__zNoneMetadataError.__str__
s ��Y�t�)�X�X�T�Y�X�X�Xr N)rzrr{rrrFr[�r3r4r5r6rLr~r7r rryry�sL��������+�+�+�+�Y�Y�Y�Y�Y�Yr ryc��eZdZdZdd�ZdS)�UserInstallationInvalidzBA --user install is requested on an environment without user site.rrc��dS)Nz$User base directory is not specifiedr7rPs rr~zUserInstallationInvalid.__str__s��5�5r Nr[)r3r4r5r6r~r7r rr�r�s.������L�L�6�6�6�6�6�6r r�c��eZdZdd�ZdS)�InvalidSchemeCombinationrrc��d�d�|jdd�D����}d|�d|jd�d�S)N�, c3�4K�|]}t|��V��dS�N)r)�.0�as  r�	<genexpr>z3InvalidSchemeCombination.__str__.<locals>.<genexpr>s(����:�:�a�3�q�6�6�:�:�:�:�:�:r ���zCannot set z and z	 together)r,�args)rN�befores  rr~z InvalidSchemeCombination.__str__sK�����:�:�4�9�S�b�S�>�:�:�:�:�:��B�V�B�B�$�)�B�-�B�B�B�Br Nr[)r3r4r5r~r7r rr�r�s.������C�C�C�C�C�Cr r�c��eZdZdZdS)�DistributionNotFoundzCRaised when a distribution cannot be found to satisfy a requirementNr2r7r rr�r�s������M�M�M�Mr r�c��eZdZdZdS)�RequirementsFileParseErrorzDRaised when a general error occurs parsing a requirements file line.Nr2r7r rr�r�!s������N�N�N�Nr r�c��eZdZdZdS)�BestVersionAlreadyInstalledzNRaised when the most up-to-date version of a package is already
    installed.Nr2r7r rr�r�%s���������r r�c��eZdZdZdS)�
BadCommandz0Raised when virtualenv or a command is not foundNr2r7r rr�r�*s������:�:�:�:r r�c��eZdZdZdS)�CommandErrorz7Raised when there is an error in command-line argumentsNr2r7r rr�r�.s������A�A�A�Ar r�c��eZdZdZdS)�PreviousBuildDirErrorz:Raised when there's a previous conflicting build directoryNr2r7r rr�r�2s������D�D�D�Dr r�c�2��eZdZdZ		d
d�fd�
Zdd�Z�xZS)�NetworkConnectionErrorzHTTP connection errorN�	error_msgr�response�Response | None�request�Request | NonerrFc����||_||_||_|j�(|js!t|d��r|jj|_t	���|||��dS)zc
        Initialize NetworkConnectionError with  `request` and `response`
        objects.
        Nr�)r�r�r�rJrKrL)rNr�r�r�rMs    �rrLzNetworkConnectionError.__init__9sr���!��
����"����M�	1��L�	1���)�,�,�	1�
 �=�0�D�L�
������H�g�6�6�6�6�6r c�*�t|j��Sr�)rr�rPs rr~zNetworkConnectionError.__str__Ns���4�>�"�"�"r )NN)r�rr�r�r�r�rrFr[�r3r4r5r6rLr~r]r^s@rr�r�6sd���������
%)�"&�	7�7�7�7�7�7�7�*#�#�#�#�#�#�#�#r r�c��eZdZdZdS)�InvalidWheelFilenamezInvalid wheel filename.Nr2r7r rr�r�Rs������!�!�!�!r r�c��eZdZdZdS)�UnsupportedWheelzUnsupported wheel.Nr2r7r rr�r�Vs���������r r�c�"�eZdZdZd	d�Zd
d�ZdS)�InvalidWheelzInvalid (e.g. corrupt) wheel.�locationr�namec�"�||_||_dSr�)r�r�)rNr�r�s   rrLzInvalidWheel.__init__]s�� ��
���	�	�	r rc�(�d|j�d|j�d�S)NzWheel 'z
' located at z is invalid.)r�r�rPs rr~zInvalidWheel.__str__as��L���L�L���L�L�L�Lr N)r�rr�rr[rr7r rr�r�ZsH������'�'�����M�M�M�M�M�Mr r�c�"�eZdZdZd
d
�Zdd�ZdS)�MetadataInconsistentaBuilt metadata contains inconsistent information.

    This is raised when the metadata contains values (e.g. name and version)
    that do not match the information previously obtained from sdist filename,
    user-supplied ``#egg=`` value, or an install requirement name.
    �ireqr�fieldr�f_val�m_valrrFc�>�||_||_||_||_dSr��r�r�r�r�)rNr�r�r�r�s     rrLzMetadataInconsistent.__init__ms$����	���
���
���
�
�
r c�F�d|j�d|j�d|j�d|j��S)N�
Requested z has inconsistent z: expected z, but metadata has r�rPs rr~zMetadataInconsistent.__str__usO��
H���
H�
H�d�j�
H�
H��
�
H�
H�9=��
H�
H�	
r N)
r�rr�rr�rr�rrrFr[rr7r rr�r�esF������������
�
�
�
�
�
r r�c�"�eZdZdZdd�Zdd	�Zd
S)
�MetadataInvalidzMetadata is invalid.r�rr;rrrFc�"�||_||_dSr��r�r;)rNr�r;s   rrLzMetadataInvalid.__init__s����	���
�
�
r c�&�d|j�d|j��S)Nr�z has invalid metadata: r�rPs rr~zMetadataInvalid.__str__�s��J�D�I�J�J�d�j�J�J�Jr N)r�rr;rrrFr[rr7r rr�r�|sH������������K�K�K�K�K�Kr r�c�0��eZdZdZdZd
�fd�Zdd�Z�xZS)�InstallationSubprocessErrorzA subprocess call failed.zsubprocess-exited-with-error�command_descriptionr�	exit_code�int�output_lines�list[str] | NonerrFc�r��|�td��}n]tjdt|���d���td�|����ztjd��z}t	���dt
|���d|��|dd�	��||_||_dS)
NzNo available output.z[red][z lines of output][/]
rWz[red]\[end of output][/]z[green]z)[/] did not run successfully.
exit code: zNThis error originates from a subprocess, and is likely not a problem with pip.�rArCrEr=)	r�from_markup�lenr,rKrLrr�r�)rNr�r�r��
output_promptrMs     �rrLz$InstallationSubprocessError.__init__�s�����	� �!7�8�8�M�M�� �!S�#�l�*;�*;�!S�!S�!S�T�T��r�w�w�|�,�,�-�-�.��"�#>�?�?�@�
�	�����*�&�!4�5�5�*�*�'�*�*�"��$�	�	
�	
�	
�$7�� �"����r c�$�|j�d|j��S)Nz
 exited with )r�r�rPs rr~z#InstallationSubprocessError.__str__�s���*�I�I���I�I�Ir )r�rr�r�r�r�rrFr[)r3r4r5r6r:rLr~r]r^s@rr�r��se�������#�#�.�I�#�#�#�#�#�#�@J�J�J�J�J�J�J�Jr r�c�,��eZdZdZd�fd�Zd	d�Z�xZS)
�MetadataGenerationFailedzmetadata-generation-failed�package_detailsrrrFc�l��t���dt|��dd���dS)Nz4Encountered error while generating package metadata.zSee above for details.ror�)rKrLr)rNr�rMs  �rrLz!MetadataGenerationFailed.__init__�sD���
	�����J��?�+�+�.�S�		�	
�	
�	
�	
�	
r c��dS)Nzmetadata generation failedr7rPs rr~z MetadataGenerationFailed.__str__�s��+�+r )r�rrrFr[)r3r4r5r:rLr~r]r^s@rr�r��sV�������,�I�

�

�

�

�

�

�,�,�,�,�,�,�,�,r r�c�2�eZdZdZd
d�Zdd�Zdd	�Zdd�ZdS)�
HashErrorsz:Multiple HashError instances rolled into one for reportingrrFc��g|_dSr�)�errorsrPs rrLzHashErrors.__init__�s
��')����r r;�	HashErrorc�:�|j�|��dSr�)r��append)rNr;s  rr�zHashErrors.append�s������5�!�!�!�!�!r rc��g}|j�d����t|jd���D]>\}}|�|j��|�d�|D�����?|rd�|��SdS)Nc��|jSr�)�order��es r�<lambda>z$HashErrors.__str__.<locals>.<lambda>�s��q�w�r )�keyc��|jSr�r^r�s rr�z$HashErrors.__str__.<locals>.<lambda>�s����r c3�>K�|]}|���V��dSr�)�body)r�r�s  rr�z%HashErrors.__str__.<locals>.<genexpr>�s*����9�9�a������9�9�9�9�9�9r r(rW)r��sortrr��head�extendr,)rN�lines�cls�
errors_of_clss    rr~zHashErrors.__str__�s���������.�.��/�/�/�")�$�+�7L�7L�"M�"M�	:�	:��C���L�L���"�"�"��L�L�9�9�=�9�9�9�9�9�9�9��	$��9�9�U�#�#�#��rr rc�*�t|j��Sr�)rr�rPs r�__bool__zHashErrors.__bool__�s���D�K� � � r N�rrF)r;r�rrFr[)rr)r3r4r5r6rLr�r~r�r7r rr�r��sj������D�D�*�*�*�*�"�"�"�"�����!�!�!�!�!�!r r�c�L�eZdZUdZdZded<dZdZded<dd�Zdd�Z	dd
�Z
dS)r�a�
    A failure to verify a package against known-good hashes

    :cvar order: An int sorting hash exception classes by difficulty of
        recovery (lower being harder), so the user doesn't bother fretting
        about unpinned packages when he has deeper issues, like VCS
        dependencies, to deal with. Also keeps error reports in a
        deterministic order.
    :cvar head: A section heading for display above potentially many
        exceptions of this kind
    :ivar req: The InstallRequirement that triggered this error. This is
        pasted on after the exception is instantiated, because it's not
        typically available earlier.

    NzInstallRequirement | None�reqrWr�r�r�rrc�0�d|�����S)a=Return a summary of me for display under the heading.

        This default implementation simply prints a description of the
        triggering requirement.

        :param req: The InstallRequirement that provoked this error, with
            its link already populated by the resolver's _populate_link().

        �    )�_requirement_namerPs rr�zHashError.body�s��1�d�,�,�.�.�0�0�0r c�>�|j�d|�����S)Nr()r�r�rPs rr~zHashError.__str__�s ���)�,�,�t�y�y�{�{�,�,�,r c�<�|jrt|j��ndS)z�Return a description of the requirement that triggered me.

        This default implementation returns long description of the req, with
        line numbers

        �unknown package)r�rrPs rr�zHashError._requirement_name�s��!%��?�s�4�8�}�}�}�.?�?r r[)r3r4r5r6r�r\r�r�r�r~r�r7r rr�r��s���������� &*�C�)�)�)�)�
�D��E�O�O�O�O�
1�
1�
1�
1�-�-�-�-�@�@�@�@�@�@r r�c��eZdZdZdZdZdS)�VcsHashUnsupported�uA hash was provided for a version-control-system-based requirement, but
    we don't have a method for hashing those.rzlCan't verify hashes for these requirements because we don't have a way to hash version control repositories:N�r3r4r5r6r�r�r7r rr�r�s)������1�1�
�E�	;�	�D�Dr r�c��eZdZdZdZdZdS)�DirectoryUrlHashUnsupportedr��zUCan't verify hashes for these file:// requirements because they point to directories:Nr�r7r rr�r�s)������1�1�
�E�	 �	�D�Dr r�c�*�eZdZdZdZdZdd�Zdd	�Zd
S)
�HashMissingz2A hash was needed for a requirement but is absent.�awHashes are required in --require-hashes mode, but they are missing from some requirements. Here is a list of those requirements along with the hashes their downloaded archives actually had. Add lines like these to your requirements files to prevent tampering. (If you did not enable --require-hashes manually, note that it turns on automatically when any package has a hash.)�gotten_hashrrrFc��||_dS)zq
        :param gotten_hash: The hash of the (possibly malicious) archive we
            just downloaded
        N)r�)rNr�s  rrLzHashMissing.__init__,s��
'����r c��ddlm}d}|jr.|jjr|jjnt|jdd��}d�|pd||j��S)Nr)�
FAVORITE_HASHr�z    {} --hash={}:{}r�)�pip._internal.utils.hashesr�r��	is_direct�
original_link�getattr�formatr�)rNr�rls   rr�zHashMissing.body3s~��<�<�<�<�<�<����8�
	��8�%�4���&�&��T�X�u�d�3�3�
�%�+�+��(�(�-��9I�
�
�	
r N)r�rrrFr[)r3r4r5r6r�r�rLr�r7r rr�r�sQ������<�<�
�E�	�	�'�'�'�'�
�
�
�
�
�
r r�c��eZdZdZdZdZdS)�HashUnpinnedzPA requirement had a hash specified but was not pinned to a specific
    version.�zaIn --require-hashes mode, all requirements must have their versions pinned with ==. These do not:Nr�r7r rrrHs)��������
�E�	1�	�D�Dr rc�2�eZdZdZdZdZdd
�Zdd�Zdd
�ZdS)�HashMismatchz�
    Distribution file hash values don't match.

    :ivar package_name: The name of the package that triggered the hash
        mismatch. Feel free to write to this after the exception is raise to
        improve its error message.

    �z�THESE PACKAGES DO NOT MATCH THE HASHES FROM THE REQUIREMENTS FILE. If you have updated the package versions, please update the hashes. Otherwise, examine the package contents carefully; someone may have tampered with them.�allowed�dict[str, list[str]]�gots�dict[str, _Hash]rrFc�"�||_||_dS)z�
        :param allowed: A dict of algorithm names pointing to lists of allowed
            hex digests
        :param gots: A dict of algorithm names pointing to hashes we
            actually got from the files under suspicion
        N)rr
)rNrr
s   rrLzHashMismatch.__init__es�������	�	�	r rc�Z�d|����d|�����S)Nr��:
)r��_hash_comparisonrPs rr�zHashMismatch.bodyos0��L�d�,�,�.�.�L�L�4�3H�3H�3J�3J�L�L�Lr c�<��d	d�}g}|j���D]g\}}||���|��fd�|D����|�d|j|����d����hd�|��S)
aE
        Return a comparison of actual and expected hash values.

        Example::

               Expected sha256 abcdeabcdeabcdeabcdeabcdeabcdeabcdeabcdeabcde
                            or 123451234512345123451234512345123451234512345
                    Got        bcdefbcdefbcdefbcdefbcdefbcdefbcdefbcdefbcdef

        �	hash_namerr�
chain[str]c�>�t|gtd����S)Nz    or)rr)rs r�hash_then_orz3HashMismatch._hash_comparison.<locals>.hash_then_or~s���)��f�X�&6�&6�7�7�7r c3�B�K�|]}dt����d|��V��dS)z        Expected � N)�next)r�r�r#s  �rr�z0HashMismatch._hash_comparison.<locals>.<genexpr>�s:�����U�U�a�@�d�6�l�l�@�@�Q�@�@�U�U�U�U�U�Ur z             Got        r()rrrr)r�itemsr�r�r
�	hexdigestr,)rNrr�r�	expectedsr#s     @rrzHashMismatch._hash_comparisonrs����	8�	8�	8�	8�
��$(�L�$6�$6�$8�$8�	�	� �I�y�!�\�)�,�,�F��L�L�U�U�U�U�9�U�U�U�U�U�U��L�L�O�4�9�Y�+?�+I�+I�+K�+K�O�O�O�
�
�
�
��y�y����r N)rrr
rrrFr[)	r3r4r5r6r�r�rLr�rr7r rr	r	Sso��������
�E�	/�	�����M�M�M�M� � � � � � r r	c��eZdZdZdS)�UnsupportedPythonVersionzMUnsupported python version according to Requires-Python package
    metadata.Nr2r7r rrr�s���������r rc�4��eZdZdZ			dd�fd�
Zdd
�Z�xZS)�!ConfigurationFileCouldNotBeLoadedz8When there are errors while loading a configuration file�could not be loadedNrvr�fnamer@r;�configparser.Error | NonerrFc�t��t���|��||_||_||_dSr�)rKrLrvr#r;)rNrvr#r;rMs    �rrLz*ConfigurationFileCouldNotBeLoaded.__init__�s6���	��������������
���
�
�
r c�h�|j�d|j�d�}n|j�J�d|j�d�}d|j�|��S)Nz in �.z.
r(zConfiguration file )r#r;rv)rN�message_parts  rr~z)ConfigurationFileCouldNotBeLoaded.__str__�sU���:�	0�/�$�*�/�/�/�L�L��:�)�)�)�/���/�/�/�L�@�T�[�@�,�@�@�@r )r"NN)rvrr#r@r;r$rrFr[r�r^s@rr!r!�so�������B�B�,� �+/�		�	�	�	�	�	�	�A�A�A�A�A�A�A�Ar r!zThe Python environment under z� is managed externally, and may not be
manipulated by the user. Please use specific tooling from the distributor of
the Python installation to interact with this environment instead.
c�X��eZdZdZdZd
�fd�Zedd	���Zedd���Z	�xZ
S)�ExternallyManagedEnvironmentaPThe current environment is externally managed.

    This is raised when the current environment is externally managed, as
    defined by `PEP 668`_. The ``EXTERNALLY-MANAGED`` configuration is checked
    and displayed when the error is bubbled up to the user.

    :param error: The error message read from ``EXTERNALLY-MANAGED``.
    zexternally-managed-environmentr;r@rrFc���|�tt��}nt|��}t���d|dtd�����dS)Nz&This environment is externally managedz�If you believe this is a mistake, please contact your Python installation or OS distribution provider. You can override this, at the risk of breaking your Python installation or OS, by passing --break-system-packages.z+See PEP 668 for the detailed specification.rq)r�!_DEFAULT_EXTERNALLY_MANAGED_ERRORrKrL)rNr;rCrMs   �rrLz%ExternallyManagedEnvironment.__init__�sk����	"��<�=�=�G�G��5�k�k�G�
�����<��J�
�H�I�I�	�
	
�
	
�
	
�
	
�
	
r �
Iterator[str]c#��K�	tj}tj|��\}}n#t$rd}YnwxYw|�/d|��V�dD]%}|�|��\}}}|s�d|��V��&dV�dS)NzError-)�-�_�Error)�locale�LC_MESSAGES�	getlocale�AttributeError�	partition)�category�langr0�sepr��founds      r�#_iter_externally_managed_error_keysz@ExternallyManagedEnvironment._iter_externally_managed_error_keys�s�����	1��)�H��&�x�0�0�G�D�!�!���	$�	$�	$�#�D�D�D�	$�����	(�!�4�/�/�!�!�!�!�
(�
(��#'�>�>�#�#6�#6� ���q����'�v�'�'�'�'�'�'��
�
�
�
�
s�(�7�7�config�pathlib.Path | strc��tjd���}	|�|d���|d}|���D]F}t	jt��5|||��cddd��cS#1swxYwY�Gnj#t$rYn^tttj	f$r@ddl
m}t�
|��}t�d||���YnwxYw|d��S)	N)�
interpolationzutf-8)�encodingzexternally-managedr)�VERBOSEzFailed to read %s)�exc_info)�configparser�ConfigParser�readr;�
contextlib�suppress�KeyError�OSError�UnicodeDecodeError�ParsingError�pip._internal.utils._logrA�logger�isEnabledFor�warning)r�r<�parser�sectionr�rArBs       r�from_configz(ExternallyManagedEnvironment.from_config�s���
�*��>�>�>��	K��K�K���K�1�1�1��1�2�G��>�>�@�@�
-�
-���(��2�2�-�-��3�w�s�|�,�,�-�-�-�-�-�-�-�-�-�-�-�-�-�-����-�-�-�-�-�
-���	�	�	��D��+�\�-F�G�	K�	K�	K�8�8�8�8�8�8��*�*�7�3�3�H��N�N�.���N�J�J�J�J�J�		K����
�s�4�y�y�s=�AB�%B�6B�B		�	B�B		�
B�
C9�AC9�8C9)r;r@rrF)rr-)r<r=rr*)r3r4r5r6r:rL�staticmethodr;�classmethodrRr]r^s@rr*r*�s����������1�I�
�
�
�
�
�
�"�����\��*�����[�����r r*c�$��eZdZdZd�fd�Z�xZS)�UninstallMissingRecordzuninstall-no-record-file�distributionrrrFc���|j}|r|dkr,|j�d|j��}tjdd|��df��}ntd|�d���}t���td|����d	|j�d
�|���dS)N�pipz==z,You might be able to recover from this via: z(pip install --force-reinstall --no-deps �greenzThe package was installed by z3. You should check if it can uninstall the package.�Cannot uninstall zAThe package's contents are unknown: no RECORD file was found for r'�rArCrE)�	installer�raw_name�versionr�assemblerKrL)rNrWr]�dep�hintrMs     �rrLzUninstallMissingRecord.__init__�s���� �*�	��
	�I��.�
	�!�*�D�D�l�.B�D�D�C��=�>�A�C�A�A�7�K���D�D�
�D�	�D�D�D���D�
	������;�\�;�;�<�<�I�0<�0E�I�I�I��
	�	
�	
�	
�	
�	
r �rWrrrF�r3r4r5r:rLr]r^s@rrVrV�sB�������*�I�
�
�
�
�
�
�
�
�
�
r rVc�$��eZdZdZd�fd�Z�xZS)�LegacyDistutilsInstallz%uninstall-distutils-installed-packagerWrrrFc�p��t���td|����dd���dS)Nr[z�It is a distutils installed project and thus we cannot accurately determine which files belong to it which would lead to only a partial uninstall.r\)rKrLr)rNrWrMs  �rrLzLegacyDistutilsInstall.__init__sL���
������;�\�;�;�<�<���	�	
�	
�	
�	
�	
r rcrdr^s@rrfrfsB�������7�I�	
�	
�	
�	
�	
�	
�	
�	
�	
�	
r rfc�$��eZdZdZd	�fd�Z�xZS)
�InvalidInstalledPackagezinvalid-installed-packagerzr�invalid_exc�#InvalidRequirement | InvalidVersionrrFc
���|j}t|t��rd}nd}t���td|�d�|rd|�d�ndzd|�d|jd	��z��d
|�d�d�
��dS)N�requirementr_z!Cannot process installed package rzin rWzbecause it has an invalid rrz.Starting with pip 24.1, packages with invalid zs can not be processed.z,To proceed this package must be uninstalled.r\)�installed_locationr*r
rKrLrr�)rNrzrjrn�invalid_typerMs     �rrLz InvalidInstalledPackage.__init__&s����"�4���k�#5�6�6�	%�(�L�L�$�L�
������;�D�;�;�;�4F�N�0�+�0�0�0�0�B�P�U�|�U�U��@P�QR�@S�U�U�V���9��9�9�9�E�	�	
�	
�	
�	
�	
r )rzrrjrkrrFrdr^s@rriri#sB�������+�I�
�
�
�
�
�
�
�
�
�
r ric�(��eZdZdZdZd�fd�Z�xZS)	�IncompleteDownloadErrorzaRaised when the downloader receives fewer bytes than advertised
    in the Content-Length header.zincomplete-download�downloadrrrFc�4��ddlm}|j�J�||j���d||j����}|jrd|jdz�d�}d}nd}d	}td
|�d|�d���}t
���|d
|jj	��|d���dS)Nr)�format_size�/zafter r�z
 attempts z7Use --resume-retries to configure resume attempt limit.rWz>Consider using --resume-retries to enable download resumption.zDownload failed z(because not enough bytes were received (�)zURL: z4This is an issue with network connectivity, not pip.r�)
�pip._internal.utils.miscrt�size�bytes_received�
reattemptsrrKrLr>�redacted_url)rNrrrt�download_status�retry_statusrbrArMs       �rrLz IncompleteDownloadError.__init__Gs���8�8�8�8�8�8��}�(�(�(��{�8�2�3�3�R�R�k�k�(�-�6P�6P�R�R�	���	T�G�H�$7�!�$;�G�G�G�L�L�D�D��L�S�D��
1�|�
1�
1�-�
1�
1�
1�
�
��
	������8�H�M�6�8�8��L�		�	
�	
�	
�	
�	
r )rrrrrFrsr^s@rrqrqAsN�������%�%�&�I�
�
�
�
�
�
�
�
�
�
r rqc�(��eZdZdZdZd�fd�Z�xZS)�ResolutionTooDeepErrorzHRaised when the dependency resolver exceeds the maximum recursion depth.zresolution-too-deeprrFc�R��t���dddd���dS)Nz,Dependency resolution exceeded maximum depthzpPip cannot resolve the current dependencies as the dependency graph is too complex for pip to solve efficiently.zqTry adding lower bounds to constrain your dependencies, for example: 'package>=2.0.0' instead of just 'package'. z_https://pip.pypa.io/en/stable/topics/dependency-resolution/#handling-resolution-too-deep-errors)rArCrEr>)rKrL)rNrMs �rrLzResolutionTooDeepError.__init__hsB���
�����B�?�L�s�	�	
�	
�	
�	
�	
r r�rsr^s@rrrcsH�������R�R�%�I�
�
�
�
�
�
�
�
�
�
r rc�$��eZdZdZd�fd�Z�xZS)�InstallWheelBuildErrorzfailed-wheel-build-for-install�failed�list[InstallRequirement]rrFc���t���dd�d�|D����d���dS)NzIFailed to build installable wheels for some pyproject.toml based projectsr�c3�$K�|]}|jV��dSr�)r�)r��rs  rr�z2InstallWheelBuildError.__init__.<locals>.<genexpr>�s$����5�5��a�f�5�5�5�5�5�5r r\)rKrLr,)rNr�rMs  �rrLzInstallWheelBuildError.__init__zsV���
�����0��I�I�5�5�f�5�5�5�5�5��
	�	
�	
�	
�	
�	
r )r�r�rrFrdr^s@rr�r�wsB�������0�I�
�
�
�
�
�
�
�
�
�
r r�)rrrr)
rr!r"rr#rr$rrr)Zr6�
__future__rrCrFr2�logging�pathlibr�sys�collections.abcr�	itertoolsrrr�typingrr	�"pip._vendor.packaging.requirementsr
�pip._vendor.packaging.versionr�pip._vendor.rich.consolerr
r�pip._vendor.rich.markupr�pip._vendor.rich.textr�hashlibr�pip._vendor.requests.modelsrr�pip._internal.metadatar�pip._internal.network.downloadr�pip._internal.req.req_installr�	getLoggerr3rMrr/�	Exceptionr1r9r`rbrdrkruryr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rr	rr!r#r,r*rVrfrirqrr�r7r r�<module>r�s�����#�"�"�"�"�"���������
�
�
�
���������	�	�	�	�
�
�
�
�$�$�$�$�$�$�,�,�,�,�,�,�,�,�,�,�)�)�)�)�)�)�)�)�A�A�A�A�A�A�8�8�8�8�8�8�J�J�J�J�J�J�J�J�J�J�*�*�*�*�*�*�&�&�&�&�&�&��A�������=�=�=�=�=�=�=�=�7�7�7�7�7�7�<�<�<�<�<�<�@�@�@�@�@�@�	��	�8�	$�	$��:�:�:�:�)�)�)�)�"�����y����p'�p'�p'�p'�p'��p'�p'�p'�l-�-�-�-�-��-�-�-�0�0�0�0�0��0�0�0�'�'�'�'�'�0�'�'�'�"
�
�
�
�
�$6�
�
�
�"
�
�
�
�
�$6�
�
�
�"Y�Y�Y�Y�Y��Y�Y�Y�86�6�6�6�6�/�6�6�6�C�C�C�C�C�0�C�C�C�N�N�N�N�N�,�N�N�N�O�O�O�O�O�!2�O�O�O������(����
;�;�;�;�;��;�;�;�B�B�B�B�B�8�B�B�B�E�E�E�E�E�H�E�E�E�#�#�#�#�#�X�#�#�#�8"�"�"�"�"�,�"�"�"������(����M�M�M�M�M�$�M�M�M�
�
�
�
�
�,�
�
�
�.K�K�K�K�K�'�K�K�K�&J�&J�&J�&J�&J�"4�6G�&J�&J�&J�R,�,�,�,�,�1�3D�,�,�,�&!�!�!�!�!�"�!�!�!�.+@�+@�+@�+@�+@�!�+@�+@�+@�\��������������)����'
�'
�'
�'
�'
�)�'
�'
�'
�T�����9����7 �7 �7 �7 �7 �9�7 �7 �7 �t�����0����
A�A�A�A�A�(:�A�A�A�.%�!�j�%�%�%�!�F�F�F�F�F�#5�F�F�F�R
�
�
�
�
�/�
�
�
�6
�
�
�
�
�/�
�
�
�
�
�
�
�
�0�
�
�
�<
�
�
�
�
�0�
�
�
�D
�
�
�
�
�/�
�
�
�(
�
�
�
�
�/�
�
�
�
�
r