aboutsummaryrefslogtreecommitdiffstats
path: root/setuptools/package_index.py
diff options
context:
space:
mode:
authorJason R. Coombs <jaraco@jaraco.com>2018-03-17 11:38:32 -0400
committerJason R. Coombs <jaraco@jaraco.com>2018-03-17 11:38:32 -0400
commite141c08edc47834b04eb0fd7c1510ee04b682921 (patch)
treeb43c3e068a2d9ce0166226ada2d13916668a8085 /setuptools/package_index.py
parentfc45e788f6c470ec983e3e1cbeb6054ffbb9fd56 (diff)
downloadexternal_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-xsetuptools/package_index.py9
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