diff --git a/twine/package.py b/twine/package.py index e5d424c8..745752ff 100644 --- a/twine/package.py +++ b/twine/package.py @@ -48,6 +48,9 @@ def _safe_name(name: str) -> str: """Convert an arbitrary string to a standard distribution name. Any runs of non-alphanumeric/. characters are replaced with a single '-'. + + Copied from pkg_resources.safe_name for compatibility with warehouse. + See https://github.com/pypa/twine/issues/743. """ return re.sub("[^A-Za-z0-9.]+", "-", name)