massive update, probably broken
[dotfiles/.git] / .config / coc / extensions / node_modules / coc-pyright / node_modules / pyright / dist / typeshed-fallback / stubs / requests / requests / packages / urllib3 / connection.pyi
1 import ssl
2 import sys
3 from typing import Any
4
5 from . import exceptions, util
6 from .packages import ssl_match_hostname
7 from .util import ssl_
8
9 if sys.version_info >= (3, 0):
10     from builtins import ConnectionError as ConnectionError
11     from http.client import HTTPConnection as _HTTPConnection, HTTPException as HTTPException
12 else:
13     from httplib import HTTPConnection as _HTTPConnection, HTTPException as HTTPException
14     class ConnectionError(Exception): ...
15
16 class DummyConnection: ...
17
18 BaseSSLError = ssl.SSLError
19
20 ConnectTimeoutError = exceptions.ConnectTimeoutError
21 SystemTimeWarning = exceptions.SystemTimeWarning
22 SecurityWarning = exceptions.SecurityWarning
23 match_hostname = ssl_match_hostname.match_hostname
24 resolve_cert_reqs = ssl_.resolve_cert_reqs
25 resolve_ssl_version = ssl_.resolve_ssl_version
26 ssl_wrap_socket = ssl_.ssl_wrap_socket
27 assert_fingerprint = ssl_.assert_fingerprint
28 connection = util.connection
29
30 port_by_scheme: Any
31 RECENT_DATE: Any
32
33 class HTTPConnection(_HTTPConnection):
34     default_port: Any
35     default_socket_options: Any
36     is_verified: Any
37     source_address: Any
38     socket_options: Any
39     def __init__(self, *args, **kw) -> None: ...
40     def connect(self): ...
41
42 class HTTPSConnection(HTTPConnection):
43     default_port: Any
44     key_file: Any
45     cert_file: Any
46     def __init__(self, host, port=..., key_file=..., cert_file=..., strict=..., timeout=..., **kw) -> None: ...
47     sock: Any
48     def connect(self): ...
49
50 class VerifiedHTTPSConnection(HTTPSConnection):
51     cert_reqs: Any
52     ca_certs: Any
53     ssl_version: Any
54     assert_fingerprint: Any
55     key_file: Any
56     cert_file: Any
57     assert_hostname: Any
58     def set_cert(self, key_file=..., cert_file=..., cert_reqs=..., ca_certs=..., assert_hostname=..., assert_fingerprint=...): ...
59     sock: Any
60     auto_open: Any
61     is_verified: Any
62     def connect(self): ...
63
64 UnverifiedHTTPSConnection = HTTPSConnection