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/urllib3/__init__.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/urllib3/__init__.py')
-rw-r--r-- | venv/lib/python3.7/site-packages/pip-10.0.1-py3.7.egg/pip/_vendor/urllib3/__init__.py | 97 |
1 files changed, 0 insertions, 97 deletions
diff --git a/venv/lib/python3.7/site-packages/pip-10.0.1-py3.7.egg/pip/_vendor/urllib3/__init__.py b/venv/lib/python3.7/site-packages/pip-10.0.1-py3.7.egg/pip/_vendor/urllib3/__init__.py deleted file mode 100644 index 1bffade..0000000 --- a/venv/lib/python3.7/site-packages/pip-10.0.1-py3.7.egg/pip/_vendor/urllib3/__init__.py +++ /dev/null | |||
@@ -1,97 +0,0 @@ | |||
1 | """ | ||
2 | urllib3 - Thread-safe connection pooling and re-using. | ||
3 | """ | ||
4 | |||
5 | from __future__ import absolute_import | ||
6 | import warnings | ||
7 | |||
8 | from .connectionpool import ( | ||
9 | HTTPConnectionPool, | ||
10 | HTTPSConnectionPool, | ||
11 | connection_from_url | ||
12 | ) | ||
13 | |||
14 | from . import exceptions | ||
15 | from .filepost import encode_multipart_formdata | ||
16 | from .poolmanager import PoolManager, ProxyManager, proxy_from_url | ||
17 | from .response import HTTPResponse | ||
18 | from .util.request import make_headers | ||
19 | from .util.url import get_host | ||
20 | from .util.timeout import Timeout | ||
21 | from .util.retry import Retry | ||
22 | |||
23 | |||
24 | # Set default logging handler to avoid "No handler found" warnings. | ||
25 | import logging | ||
26 | try: # Python 2.7+ | ||
27 | from logging import NullHandler | ||
28 | except ImportError: | ||
29 | class NullHandler(logging.Handler): | ||
30 | def emit(self, record): | ||
31 | pass | ||
32 | |||
33 | __author__ = 'Andrey Petrov (andrey.petrov@shazow.net)' | ||
34 | __license__ = 'MIT' | ||
35 | __version__ = '1.22' | ||
36 | |||
37 | __all__ = ( | ||
38 | 'HTTPConnectionPool', | ||
39 | 'HTTPSConnectionPool', | ||
40 | 'PoolManager', | ||
41 | 'ProxyManager', | ||
42 | 'HTTPResponse', | ||
43 | 'Retry', | ||
44 | 'Timeout', | ||
45 | 'add_stderr_logger', | ||
46 | 'connection_from_url', | ||
47 | 'disable_warnings', | ||
48 | 'encode_multipart_formdata', | ||
49 | 'get_host', | ||
50 | 'make_headers', | ||
51 | 'proxy_from_url', | ||
52 | ) | ||
53 | |||
54 | logging.getLogger(__name__).addHandler(NullHandler()) | ||
55 | |||
56 | |||
57 | def add_stderr_logger(level=logging.DEBUG): | ||
58 | """ | ||
59 | Helper for quickly adding a StreamHandler to the logger. Useful for | ||
60 | debugging. | ||
61 | |||
62 | Returns the handler after adding it. | ||
63 | """ | ||
64 | # This method needs to be in this __init__.py to get the __name__ correct | ||
65 | # even if urllib3 is vendored within another package. | ||
66 | logger = logging.getLogger(__name__) | ||
67 | handler = logging.StreamHandler() | ||
68 | handler.setFormatter(logging.Formatter('%(asctime)s %(levelname)s %(message)s')) | ||
69 | logger.addHandler(handler) | ||
70 | logger.setLevel(level) | ||
71 | logger.debug('Added a stderr logging handler to logger: %s', __name__) | ||
72 | return handler | ||
73 | |||
74 | |||
75 | # ... Clean up. | ||
76 | del NullHandler | ||
77 | |||
78 | |||
79 | # All warning filters *must* be appended unless you're really certain that they | ||
80 | # shouldn't be: otherwise, it's very hard for users to use most Python | ||
81 | # mechanisms to silence them. | ||
82 | # SecurityWarning's always go off by default. | ||
83 | warnings.simplefilter('always', exceptions.SecurityWarning, append=True) | ||
84 | # SubjectAltNameWarning's should go off once per host | ||
85 | warnings.simplefilter('default', exceptions.SubjectAltNameWarning, append=True) | ||
86 | # InsecurePlatformWarning's don't vary between requests, so we keep it default. | ||
87 | warnings.simplefilter('default', exceptions.InsecurePlatformWarning, | ||
88 | append=True) | ||
89 | # SNIMissingWarnings should go off only once. | ||
90 | warnings.simplefilter('default', exceptions.SNIMissingWarning, append=True) | ||
91 | |||
92 | |||
93 | def disable_warnings(category=exceptions.HTTPWarning): | ||
94 | """ | ||
95 | Helper for quickly disabling all urllib3 warnings. | ||
96 | """ | ||
97 | warnings.simplefilter('ignore', category) | ||