diff options
author | Shubham Saini <shubham6405@gmail.com> | 2019-08-05 08:32:33 +0000 |
---|---|---|
committer | Shubham Saini <shubham6405@gmail.com> | 2019-08-05 08:32:33 +0000 |
commit | 227b2d30a8675b44918f9d9ca89b24144a938215 (patch) | |
tree | 9f8e6a28724514b6fdf463a9ab2067a7ef309b72 /venv/lib/python3.7/site-packages/pip-10.0.1-py3.7.egg/pip/_vendor/requests/exceptions.py | |
parent | 842a8cfbbbdb1f92889d892e4859dbd5d40c5be8 (diff) |
removing venv files
Diffstat (limited to 'venv/lib/python3.7/site-packages/pip-10.0.1-py3.7.egg/pip/_vendor/requests/exceptions.py')
-rw-r--r-- | venv/lib/python3.7/site-packages/pip-10.0.1-py3.7.egg/pip/_vendor/requests/exceptions.py | 122 |
1 files changed, 0 insertions, 122 deletions
diff --git a/venv/lib/python3.7/site-packages/pip-10.0.1-py3.7.egg/pip/_vendor/requests/exceptions.py b/venv/lib/python3.7/site-packages/pip-10.0.1-py3.7.egg/pip/_vendor/requests/exceptions.py deleted file mode 100644 index 377c4c2..0000000 --- a/venv/lib/python3.7/site-packages/pip-10.0.1-py3.7.egg/pip/_vendor/requests/exceptions.py +++ /dev/null | |||
@@ -1,122 +0,0 @@ | |||
1 | # -*- coding: utf-8 -*- | ||
2 | |||
3 | """ | ||
4 | requests.exceptions | ||
5 | ~~~~~~~~~~~~~~~~~~~ | ||
6 | |||
7 | This module contains the set of Requests' exceptions. | ||
8 | """ | ||
9 | from pip._vendor.urllib3.exceptions import HTTPError as BaseHTTPError | ||
10 | |||
11 | |||
12 | class RequestException(IOError): | ||
13 | """There was an ambiguous exception that occurred while handling your | ||
14 | request. | ||
15 | """ | ||
16 | |||
17 | def __init__(self, *args, **kwargs): | ||
18 | """Initialize RequestException with `request` and `response` objects.""" | ||
19 | response = kwargs.pop('response', None) | ||
20 | self.response = response | ||
21 | self.request = kwargs.pop('request', None) | ||
22 | if (response is not None and not self.request and | ||
23 | hasattr(response, 'request')): | ||
24 | self.request = self.response.request | ||
25 | super(RequestException, self).__init__(*args, **kwargs) | ||
26 | |||
27 | |||
28 | class HTTPError(RequestException): | ||
29 | """An HTTP error occurred.""" | ||
30 | |||
31 | |||
32 | class ConnectionError(RequestException): | ||
33 | """A Connection error occurred.""" | ||
34 | |||
35 | |||
36 | class ProxyError(ConnectionError): | ||
37 | """A proxy error occurred.""" | ||
38 | |||
39 | |||
40 | class SSLError(ConnectionError): | ||
41 | """An SSL error occurred.""" | ||
42 | |||
43 | |||
44 | class Timeout(RequestException): | ||
45 | """The request timed out. | ||
46 | |||
47 | Catching this error will catch both | ||
48 | :exc:`~requests.exceptions.ConnectTimeout` and | ||
49 | :exc:`~requests.exceptions.ReadTimeout` errors. | ||
50 | """ | ||
51 | |||
52 | |||
53 | class ConnectTimeout(ConnectionError, Timeout): | ||
54 | """The request timed out while trying to connect to the remote server. | ||
55 | |||
56 | Requests that produced this error are safe to retry. | ||
57 | """ | ||
58 | |||
59 | |||
60 | class ReadTimeout(Timeout): | ||
61 | """The server did not send any data in the allotted amount of time.""" | ||
62 | |||
63 | |||
64 | class URLRequired(RequestException): | ||
65 | """A valid URL is required to make a request.""" | ||
66 | |||
67 | |||
68 | class TooManyRedirects(RequestException): | ||
69 | """Too many redirects.""" | ||
70 | |||
71 | |||
72 | class MissingSchema(RequestException, ValueError): | ||
73 | """The URL schema (e.g. http or https) is missing.""" | ||
74 | |||
75 | |||
76 | class InvalidSchema(RequestException, ValueError): | ||
77 | """See defaults.py for valid schemas.""" | ||
78 | |||
79 | |||
80 | class InvalidURL(RequestException, ValueError): | ||
81 | """The URL provided was somehow invalid.""" | ||
82 | |||
83 | |||
84 | class InvalidHeader(RequestException, ValueError): | ||
85 | """The header value provided was somehow invalid.""" | ||
86 | |||
87 | |||
88 | class ChunkedEncodingError(RequestException): | ||
89 | """The server declared chunked encoding but sent an invalid chunk.""" | ||
90 | |||
91 | |||
92 | class ContentDecodingError(RequestException, BaseHTTPError): | ||
93 | """Failed to decode response content""" | ||
94 | |||
95 | |||
96 | class StreamConsumedError(RequestException, TypeError): | ||
97 | """The content for this response was already consumed""" | ||
98 | |||
99 | |||
100 | class RetryError(RequestException): | ||
101 | """Custom retries logic failed""" | ||
102 | |||
103 | |||
104 | class UnrewindableBodyError(RequestException): | ||
105 | """Requests encountered an error when trying to rewind a body""" | ||
106 | |||
107 | # Warnings | ||
108 | |||
109 | |||
110 | class RequestsWarning(Warning): | ||
111 | """Base warning for Requests.""" | ||
112 | pass | ||
113 | |||
114 | |||
115 | class FileModeWarning(RequestsWarning, DeprecationWarning): | ||
116 | """A file was opened in text mode, but Requests determined its binary length.""" | ||
117 | pass | ||
118 | |||
119 | |||
120 | class RequestsDependencyWarning(RequestsWarning): | ||
121 | """An imported dependency doesn't match the expected version range.""" | ||
122 | pass | ||