summaryrefslogtreecommitdiff
path: root/pkg_resources/__init__.py
diff options
context:
space:
mode:
authorJason R. Coombs <jaraco@jaraco.com>2018-09-16 11:14:30 -0400
committerGitHub <noreply@github.com>2018-09-16 11:14:30 -0400
commit9e23b6d3e046113e8546e9fe084c112e809af795 (patch)
tree7d8d24b491122a6766cef2c6302e71512b22a37f /pkg_resources/__init__.py
parentd00313856696b00710b8cf8052569d38c2536580 (diff)
parent5f2cb7661d989e79b82c0df195e0c371fab3949f (diff)
downloadpython-setuptools-git-9e23b6d3e046113e8546e9fe084c112e809af795.tar.gz
Merge pull request #1324 from torsava/safe_name
Make safe_name compliant to PEP 503 and behaviour of pip > 8.1.2
Diffstat (limited to 'pkg_resources/__init__.py')
-rw-r--r--pkg_resources/__init__.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/pkg_resources/__init__.py b/pkg_resources/__init__.py
index fa1cba86..a8b5319f 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):