Commit 88f62bfe authored by MinRK's avatar MinRK

soften normalized version warning

indicate that normalization is happening, but don't be pushy about changing valid versions.

--HG--
branch : no-normalize-warning
parent 0478d8fa
......@@ -276,6 +276,12 @@ class Distribution(_Distribution):
ver = packaging.version.Version(self.metadata.version)
normalized_version = str(ver)
if self.metadata.version != normalized_version:
warnings.warn(
"Normalizing '%s' to '%s'" % (
self.metadata.version,
normalized_version,
)
)
self.metadata.version = normalized_version
except (packaging.version.InvalidVersion, TypeError):
warnings.warn(
......
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