aboutsummaryrefslogtreecommitdiff
path: root/requests/exceptions.py
diff options
context:
space:
mode:
Diffstat (limited to 'requests/exceptions.py')
-rw-r--r--requests/exceptions.py15
1 files changed, 15 insertions, 0 deletions
diff --git a/requests/exceptions.py b/requests/exceptions.py
index 89135a8..ba0b910 100644
--- a/requests/exceptions.py
+++ b/requests/exceptions.py
@@ -97,3 +97,18 @@ class StreamConsumedError(RequestException, TypeError):
class RetryError(RequestException):
"""Custom retries logic failed"""
+
+
+# Warnings
+
+
+class RequestsWarning(Warning):
+ """Base warning for Requests."""
+ pass
+
+
+class FileModeWarning(RequestsWarning, DeprecationWarning):
+ """
+ A file was opened in text mode, but Requests determined its binary length.
+ """
+ pass