mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-01-28 05:42:10 +08:00
committed by
Jelle Zijlstra
parent
8794e40d41
commit
0177dedc42
@@ -138,32 +138,33 @@ else:
|
||||
|
||||
# This is an API stub only for the class below, not a class itself.
|
||||
# urllib.request uses it for a parameter.
|
||||
class HTTPConnectionProtocol(Protocol):
|
||||
class _HTTPConnectionProtocol(Protocol):
|
||||
if sys.version_info >= (3, 7):
|
||||
def __call__(self, host: str, port: Optional[int] = ...,
|
||||
timeout: int = ...,
|
||||
timeout: float = ...,
|
||||
source_address: Optional[Tuple[str, int]] = ...,
|
||||
blocksize: int = ...): ...
|
||||
else:
|
||||
def __call__(self, host: str, port: Optional[int] = ...,
|
||||
timeout: int = ...,
|
||||
timeout: float = ...,
|
||||
source_address: Optional[Tuple[str, int]] = ...): ...
|
||||
|
||||
class HTTPConnection:
|
||||
host: str = ...
|
||||
port: int = ...
|
||||
timeout: float
|
||||
host: str
|
||||
port: int
|
||||
if sys.version_info >= (3, 7):
|
||||
def __init__(
|
||||
self,
|
||||
host: str, port: Optional[int] = ...,
|
||||
timeout: int = ...,
|
||||
timeout: float = ...,
|
||||
source_address: Optional[Tuple[str, int]] = ..., blocksize: int = ...
|
||||
) -> None: ...
|
||||
else:
|
||||
def __init__(
|
||||
self,
|
||||
host: str, port: Optional[int] = ...,
|
||||
timeout: int = ...,
|
||||
timeout: float = ...,
|
||||
source_address: Optional[Tuple[str, int]] = ...
|
||||
) -> None: ...
|
||||
if sys.version_info >= (3, 6):
|
||||
@@ -196,7 +197,7 @@ class HTTPSConnection(HTTPConnection):
|
||||
host: str, port: Optional[int] = ...,
|
||||
key_file: Optional[str] = ...,
|
||||
cert_file: Optional[str] = ...,
|
||||
timeout: int = ...,
|
||||
timeout: float = ...,
|
||||
source_address: Optional[Tuple[str, int]] = ...,
|
||||
*, context: Optional[ssl.SSLContext] = ...,
|
||||
check_hostname: Optional[bool] = ...) -> None: ...
|
||||
|
||||
Reference in New Issue
Block a user