aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--changelog.d/1324.change.rst1
-rw-r--r--pkg_resources/__init__.py4
2 files changed, 2 insertions, 3 deletions
diff --git a/changelog.d/1324.change.rst b/changelog.d/1324.change.rst
deleted file mode 100644
index 5c97dd2a..00000000
--- a/changelog.d/1324.change.rst
+++ /dev/null
@@ -1 +0,0 @@
-Make safe_name compliant with PEP 503.
diff --git a/pkg_resources/__init__.py b/pkg_resources/__init__.py
index 84a4b34b..3ae2c5cd 100644
--- a/pkg_resources/__init__.py
+++ b/pkg_resources/__init__.py
@@ -1312,9 +1312,9 @@ def get_default_cache():
def safe_name(name):
"""Convert an arbitrary string to a standard distribution name
- Any runs of non-alphanumeric characters are replaced with a single '-'.
+ Any runs of non-alphanumeric/. characters are replaced with a single '-'.
"""
- return re.sub('[^A-Za-z0-9]+', '-', name)
+ return re.sub('[^A-Za-z0-9.]+', '-', name)
def safe_version(version):