aboutsummaryrefslogtreecommitdiffstats
path: root/setuptools/compat.py
diff options
context:
space:
mode:
authorPhilip Thiem <ptthiem@gmail.com>2013-09-28 12:33:19 -0500
committerPhilip Thiem <ptthiem@gmail.com>2013-09-28 12:33:19 -0500
commit78f01306a08285e9f2abe6ad749f6ce884e12555 (patch)
treec4769869539d5ae9101a7e8e76a46e9e292b9b97 /setuptools/compat.py
parent30bb58f069cf1624f35cfbdb725e8e443ff64330 (diff)
parent49ce80613b7fcffd1882f7fb082e5bcc30e976f0 (diff)
downloadexternal_python_setuptools-78f01306a08285e9f2abe6ad749f6ce884e12555.tar.gz
external_python_setuptools-78f01306a08285e9f2abe6ad749f6ce884e12555.tar.bz2
external_python_setuptools-78f01306a08285e9f2abe6ad749f6ce884e12555.zip
Merge with default
--HG-- extra : rebase_source : d9c70d5bebd4290f568c828c5bc3a9b93a817ff2
Diffstat (limited to 'setuptools/compat.py')
-rw-r--r--setuptools/compat.py11
1 files changed, 7 insertions, 4 deletions
diff --git a/setuptools/compat.py b/setuptools/compat.py
index 94fe23e9..bbc98d66 100644
--- a/setuptools/compat.py
+++ b/setuptools/compat.py
@@ -27,10 +27,10 @@ if sys.version_info[0] < 3:
unichr = unichr
unicode = unicode
bytes = str
- from urllib import url2pathname
+ from urllib import url2pathname, splittag
import urllib2
from urllib2 import urlopen, HTTPError, URLError, unquote, splituser
- from urlparse import urlparse, urlunparse, urljoin
+ from urlparse import urlparse, urlunparse, urljoin, urlsplit, urlunsplit
xrange = xrange
filterfalse = itertools.ifilterfalse
@@ -74,7 +74,10 @@ else:
from urllib.error import HTTPError, URLError
import urllib.request as urllib2
from urllib.request import urlopen, url2pathname
- from urllib.parse import urlparse, urlunparse, unquote, splituser, urljoin
+ from urllib.parse import (
+ urlparse, urlunparse, unquote, splituser, urljoin, urlsplit,
+ urlunsplit, splittag,
+ )
xrange = range
filterfalse = itertools.filterfalse
@@ -83,7 +86,7 @@ else:
globs = globals()
if locs is None:
locs = globs
- f = open(fn)
+ f = open(fn, 'rb')
try:
source = f.read()
finally: