Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(151)

Side by Side Diff: third_party/requests/compat.py

Issue 25004007: Update 'requests' lib to v2.0. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/swarm_client
Patch Set: Created 7 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 # -*- coding: utf-8 -*- 1 # -*- coding: utf-8 -*-
2 2
3 """ 3 """
4 pythoncompat 4 pythoncompat
5 """ 5 """
6 6
7 from .packages import charade as chardet 7 from .packages import charade as chardet
8 8
9 import sys 9 import sys
10 10
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 try: 76 try:
77 import simplejson as json 77 import simplejson as json
78 except ImportError: 78 except ImportError:
79 import json 79 import json
80 80
81 # --------- 81 # ---------
82 # Specifics 82 # Specifics
83 # --------- 83 # ---------
84 84
85 if is_py2: 85 if is_py2:
86 from urllib import quote, unquote, quote_plus, unquote_plus, urlencode 86 from urllib import quote, unquote, quote_plus, unquote_plus, urlencode, getp roxies, proxy_bypass
87 from urlparse import urlparse, urlunparse, urljoin, urlsplit, urldefrag 87 from urlparse import urlparse, urlunparse, urljoin, urlsplit, urldefrag
88 from urllib2 import parse_http_list 88 from urllib2 import parse_http_list
89 import cookielib 89 import cookielib
90 from Cookie import Morsel 90 from Cookie import Morsel
91 from StringIO import StringIO 91 from StringIO import StringIO
92 from .packages.urllib3.packages.ordered_dict import OrderedDict 92 from .packages.urllib3.packages.ordered_dict import OrderedDict
93 from httplib import IncompleteRead
93 94
94 builtin_str = str 95 builtin_str = str
95 bytes = str 96 bytes = str
96 str = unicode 97 str = unicode
97 basestring = basestring 98 basestring = basestring
98 numeric_types = (int, long, float) 99 numeric_types = (int, long, float)
99 100
100 101
101 elif is_py3: 102 elif is_py3:
102 from urllib.parse import urlparse, urlunparse, urljoin, urlsplit, urlencode, quote, unquote, quote_plus, unquote_plus, urldefrag 103 from urllib.parse import urlparse, urlunparse, urljoin, urlsplit, urlencode, quote, unquote, quote_plus, unquote_plus, urldefrag
103 from urllib.request import parse_http_list 104 from urllib.request import parse_http_list, getproxies, proxy_bypass
104 from http import cookiejar as cookielib 105 from http import cookiejar as cookielib
105 from http.cookies import Morsel 106 from http.cookies import Morsel
106 from io import StringIO 107 from io import StringIO
107 from collections import OrderedDict 108 from collections import OrderedDict
109 from http.client import IncompleteRead
108 110
109 builtin_str = str 111 builtin_str = str
110 str = str 112 str = str
111 bytes = bytes 113 bytes = bytes
112 basestring = (str, bytes) 114 basestring = (str, bytes)
113 numeric_types = (int, float) 115 numeric_types = (int, float)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698