Skip to content

Commit 63f3d00

Browse files
Update docstring of safe_name()
Co-authored-by: Brian Rutledge <brian@bhrutledge.com>
1 parent d89585c commit 63f3d00

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

twine/package.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,9 @@ def _safe_name(name: str) -> str:
4848
"""Convert an arbitrary string to a standard distribution name.
4949
5050
Any runs of non-alphanumeric/. characters are replaced with a single '-'.
51+
52+
Copied from pkg_resources.safe_name for compatibility with warehouse.
53+
See https://github.com/pypa/twine/issues/743.
5154
"""
5255
return re.sub("[^A-Za-z0-9.]+", "-", name)
5356

0 commit comments

Comments
 (0)