diff options
| author | Jason R. Coombs <jaraco@jaraco.com> | 2018-09-16 11:59:31 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-09-16 11:59:31 -0400 |
| commit | cdcc7e5f1ecb6e485a71676a071d1b37adac3d51 (patch) | |
| tree | b3c96596887e4b12c76d591106b2e9fc27df6f8b | |
| parent | c2018ee09b7f442b33b441eed02eb5d8f68fd278 (diff) | |
| download | python-setuptools-git-cdcc7e5f1ecb6e485a71676a071d1b37adac3d51.tar.gz | |
Revert "Make safe_name compliant to PEP 503 and behaviour of pip > 8.1.2"
| -rw-r--r-- | changelog.d/1324.change.rst | 1 | ||||
| -rw-r--r-- | pkg_resources/__init__.py | 4 |
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): |
