diff options
author | Jason R. Coombs <jaraco@jaraco.com> | 2018-03-17 11:38:32 -0400 |
---|---|---|
committer | Jason R. Coombs <jaraco@jaraco.com> | 2018-03-17 11:38:32 -0400 |
commit | e141c08edc47834b04eb0fd7c1510ee04b682921 (patch) | |
tree | b43c3e068a2d9ce0166226ada2d13916668a8085 /setuptools/package_index.py | |
parent | fc45e788f6c470ec983e3e1cbeb6054ffbb9fd56 (diff) | |
download | external_python_setuptools-e141c08edc47834b04eb0fd7c1510ee04b682921.tar.gz external_python_setuptools-e141c08edc47834b04eb0fd7c1510ee04b682921.tar.bz2 external_python_setuptools-e141c08edc47834b04eb0fd7c1510ee04b682921.zip |
Use six for splituser
Diffstat (limited to 'setuptools/package_index.py')
-rwxr-xr-x | setuptools/package_index.py | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/setuptools/package_index.py b/setuptools/package_index.py index ad743307..64a11c9b 100755 --- a/setuptools/package_index.py +++ b/setuptools/package_index.py @@ -9,11 +9,6 @@ import hashlib import itertools from functools import wraps -try: - from urllib.parse import splituser -except ImportError: - from urllib2 import splituser - from setuptools.extern import six from setuptools.extern.six.moves import urllib, http_client, configparser, map @@ -857,7 +852,7 @@ class PackageIndex(Environment): scheme, netloc, path, p, q, f = urllib.parse.urlparse(url) if not netloc and path.startswith('//') and '/' in path[2:]: netloc, path = path[2:].split('/', 1) - auth, host = splituser(netloc) + auth, host = urllib.parse.splituser(netloc) if auth: if ':' in auth: user, pw = auth.split(':', 1) @@ -1064,7 +1059,7 @@ def open_with_auth(url, opener=urllib.request.urlopen): raise http_client.InvalidURL("nonnumeric port: ''") if scheme in ('http', 'https'): - auth, host = splituser(netloc) + auth, host = urllib.parse.splituser(netloc) else: auth = None |