mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-09 05:24:52 +08:00
Remove Python 3.6 branches from typeshed (#8269)
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
import email.message
|
||||
import io
|
||||
import ssl
|
||||
import sys
|
||||
import types
|
||||
from _typeshed import Self, WriteableBuffer
|
||||
from collections.abc import Callable, Iterable, Iterator, Mapping
|
||||
@@ -141,19 +140,14 @@ class HTTPResponse(io.BufferedIOBase, BinaryIO):
|
||||
# This is an API stub only for the class below, not a class itself.
|
||||
# urllib.request uses it for a parameter.
|
||||
class _HTTPConnectionProtocol(Protocol):
|
||||
if sys.version_info >= (3, 7):
|
||||
def __call__(
|
||||
self,
|
||||
host: str,
|
||||
port: int | None = ...,
|
||||
timeout: float = ...,
|
||||
source_address: tuple[str, int] | None = ...,
|
||||
blocksize: int = ...,
|
||||
) -> HTTPConnection: ...
|
||||
else:
|
||||
def __call__(
|
||||
self, host: str, port: int | None = ..., timeout: float = ..., source_address: tuple[str, int] | None = ...
|
||||
) -> HTTPConnection: ...
|
||||
def __call__(
|
||||
self,
|
||||
host: str,
|
||||
port: int | None = ...,
|
||||
timeout: float = ...,
|
||||
source_address: tuple[str, int] | None = ...,
|
||||
blocksize: int = ...,
|
||||
) -> HTTPConnection: ...
|
||||
|
||||
class HTTPConnection:
|
||||
auto_open: int # undocumented
|
||||
@@ -164,20 +158,14 @@ class HTTPConnection:
|
||||
host: str
|
||||
port: int
|
||||
sock: Any
|
||||
if sys.version_info >= (3, 7):
|
||||
def __init__(
|
||||
self,
|
||||
host: str,
|
||||
port: int | None = ...,
|
||||
timeout: float | None = ...,
|
||||
source_address: tuple[str, int] | None = ...,
|
||||
blocksize: int = ...,
|
||||
) -> None: ...
|
||||
else:
|
||||
def __init__(
|
||||
self, host: str, port: int | None = ..., timeout: float | None = ..., source_address: tuple[str, int] | None = ...
|
||||
) -> None: ...
|
||||
|
||||
def __init__(
|
||||
self,
|
||||
host: str,
|
||||
port: int | None = ...,
|
||||
timeout: float | None = ...,
|
||||
source_address: tuple[str, int] | None = ...,
|
||||
blocksize: int = ...,
|
||||
) -> None: ...
|
||||
def request(
|
||||
self, method: str, url: str, body: _DataType | None = ..., headers: Mapping[str, str] = ..., *, encode_chunked: bool = ...
|
||||
) -> None: ...
|
||||
@@ -192,33 +180,19 @@ class HTTPConnection:
|
||||
def send(self, data: _DataType) -> None: ...
|
||||
|
||||
class HTTPSConnection(HTTPConnection):
|
||||
if sys.version_info >= (3, 7):
|
||||
def __init__(
|
||||
self,
|
||||
host: str,
|
||||
port: int | None = ...,
|
||||
key_file: str | None = ...,
|
||||
cert_file: str | None = ...,
|
||||
timeout: float | None = ...,
|
||||
source_address: tuple[str, int] | None = ...,
|
||||
*,
|
||||
context: ssl.SSLContext | None = ...,
|
||||
check_hostname: bool | None = ...,
|
||||
blocksize: int = ...,
|
||||
) -> None: ...
|
||||
else:
|
||||
def __init__(
|
||||
self,
|
||||
host: str,
|
||||
port: int | None = ...,
|
||||
key_file: str | None = ...,
|
||||
cert_file: str | None = ...,
|
||||
timeout: float | None = ...,
|
||||
source_address: tuple[str, int] | None = ...,
|
||||
*,
|
||||
context: ssl.SSLContext | None = ...,
|
||||
check_hostname: bool | None = ...,
|
||||
) -> None: ...
|
||||
def __init__(
|
||||
self,
|
||||
host: str,
|
||||
port: int | None = ...,
|
||||
key_file: str | None = ...,
|
||||
cert_file: str | None = ...,
|
||||
timeout: float | None = ...,
|
||||
source_address: tuple[str, int] | None = ...,
|
||||
*,
|
||||
context: ssl.SSLContext | None = ...,
|
||||
check_hostname: bool | None = ...,
|
||||
blocksize: int = ...,
|
||||
) -> None: ...
|
||||
|
||||
class HTTPException(Exception): ...
|
||||
|
||||
|
||||
Reference in New Issue
Block a user