aboutsummaryrefslogtreecommitdiff
path: root/requests/packages/urllib3/exceptions.py
diff options
context:
space:
mode:
authorChristopher Baines <mail@cbaines.net>2015-12-22 13:47:07 +0000
committerChristopher Baines <mail@cbaines.net>2015-12-22 13:48:06 +0000
commit79f51e45f74dd32f9c1a103150ded9d575f5f94c (patch)
treeadcea8da78181c97b46d4483657877b2b348833a /requests/packages/urllib3/exceptions.py
parent59759b30c8a8f23377afe562a44ddc893dbbb833 (diff)
parent08c16e06ad11c6fcb26f4ca1ea3f11093598092f (diff)
downloadpython-requests-79f51e45f74dd32f9c1a103150ded9d575f5f94c.tar
python-requests-79f51e45f74dd32f9c1a103150ded9d575f5f94c.tar.gz
change version to 2.9.1-1 (UNRELEASED)
New upstream release 2.9.1
Diffstat (limited to 'requests/packages/urllib3/exceptions.py')
-rw-r--r--requests/packages/urllib3/exceptions.py14
1 files changed, 11 insertions, 3 deletions
diff --git a/requests/packages/urllib3/exceptions.py b/requests/packages/urllib3/exceptions.py
index 9607d65..8e07eb6 100644
--- a/requests/packages/urllib3/exceptions.py
+++ b/requests/packages/urllib3/exceptions.py
@@ -1,16 +1,17 @@
+from __future__ import absolute_import
+# Base Exceptions
-## Base Exceptions
class HTTPError(Exception):
"Base exception used by this module."
pass
+
class HTTPWarning(Warning):
"Base warning used by this module."
pass
-
class PoolError(HTTPError):
"Base exception for errors caused within a pool."
def __init__(self, pool, message):
@@ -57,7 +58,7 @@ class ProtocolError(HTTPError):
ConnectionError = ProtocolError
-## Leaf Exceptions
+# Leaf Exceptions
class MaxRetryError(RequestError):
"""Raised when the maximum number of retries is exceeded.
@@ -112,10 +113,12 @@ class ConnectTimeoutError(TimeoutError):
"Raised when a socket timeout occurs while connecting to a server"
pass
+
class NewConnectionError(ConnectTimeoutError, PoolError):
"Raised when we fail to establish a new connection. Usually ECONNREFUSED."
pass
+
class EmptyPoolError(PoolError):
"Raised when a pool runs out of connections and no more are allowed."
pass
@@ -172,6 +175,11 @@ class InsecurePlatformWarning(SecurityWarning):
pass
+class SNIMissingWarning(HTTPWarning):
+ "Warned when making a HTTPS request without SNI available."
+ pass
+
+
class ResponseNotChunked(ProtocolError, ValueError):
"Response needs to be chunked in order to read it as chunks."
pass