pip/src/pip/_vendor/cachecontrol/compat.py

21 lines
410 B
Python
Raw Normal View History

2014-04-24 13:20:51 +02:00
try:
from urllib.parse import urljoin
except ImportError:
from urlparse import urljoin
try:
import cPickle as pickle
except ImportError:
import pickle
2014-09-10 23:13:35 +02:00
from pip._vendor.requests.packages.urllib3.response import HTTPResponse
from pip._vendor.requests.packages.urllib3.util import is_fp_closed
2016-01-19 23:16:25 +01:00
# Replicate some six behaviour
try:
2017-03-30 14:48:14 +02:00
text_type = unicode
2016-01-19 23:16:25 +01:00
except NameError:
2017-03-30 14:48:14 +02:00
text_type = str