Commit 20eb01f0 authored by Donald Stufft's avatar Donald Stufft

Add a PEP440Warning to make it easier to silence these warnings

parent 20ac4827
......@@ -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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment