Remove Python 3.6 branches from typeshed (#8269)

This commit is contained in:
Alex Waygood
2022-07-11 09:55:17 +01:00
committed by GitHub
parent 29c17ffb47
commit edc0ecd857
114 changed files with 1016 additions and 2642 deletions

View File

@@ -11,7 +11,7 @@ from .base_events import Server
if sys.platform == "win32":
if sys.version_info >= (3, 8):
__all__ = ("StreamReader", "StreamWriter", "StreamReaderProtocol", "open_connection", "start_server")
elif sys.version_info >= (3, 7):
else:
__all__ = (
"StreamReader",
"StreamWriter",
@@ -21,16 +21,6 @@ if sys.platform == "win32":
"IncompleteReadError",
"LimitOverrunError",
)
else:
__all__ = [
"StreamReader",
"StreamWriter",
"StreamReaderProtocol",
"open_connection",
"start_server",
"IncompleteReadError",
"LimitOverrunError",
]
else:
if sys.version_info >= (3, 8):
__all__ = (
@@ -42,7 +32,7 @@ else:
"open_unix_connection",
"start_unix_server",
)
elif sys.version_info >= (3, 7):
else:
__all__ = (
"StreamReader",
"StreamWriter",
@@ -54,18 +44,6 @@ else:
"open_unix_connection",
"start_unix_server",
)
else:
__all__ = [
"StreamReader",
"StreamWriter",
"StreamReaderProtocol",
"open_connection",
"start_server",
"IncompleteReadError",
"LimitOverrunError",
"open_unix_connection",
"start_unix_server",
]
_ClientConnectedCallback: TypeAlias = Callable[[StreamReader, StreamWriter], Awaitable[None] | None]
@@ -120,24 +98,20 @@ else:
) -> Server: ...
if sys.platform != "win32":
if sys.version_info >= (3, 7):
_PathType: TypeAlias = StrPath
else:
_PathType: TypeAlias = str
if sys.version_info >= (3, 10):
async def open_unix_connection(
path: _PathType | None = ..., *, limit: int = ..., **kwds: Any
path: StrPath | None = ..., *, limit: int = ..., **kwds: Any
) -> tuple[StreamReader, StreamWriter]: ...
async def start_unix_server(
client_connected_cb: _ClientConnectedCallback, path: _PathType | None = ..., *, limit: int = ..., **kwds: Any
client_connected_cb: _ClientConnectedCallback, path: StrPath | None = ..., *, limit: int = ..., **kwds: Any
) -> Server: ...
else:
async def open_unix_connection(
path: _PathType | None = ..., *, loop: events.AbstractEventLoop | None = ..., limit: int = ..., **kwds: Any
path: StrPath | None = ..., *, loop: events.AbstractEventLoop | None = ..., limit: int = ..., **kwds: Any
) -> tuple[StreamReader, StreamWriter]: ...
async def start_unix_server(
client_connected_cb: _ClientConnectedCallback,
path: _PathType | None = ...,
path: StrPath | None = ...,
*,
loop: events.AbstractEventLoop | None = ...,
limit: int = ...,
@@ -174,10 +148,8 @@ class StreamWriter:
def write_eof(self) -> None: ...
def can_write_eof(self) -> bool: ...
def close(self) -> None: ...
if sys.version_info >= (3, 7):
def is_closing(self) -> bool: ...
async def wait_closed(self) -> None: ...
def is_closing(self) -> bool: ...
async def wait_closed(self) -> None: ...
def get_extra_info(self, name: str, default: Any = ...) -> Any: ...
async def drain(self) -> None: ...
if sys.version_info >= (3, 11):