From 63f3d00a9d7fd78a9ff9e1b4b18d03e196929da2 Mon Sep 17 00:00:00 2001 From: Pablo Galindo Date: Tue, 16 Mar 2021 11:14:33 +0000 Subject: [PATCH] Update docstring of safe_name() Co-authored-by: Brian Rutledge --- twine/package.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/twine/package.py b/twine/package.py index e5d424c8..7ec438de 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)