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

Side by Side Diff: third_party/requests/__init__.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 # /__) _ _ _ _ _/ _ 4 # /__) _ _ _ _ _/ _
5 # / ( (- (/ (/ (- _) / _) 5 # / ( (- (/ (/ (- _) / _)
6 # / 6 # /
7 7
8 """ 8 """
9 requests HTTP library 9 requests HTTP library
10 ~~~~~~~~~~~~~~~~~~~~~ 10 ~~~~~~~~~~~~~~~~~~~~~
(...skipping 24 matching lines...) Expand all
35 35
36 The other HTTP methods are supported - see `requests.api`. Full documentation 36 The other HTTP methods are supported - see `requests.api`. Full documentation
37 is at <http://python-requests.org>. 37 is at <http://python-requests.org>.
38 38
39 :copyright: (c) 2013 by Kenneth Reitz. 39 :copyright: (c) 2013 by Kenneth Reitz.
40 :license: Apache 2.0, see LICENSE for more details. 40 :license: Apache 2.0, see LICENSE for more details.
41 41
42 """ 42 """
43 43
44 __title__ = 'requests' 44 __title__ = 'requests'
45 __version__ = '1.2.3' 45 __version__ = '2.0.0'
46 __build__ = 0x010203 46 __build__ = 0x020000
47 __author__ = 'Kenneth Reitz' 47 __author__ = 'Kenneth Reitz'
48 __license__ = 'Apache 2.0' 48 __license__ = 'Apache 2.0'
49 __copyright__ = 'Copyright 2013 Kenneth Reitz' 49 __copyright__ = 'Copyright 2013 Kenneth Reitz'
50 50
51 # Attempt to enable urllib3's SNI support, if possible 51 # Attempt to enable urllib3's SNI support, if possible
52 try: 52 try:
53 from requests.packages.urllib3.contrib import pyopenssl 53 from .packages.urllib3.contrib import pyopenssl
54 pyopenssl.inject_into_urllib3() 54 pyopenssl.inject_into_urllib3()
55 except ImportError: 55 except ImportError:
56 pass 56 pass
57 57
58 from . import utils 58 from . import utils
59 from .models import Request, Response, PreparedRequest 59 from .models import Request, Response, PreparedRequest
60 from .api import request, get, head, post, patch, put, delete, options 60 from .api import request, get, head, post, patch, put, delete, options
61 from .sessions import session, Session 61 from .sessions import session, Session
62 from .status_codes import codes 62 from .status_codes import codes
63 from .exceptions import ( 63 from .exceptions import (
64 RequestException, Timeout, URLRequired, 64 RequestException, Timeout, URLRequired,
65 TooManyRedirects, HTTPError, ConnectionError 65 TooManyRedirects, HTTPError, ConnectionError
66 ) 66 )
67 67
68 # Set default logging handler to avoid "No handler found" warnings. 68 # Set default logging handler to avoid "No handler found" warnings.
69 import logging 69 import logging
70 try: # Python 2.7+ 70 try: # Python 2.7+
71 from logging import NullHandler 71 from logging import NullHandler
72 except ImportError: 72 except ImportError:
73 class NullHandler(logging.Handler): 73 class NullHandler(logging.Handler):
74 def emit(self, record): 74 def emit(self, record):
75 pass 75 pass
76 76
77 logging.getLogger(__name__).addHandler(NullHandler()) 77 logging.getLogger(__name__).addHandler(NullHandler())
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698