summaryrefslogtreecommitdiff
path: root/pkg_resources.py
diff options
context:
space:
mode:
Diffstat (limited to 'pkg_resources.py')
-rw-r--r--pkg_resources.py12
1 files changed, 11 insertions, 1 deletions
diff --git a/pkg_resources.py b/pkg_resources.py
index f3ac6c50..87fd2782 100644
--- a/pkg_resources.py
+++ b/pkg_resources.py
@@ -80,6 +80,13 @@ import setuptools._vendor.packaging.specifiers
packaging = setuptools._vendor.packaging
+class PEP440Warning(RuntimeWarning):
+ """
+ Used when there is an issue with a version or specifier not complying with
+ PEP 440.
+ """
+
+
class _SetuptoolsVersionMixin(object):
def __hash__(self):
@@ -272,6 +279,9 @@ __all__ = [
'ResolutionError', 'VersionConflict', 'DistributionNotFound',
'UnknownExtra', 'ExtractionError',
+ # Warnings
+ 'PEP440Warning',
+
# Parsing functions and string utilities
'parse_requirements', 'parse_version', 'safe_name', 'safe_version',
'get_platform', 'compatible_platforms', 'yield_lines', 'split_sections',
@@ -2430,7 +2440,7 @@ class Distribution(object):
"versions." % (
self.project_name, self.version,
),
- RuntimeWarning,
+ PEP440Warning,
)
return self._parsed_version