massive update, probably broken
[dotfiles/.git] / .config / coc / extensions / node_modules / coc-pyright / node_modules / pyright / dist / typeshed-fallback / stubs / requests / requests / packages / urllib3 / connectionpool.pyi
1 from typing import Any
2
3 from . import connection, exceptions, request, response
4 from .connection import BaseSSLError as BaseSSLError, ConnectionError as ConnectionError, HTTPException as HTTPException
5 from .packages import ssl_match_hostname
6 from .util import connection as _connection, retry, timeout, url
7
8 ClosedPoolError = exceptions.ClosedPoolError
9 ProtocolError = exceptions.ProtocolError
10 EmptyPoolError = exceptions.EmptyPoolError
11 HostChangedError = exceptions.HostChangedError
12 LocationValueError = exceptions.LocationValueError
13 MaxRetryError = exceptions.MaxRetryError
14 ProxyError = exceptions.ProxyError
15 ReadTimeoutError = exceptions.ReadTimeoutError
16 SSLError = exceptions.SSLError
17 TimeoutError = exceptions.TimeoutError
18 InsecureRequestWarning = exceptions.InsecureRequestWarning
19 CertificateError = ssl_match_hostname.CertificateError
20 port_by_scheme = connection.port_by_scheme
21 DummyConnection = connection.DummyConnection
22 HTTPConnection = connection.HTTPConnection
23 HTTPSConnection = connection.HTTPSConnection
24 VerifiedHTTPSConnection = connection.VerifiedHTTPSConnection
25 RequestMethods = request.RequestMethods
26 HTTPResponse = response.HTTPResponse
27 is_connection_dropped = _connection.is_connection_dropped
28 Retry = retry.Retry
29 Timeout = timeout.Timeout
30 get_host = url.get_host
31
32 xrange: Any
33 log: Any
34
35 class ConnectionPool:
36     scheme: Any
37     QueueCls: Any
38     host: Any
39     port: Any
40     def __init__(self, host, port=...) -> None: ...
41     def __enter__(self): ...
42     def __exit__(self, exc_type, exc_val, exc_tb): ...
43     def close(self): ...
44
45 class HTTPConnectionPool(ConnectionPool, RequestMethods):
46     scheme: Any
47     ConnectionCls: Any
48     strict: Any
49     timeout: Any
50     retries: Any
51     pool: Any
52     block: Any
53     proxy: Any
54     proxy_headers: Any
55     num_connections: Any
56     num_requests: Any
57     conn_kw: Any
58     def __init__(
59         self,
60         host,
61         port=...,
62         strict=...,
63         timeout=...,
64         maxsize=...,
65         block=...,
66         headers=...,
67         retries=...,
68         _proxy=...,
69         _proxy_headers=...,
70         **conn_kw,
71     ) -> None: ...
72     def close(self): ...
73     def is_same_host(self, url): ...
74     def urlopen(
75         self,
76         method,
77         url,
78         body=...,
79         headers=...,
80         retries=...,
81         redirect=...,
82         assert_same_host=...,
83         timeout=...,
84         pool_timeout=...,
85         release_conn=...,
86         **response_kw,
87     ): ...
88
89 class HTTPSConnectionPool(HTTPConnectionPool):
90     scheme: Any
91     ConnectionCls: Any
92     key_file: Any
93     cert_file: Any
94     cert_reqs: Any
95     ca_certs: Any
96     ssl_version: Any
97     assert_hostname: Any
98     assert_fingerprint: Any
99     def __init__(
100         self,
101         host,
102         port=...,
103         strict=...,
104         timeout=...,
105         maxsize=...,
106         block=...,
107         headers=...,
108         retries=...,
109         _proxy=...,
110         _proxy_headers=...,
111         key_file=...,
112         cert_file=...,
113         cert_reqs=...,
114         ca_certs=...,
115         ssl_version=...,
116         assert_hostname=...,
117         assert_fingerprint=...,
118         **conn_kw,
119     ) -> None: ...
120
121 def connection_from_url(url, **kw): ...