diff options
author | Jason R. Coombs <jaraco@jaraco.com> | 2020-05-12 19:58:54 -0400 |
---|---|---|
committer | Jason R. Coombs <jaraco@jaraco.com> | 2020-05-12 21:06:18 -0400 |
commit | d1dccc76ef90497788b5c839918d775585044f5a (patch) | |
tree | b04bacf74a11b4fabf65e6e1664efd469ef84a64 | |
parent | 322734cfa00d3d5bffb9af02c780ee8e33142e5b (diff) | |
download | external_python_setuptools-d1dccc76ef90497788b5c839918d775585044f5a.tar.gz external_python_setuptools-d1dccc76ef90497788b5c839918d775585044f5a.tar.bz2 external_python_setuptools-d1dccc76ef90497788b5c839918d775585044f5a.zip |
Just remove fragment remover. PyPI no longer supplies these md5 values anyway. Fixes #2089.
-rw-r--r-- | pkg_resources/__init__.py | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/pkg_resources/__init__.py b/pkg_resources/__init__.py index 0512731d..edd3d2e8 100644 --- a/pkg_resources/__init__.py +++ b/pkg_resources/__init__.py @@ -55,7 +55,7 @@ except NameError: FileExistsError = OSError from pkg_resources.extern import six -from pkg_resources.extern.six.moves import urllib, map, filter +from pkg_resources.extern.six.moves import map, filter # capture these to bypass sandboxing from os import utime @@ -2546,15 +2546,6 @@ class EntryPoint: return maps -def _remove_md5_fragment(location): - if not location: - return '' - parsed = urllib.parse.urlparse(location) - if parsed[-1].startswith('md5='): - return urllib.parse.urlunparse(parsed[:-1] + ('',)) - return location - - def _version_from_file(lines): """ Given an iterable of lines from a Metadata file, return @@ -2611,7 +2602,7 @@ class Distribution: self.parsed_version, self.precedence, self.key, - _remove_md5_fragment(self.location), + self.location, self.py_version or '', self.platform or '', ) |