File: compat.py

package info (click to toggle)
python-pip 9.0.1-2%2Bdeb9u1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 4,900 kB
  • sloc: python: 51,824; makefile: 206; sh: 52
file content (20 lines) | stat: -rw-r--r-- 416 bytes parent folder | download | duplicates (10)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
try:
    from urllib.parse import urljoin
except ImportError:
    from urlparse import urljoin


try:
    import cPickle as pickle
except ImportError:
    import pickle


from pip._vendor.requests.packages.urllib3.response import HTTPResponse
from pip._vendor.requests.packages.urllib3.util import is_fp_closed

# Replicate some six behaviour
try:
    text_type = (unicode,)
except NameError:
    text_type = (str,)