PK APOCALYPSE V1

APOCALYPSE V1

Current Path : /opt/alt/python39/lib/python3.9/site-packages/pip/_internal/__pycache__/
Upload File :
Current File : //opt/alt/python39/lib/python3.9/site-packages/pip/_internal/__pycache__/exceptions.cpython-39.pyc

a

��Re�1�@s4dZddlZddlmZmZmZddlmZmZm	Z	m
Z
mZddlm
Z
ddlmZmZer�ddlmZddlmZdd	lmZGd
d�de�ZGdd
�d
e�ZGdd�de�ZGdd�de�ZGdd�de�ZGdd�de�ZGdd�de�ZGdd�de�ZGdd�de�Z Gdd�de�Z!Gdd�de�Z"Gd d!�d!e�Z#Gd"d#�d#e�Z$Gd$d%�d%e�Z%Gd&d'�d'e�Z&Gd(d)�d)e�Z'Gd*d+�d+e�Z(Gd,d-�d-e�Z)Gd.d/�d/e�Z*Gd0d1�d1e�Z+Gd2d3�d3e+�Z,Gd4d5�d5e+�Z-Gd6d7�d7e+�Z.Gd8d9�d9e+�Z/Gd:d;�d;e+�Z0Gd<d=�d=e�Z1Gd>d?�d?e�Z2dS)@z"Exceptions used throughout package�N)�chain�groupby�repeat)�
TYPE_CHECKING�Dict�List�Optional�Union)�Distribution)�Request�Response)�_Hash)�BaseDistribution)�InstallRequirementc@seZdZdZdS)�PipErrorzBase pip exceptionN��__name__�
__module__�__qualname__�__doc__�rr��/builddir/build/BUILDROOT/alt-python39-pip-21.3.1-2.el8.x86_64/opt/alt/python39/lib/python3.9/site-packages/pip/_internal/exceptions.pyrsrc@seZdZdZdS)�ConfigurationErrorz"General exception in configurationNrrrrrrsrc@seZdZdZdS)�InstallationErrorz%General exception during installationNrrrrrrsrc@seZdZdZdS)�UninstallationErrorz'General exception during uninstallationNrrrrrrsrc@s8eZdZdZeedfedd�dd�Zed�dd	�ZdS)
�NoneMetadataErrora
    Raised when accessing "METADATA" or "PKG-INFO" metadata for a
    pip._vendor.pkg_resources.Distribution object and
    `dist.has_metadata('METADATA')` returns True but
    `dist.get_metadata('METADATA')` returns None (and similarly for
    "PKG-INFO").
    rN)�dist�
metadata_name�returncCs||_||_dS)z�
        :param dist: A Distribution object.
        :param metadata_name: The name of the metadata being accessed
            (can be "METADATA" or "PKG-INFO").
        N)rr)�selfrrrrr�__init__*s
zNoneMetadataError.__init__�rcCsd�|j|j�S)Nz+None {} metadata found for distribution: {})�formatrr�rrrr�__str__7s�zNoneMetadataError.__str__)	rrrrr	r
�strr r$rrrrr!s

�
rc@seZdZdZed�dd�ZdS)�UserInstallationInvalidzBA --user install is requested on an environment without user site.r!cCsdS)Nz$User base directory is not specifiedrr#rrrr$CszUserInstallationInvalid.__str__N)rrrrr%r$rrrrr&@sr&c@seZdZed�dd�ZdS)�InvalidSchemeCombinationr!cCs6d�dd�|jdd�D��}d|�d|jd�d�S)Nz, css|]}t|�VqdS�N)r%)�.0�arrr�	<genexpr>I�z3InvalidSchemeCombination.__str__.<locals>.<genexpr>���zCannot set z and z	 together)�join�args)r�beforerrrr$Hsz InvalidSchemeCombination.__str__N)rrrr%r$rrrrr'Gsr'c@seZdZdZdS)�DistributionNotFoundzCRaised when a distribution cannot be found to satisfy a requirementNrrrrrr1Msr1c@seZdZdZdS)�RequirementsFileParseErrorzDRaised when a general error occurs parsing a requirements file line.Nrrrrrr2Qsr2c@seZdZdZdS)�BestVersionAlreadyInstalledzNRaised when the most up-to-date version of a package is already
    installed.Nrrrrrr3Usr3c@seZdZdZdS)�
BadCommandz0Raised when virtualenv or a command is not foundNrrrrrr4Zsr4c@seZdZdZdS)�CommandErrorz7Raised when there is an error in command-line argumentsNrrrrrr5^sr5c@seZdZdZdS)�PreviousBuildDirErrorz:Raised when there's a previous conflicting build directoryNrrrrrr6bsr6cs<eZdZdZd	eeedd��fdd�
Zed�dd�Z�Z	S)
�NetworkConnectionErrorzHTTP connection errorN)�	error_msg�response�requestrcsJ||_||_||_|jdur6|js6t|d�r6|jj|_t��|||�dS)zc
        Initialize NetworkConnectionError with  `request` and `response`
        objects.
        Nr:)r9r:r8�hasattr�superr )rr8r9r:��	__class__rrr is���
zNetworkConnectionError.__init__r!cCs
t|j�Sr()r%r8r#rrrr${szNetworkConnectionError.__str__)NN)
rrrrr%rrr r$�
__classcell__rrr=rr7fs��r7c@seZdZdZdS)�InvalidWheelFilenamezInvalid wheel filename.Nrrrrrr@sr@c@seZdZdZdS)�UnsupportedWheelzUnsupported wheel.NrrrrrrA�srAc@s4eZdZdZdeeedd�dd�Zed�dd	�ZdS)
�MetadataInconsistentz�Built 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
    or user-supplied ``#egg=`` value.
    rN)�ireq�field�f_val�m_valrcCs||_||_||_||_dSr()rCrDrErF)rrCrDrErFrrrr �szMetadataInconsistent.__init__r!cCsd}|�|j|j|j|j�S)NzJRequested {} has inconsistent {}: filename has {!r}, but metadata has {!r})r"rCrDrErF)r�templaterrrr$�s�zMetadataInconsistent.__str__)rrrrr%r r$rrrrrB�s
�rBc@s0eZdZdZeedd�dd�Zed�dd�ZdS)	�InstallationSubprocessErrorz-A subprocess call failed during installation.N)�
returncode�descriptionrcCs||_||_dSr()rIrJ)rrIrJrrrr �sz$InstallationSubprocessError.__init__r!cCsd�|j|j�S)NzSCommand errored out with exit status {}: {} Check the logs for full command output.)r"rIrJr#rrrr$�s��z#InstallationSubprocessError.__str__)rrrr�intr%r r$rrrrrH�srHc@sJeZdZdZdd�dd�Zddd�dd	�Zed�d
d�Zed�dd
�Z	dS)�
HashErrorsz:Multiple HashError instances rolled into one for reportingNr!cCs
g|_dSr()�errorsr#rrrr �szHashErrors.__init__�	HashError)�errorrcCs|j�|�dSr()rM�append)rrOrrrrP�szHashErrors.appendcCsbg}|jjdd�d�t|jdd��D](\}}|�|j�|�dd�|D��q&|r^d�|�SdS)	NcSs|jSr()�order��errr�<lambda>�r,z$HashErrors.__str__.<locals>.<lambda>)�keycSs|jSr(r=rRrrrrT�r,css|]}|��VqdSr()�body�r)rSrrrr+�r,z%HashErrors.__str__.<locals>.<genexpr>�
�)rM�sortrrP�head�extendr.)r�lines�cls�
errors_of_clsrrrr$�s
zHashErrors.__str__cCs
t|j�Sr()�boolrMr#rrr�__bool__�szHashErrors.__bool__)
rrrrr rPr%r$r`rarrrrrL�s

rLc@s\eZdZUdZdZeded<dZdZe	ed<e
d�d	d
�Ze
d�dd�Ze
d�d
d�Z
dS)rNa�
    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.

    Nr�reqrYr-rQr!cCsd|����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().

        z    )�_requirement_namer#rrrrV�s
zHashError.bodycCs|j�d|����S)NrX)r[rVr#rrrr$�szHashError.__str__cCs|jrt|j�SdS)z�Return a description of the requirement that triggered me.

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

        �unknown package)rbr%r#rrrrc�szHashError._requirement_name)rrrrrbr�__annotations__r[rQrKr%rVr$rcrrrrrN�s
rNc@seZdZdZdZdZdS)�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�rrrrrQr[rrrrrf�s�rfc@seZdZdZdZdZdS)�DirectoryUrlHashUnsupportedrg�zUCan't verify hashes for these file:// requirements because they point to directories:Nrhrrrrri�s�ric@s6eZdZdZdZdZedd�dd�Zed�d	d
�ZdS)�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.)N)�gotten_hashrcCs
||_dS)zq
        :param gotten_hash: The hash of the (possibly malicious) archive we
            just downloaded
        N)rm)rrmrrrr szHashMissing.__init__r!cCsHddlm}d}|jr4|jjr&|jjnt|jdd�}d�|p>d||j�S)Nr)�
FAVORITE_HASHrbz    {} --hash={}:{}rd)�pip._internal.utils.hashesrnrb�
original_link�getattrr"rm)rrn�packagerrrrVs�
��zHashMissing.body)	rrrrrQr[r%r rVrrrrrks�
rkc@seZdZdZdZdZdS)�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:Nrhrrrrrs2s�rsc@sZeZdZdZdZdZeeeefeedfdd�dd�Z	ed	�d
d�Z
ed	�dd
�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.r
N)�allowed�gotsrcCs||_||_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)rwrx)rrwrxrrrr OszHashMismatch.__init__r!cCsd�|��|���S)Nz
    {}:
{})r"rc�_hash_comparisonr#rrrrVYszHashMismatch.bodycsltdd�dd�}g}|j��D]B\}}||��|��fdd�|D��|�d�|j|����qd�|�S)	aE
        Return a comparison of actual and expected hash values.

        Example::

               Expected sha256 abcdeabcdeabcdeabcdeabcdeabcdeabcdeabcdeabcde
                            or 123451234512345123451234512345123451234512345
                    Got        bcdefbcdefbcdefbcdefbcdefbcdefbcdefbcdefbcdef

        z
chain[str])�	hash_namercSst|gtd��S)Nz    or)rr)rzrrr�hash_then_orhsz3HashMismatch._hash_comparison.<locals>.hash_then_orc3s|]}d�t��|�VqdS)z        Expected {} {}N)r"�nextrW��prefixrrr+psz0HashMismatch._hash_comparison.<locals>.<genexpr>z             Got        {}
rX)	r%rw�itemsr\rPr"rx�	hexdigestr.)rr{r]rz�	expectedsrr}rry\s��zHashMismatch._hash_comparison)rrrrrQr[rr%rr rVryrrrrru=s	�&
ruc@seZdZdZdS)�UnsupportedPythonVersionzMUnsupported python version according to Requires-Python package
    metadata.Nrrrrrr�ysr�csFeZdZdZd
eeeeejdd��fdd�
Zed�dd	�Z	�Z
S)�!ConfigurationFileCouldNotBeLoadedz8When there are errors while loading a configuration file�could not be loadedN)�reason�fnamerOrcs"t��|�||_||_||_dSr()r<r r�r�rO)rr�r�rOr=rrr �sz*ConfigurationFileCouldNotBeLoaded.__init__r!cCsF|jdurd|j�d�}n|jdus(J�d|j�d�}d|j�|��S)Nz in �.z.
rXzConfiguration file )r�rOr�)r�message_partrrrr$�s

z)ConfigurationFileCouldNotBeLoaded.__str__)r�NN)rrrrr%r�configparser�Errorr r$r?rrr=rr�~s��r�)3rr��	itertoolsrrr�typingrrrrr	�pip._vendor.pkg_resourcesr
Zpip._vendor.requests.modelsrr�hashlibr
�pip._internal.metadatarZpip._internal.req.req_installr�	Exceptionrrrrrr&r'r1r2r3r4r5r6r7r@rArBrHrLrNrfrirkrsrur�r�rrrr�<module>sH.*<

if you don't want to be vaporized in a nuclear explosion, i simply have to become nuclear myself… i am atomic