This commit is contained in:
lz_db
2026-10-16 22:48:30 +08:00
parent 190de72571
commit 0b36fd3383
3161 changed files with 12787 additions and 77274 deletions
@@ -3,10 +3,9 @@
Provides exceptions used by setuptools modules.
"""
from __future__ import annotations
from distutils import errors as _distutils_errors
# Re-export errors from distutils to facilitate the migration to PEP632
ByteCompileError = _distutils_errors.DistutilsByteCompileError
@@ -30,15 +29,7 @@ UnknownFileError = _distutils_errors.UnknownFileError
BaseError = _distutils_errors.DistutilsError
class InvalidConfigError(OptionError): # type: ignore[valid-type, misc] # distutils imports are `Any` on python 3.12+
"""Error used for invalid configurations."""
class RemovedConfigError(OptionError): # type: ignore[valid-type, misc] # distutils imports are `Any` on python 3.12+
"""Error used for configurations that were deprecated and removed."""
class RemovedCommandError(BaseError, RuntimeError): # type: ignore[valid-type, misc] # distutils imports are `Any` on python 3.12+
class RemovedCommandError(BaseError, RuntimeError):
"""Error used for commands that have been removed in setuptools.
Since ``setuptools`` is built on ``distutils``, simply removing a command
@@ -48,7 +39,7 @@ class RemovedCommandError(BaseError, RuntimeError): # type: ignore[valid-type,
"""
class PackageDiscoveryError(BaseError, RuntimeError): # type: ignore[valid-type, misc] # distutils imports are `Any` on python 3.12+
class PackageDiscoveryError(BaseError, RuntimeError):
"""Impossible to perform automatic discovery of packages and/or modules.
The current project layout or given discovery options can lead to problems when