Skip to content
Myr

Merge pull request #1332 from bboe/urllib3

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Update urllib3 to 59de03e6163c6928dc01832ed6e48e9f6c34c795.

authored by Kenneth Reitz · committed by Kenneth Reitz · parents d2ba579, 49ca72c · Browse files · 9 files+31 added−19 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

9 files+31 added−19 removed

  • other:+31 added−19 removed

9 files+31 added−19 removed

modified:requests/packages/urllib3/contrib/ntlmpool.py+1 added-1 removed
1# urllib3/contrib/ntlmpool.py2# Copyright 2008-2012 Andrey Petrov and contributors (see CONTRIBUTORS.txt)2# Copyright 2008-2013 Andrey Petrov and contributors (see CONTRIBUTORS.txt)3#4# This module is part of urllib3 and is released under5# the MIT License: http://www.opensource.org/licenses/mit-license.php6
114 unmodified lines
modified:requests/packages/urllib3/__init__.py+1 added-1 removed
1# urllib3/__init__.py2# Copyright 2008-2012 Andrey Petrov and contributors (see CONTRIBUTORS.txt)2# Copyright 2008-2013 Andrey Petrov and contributors (see CONTRIBUTORS.txt)3#4# This module is part of urllib3 and is released under5# the MIT License: http://www.opensource.org/licenses/mit-license.php6
52 unmodified lines
modified:requests/packages/urllib3/_collections.py+1 added-1 removed
1# urllib3/_collections.py2# Copyright 2008-2012 Andrey Petrov and contributors (see CONTRIBUTORS.txt)2# Copyright 2008-2013 Andrey Petrov and contributors (see CONTRIBUTORS.txt)3#4# This module is part of urllib3 and is released under5# the MIT License: http://www.opensource.org/licenses/mit-license.php6
88 unmodified lines
modified:requests/packages/urllib3/connectionpool.py+5 added-3 removed
1# urllib3/connectionpool.py2# Copyright 2008-2012 Andrey Petrov and contributors (see CONTRIBUTORS.txt)2# Copyright 2008-2013 Andrey Petrov and contributors (see CONTRIBUTORS.txt)3#4# This module is part of urllib3 and is released under5# the MIT License: http://www.opensource.org/licenses/mit-license.php6
438 unmodified lines
445 # ``response.read()``)446447 except Empty as e:448 # Timed out by queue449 raise TimeoutError(self, "Request timed out. (pool_timeout=%s)" %449 raise TimeoutError(self, url,450 "Request timed out. (pool_timeout=%s)" %451 pool_timeout)452453 except SocketTimeout as e:454 # Timed out by socket454 raise TimeoutError(self, "Request timed out. (timeout=%s)" %455 raise TimeoutError(self, url,456 "Request timed out. (timeout=%s)" %457 timeout)458459 except BaseSSLError as e:460 # SSL certificate error
137 unmodified lines
modified:requests/packages/urllib3/exceptions.py+18 added-10 removed
1# urllib3/exceptions.py2# Copyright 2008-2012 Andrey Petrov and contributors (see CONTRIBUTORS.txt)2# Copyright 2008-2013 Andrey Petrov and contributors (see CONTRIBUTORS.txt)3#4# This module is part of urllib3 and is released under5# the MIT License: http://www.opensource.org/licenses/mit-license.php6
12 unmodified lines
19 HTTPError.__init__(self, "%s: %s" % (pool, message))2021 def __reduce__(self):22 # For pickling purposes.23 return self.__class__, (None, self.url)23 return self.__class__, (None, None)242526class RequestError(PoolError):27 "Base exception for PoolErrors that have associated URLs."28 def __init__(self, pool, url, message):29 self.url = url30 PoolError.__init__(self, pool, message)3132 def __reduce__(self):33 # For pickling purposes.34 return self.__class__, (None, self.url, None)353637class SSLError(HTTPError):38 "Raised when SSL certificate fails in an HTTPS connection."39 pass40
4 unmodified lines
454647## Leaf Exceptions4838class MaxRetryError(PoolError):49class MaxRetryError(RequestError):50 "Raised when the maximum number of retries is exceeded."5152 def __init__(self, pool, url, reason=None):53 self.reason = reason
3 unmodified lines
57 message += " (Caused by %s: %s)" % (type(reason), reason)58 else:59 message += " (Caused by redirect)"6050 PoolError.__init__(self, pool, message)51 self.url = url61 RequestError.__init__(self, pool, url, message)626354class HostChangedError(PoolError):64class HostChangedError(RequestError):65 "Raised when an existing pool gets a request for a foreign host."6667 def __init__(self, pool, url, retries=3):68 message = "Tried to open a foreign host with url: %s" % url59 PoolError.__init__(self, pool, message)6061 self.url = url69 RequestError.__init__(self, pool, url, message)70 self.retries = retries717265class TimeoutError(PoolError):73class TimeoutError(RequestError):74 "Raised when a socket timeout occurs."75 pass7677
18 unmodified lines
modified:requests/packages/urllib3/poolmanager.py+2 added-1 removed
1# urllib3/poolmanager.py2# Copyright 2008-2012 Andrey Petrov and contributors (see CONTRIBUTORS.txt)2# Copyright 2008-2013 Andrey Petrov and contributors (see CONTRIBUTORS.txt)3#4# This module is part of urllib3 and is released under5# the MIT License: http://www.opensource.org/licenses/mit-license.php6
142 unmodified lines
149 method = 'GET'150151 log.info("Redirecting %s -> %s" % (url, redirect_location))152 kw['retries'] = kw.get('retries', 3) - 1 # Persist retries countdown153 kw['redirect'] = redirect154 return self.urlopen(method, redirect_location, **kw)155156157class ProxyManager(RequestMethods):
35 unmodified lines
modified:requests/packages/urllib3/request.py+1 added-1 removed
1# urllib3/request.py2# Copyright 2008-2012 Andrey Petrov and contributors (see CONTRIBUTORS.txt)2# Copyright 2008-2013 Andrey Petrov and contributors (see CONTRIBUTORS.txt)3#4# This module is part of urllib3 and is released under5# the MIT License: http://www.opensource.org/licenses/mit-license.php6
136 unmodified lines
modified:requests/packages/urllib3/util.py+1 added-1 removed
1# urllib3/util.py2# Copyright 2008-2012 Andrey Petrov and contributors (see CONTRIBUTORS.txt)2# Copyright 2008-2013 Andrey Petrov and contributors (see CONTRIBUTORS.txt)3#4# This module is part of urllib3 and is released under5# the MIT License: http://www.opensource.org/licenses/mit-license.php6
372 unmodified lines
modified:AUTHORS.rst+1 added
121 unmodified lines
122- Johnny Goodnow <j.goodnow29@gmail.com>123- Denis Ryzhkov <denisr@denisr.com>124- Wilfred Hughes <me@wilfred.me.uk> @dontYetKnow125- Dmitry Medvinsky <me@dmedvinsky.name>126- Bryce Boe <bbzbryce@gmail.com> @bboe