Mercurial > repos > shellac > guppy_basecaller
comparison env/lib/python3.7/site-packages/cachecontrol/compat.py @ 2:6af9afd405e9 draft
"planemo upload commit 0a63dd5f4d38a1f6944587f52a8cd79874177fc1"
author | shellac |
---|---|
date | Thu, 14 May 2020 14:56:58 -0400 |
parents | 26e78fe6e8c4 |
children |
comparison
equal
deleted
inserted
replaced
1:75ca89e9b81c | 2:6af9afd405e9 |
---|---|
1 try: | |
2 from urllib.parse import urljoin | |
3 except ImportError: | |
4 from urlparse import urljoin | |
5 | |
6 | |
7 try: | |
8 import cPickle as pickle | |
9 except ImportError: | |
10 import pickle | |
11 | |
12 | |
13 # Handle the case where the requests module has been patched to not have | |
14 # urllib3 bundled as part of its source. | |
15 try: | |
16 from requests.packages.urllib3.response import HTTPResponse | |
17 except ImportError: | |
18 from urllib3.response import HTTPResponse | |
19 | |
20 try: | |
21 from requests.packages.urllib3.util import is_fp_closed | |
22 except ImportError: | |
23 from urllib3.util import is_fp_closed | |
24 | |
25 # Replicate some six behaviour | |
26 try: | |
27 text_type = (unicode,) | |
28 except NameError: | |
29 text_type = (str,) |