File: //lib/python3.9/site-packages/pip/_internal/__pycache__/exceptions.cpython-39.pyc
a
g��er3 � @ s$ d Z ddlZddlmZmZmZ ddlmZmZm Z m
Z
ddlmZ ddl
mZmZ erpddlmZ ddlmZ G d d
� d
e�ZG dd� de�ZG d
d� de�ZG dd� de�ZG dd� de�ZG dd� de�ZG dd� de�ZG dd� de�ZG dd� de�ZG dd� de�ZG dd� de�ZG dd � d e�Z G d!d"� d"e�Z!G d#d$� d$e�Z"G d%d&� d&e�Z#G d'd(� d(e�Z$G d)d*� d*e�Z%G d+d,� d,e�Z&G d-d.� d.e�Z'G d/d0� d0e�Z(G d1d2� d2e(�Z)G d3d4� d4e(�Z*G d5d6� d6e(�Z+G d7d8� d8e(�Z,G d9d:� d:e(�Z-G d;d<� d<e�Z.G d=d>� d>e�Z/dS )?z"Exceptions used throughout package� N)�chain�groupby�repeat)�
TYPE_CHECKING�Dict�List�Optional)�Distribution)�Request�Response)�_Hash)�InstallRequirementc @ s e Zd ZdZdS )�PipErrorzBase pip exceptionN��__name__�
__module__�__qualname__�__doc__� r r �</usr/lib/python3.9/site-packages/pip/_internal/exceptions.pyr s r c @ s e Zd ZdZdS )�ConfigurationErrorz"General exception in configurationNr r r r r r s r c @ s e Zd ZdZdS )�InstallationErrorz%General exception during installationNr r r r r r s r c @ s e Zd ZdZdS )�UninstallationErrorz'General exception during uninstallationNr r r r r r s r c @ s e Zd ZdZdd� Zdd� 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").
c C s || _ || _dS )z�
:param dist: A Distribution object.
:param metadata_name: The name of the metadata being accessed
(can be "METADATA" or "PKG-INFO").
N)�dist�
metadata_name)�selfr r r r r �__init__) s zNoneMetadataError.__init__c C s d� | j| j�S )Nz+None {} metadata found for distribution: {})�formatr r �r r r r �__str__3 s ��zNoneMetadataError.__str__N�r r r r r r r r r r r s
r c @ s e Zd ZdZdd� ZdS )�UserInstallationInvalidzBA --user install is requested on an environment without user site.c C s dS )Nz$User base directory is not specifiedr r r r r r A s zUserInstallationInvalid.__str__N)r r r r r r r r r r"