Let us walk on the 3-isogeny graph
Loading...
Searching...
No Matches
pip._internal.exceptions Namespace Reference

Data Structures

class  BadCommand
 
class  BestVersionAlreadyInstalled
 
class  CommandError
 
class  ConfigurationError
 
class  ConfigurationFileCouldNotBeLoaded
 
class  DiagnosticPipError
 
class  DirectoryUrlHashUnsupported
 
class  DistributionNotFound
 
class  ExternallyManagedEnvironment
 
class  HashError
 
class  HashErrors
 
class  HashMismatch
 
class  HashMissing
 
class  HashUnpinned
 
class  InstallationError
 
class  InstallationSubprocessError
 
class  InvalidPyProjectBuildRequires
 
class  InvalidSchemeCombination
 
class  InvalidWheel
 
class  InvalidWheelFilename
 
class  MetadataGenerationFailed
 
class  MetadataInconsistent
 
class  MissingPyProjectBuildRequires
 
class  NetworkConnectionError
 
class  NoneMetadataError
 
class  PipError
 
class  PreviousBuildDirError
 
class  RequirementsFileParseError
 
class  UninstallationError
 
class  UnsupportedPythonVersion
 
class  UnsupportedWheel
 
class  UserInstallationInvalid
 
class  VcsHashUnsupported
 

Functions

bool _is_kebab_case (str s)
 
Text _prefix_with_indent (Union[Text, str] s, Console console, *str prefix, str indent)
 

Variables

 logger = logging.getLogger(__name__)
 
str _DEFAULT_EXTERNALLY_MANAGED_ERROR
 

Detailed Description

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.

Function Documentation

◆ _is_kebab_case()

bool _is_kebab_case ( str  s)
protected

Definition at line 36 of file exceptions.py.

36def _is_kebab_case(s: str) -> bool:
37 return re.match(r"^[a-z]+(-[a-z]+)*$", s) is not None
38
39
for i

References i.

Referenced by DiagnosticPipError.__init__().

Here is the caller graph for this function:

◆ _prefix_with_indent()

Text _prefix_with_indent ( Union[Text, str]  s,
Console  console,
*str  prefix,
str  indent 
)
protected

Definition at line 40 of file exceptions.py.

46) -> Text:
47 if isinstance(s, Text):
48 text = s
49 else:
50 text = console.render_str(s)
51
52 return console.render_str(prefix, overflow="ignore") + console.render_str(
53 f"\n{indent}", overflow="ignore"
54 ).join(text.split(allow_blank=True))
55
56

References i.

Referenced by DiagnosticPipError.__rich_console__().

Here is the caller graph for this function:

Variable Documentation

◆ _DEFAULT_EXTERNALLY_MANAGED_ERROR

str _DEFAULT_EXTERNALLY_MANAGED_ERROR
protected
Initial value:
1= f"""\
2The Python environment under {sys.prefix} is managed externally, and may not be
3manipulated by the user. Please use specific tooling from the distributor of
4the Python installation to interact with this environment instead.
5"""

Definition at line 656 of file exceptions.py.

◆ logger

logger = logging.getLogger(__name__)

Definition at line 30 of file exceptions.py.