Update typing_extensions imports in stdlib (#11244)

Co-authored-by: AlexWaygood <alex.waygood@gmail.com>
This commit is contained in:
Sebastian Rittau
2024-01-05 17:15:19 +01:00
committed by GitHub
parent b6eaadcfe5
commit 53a8193d64
214 changed files with 365 additions and 430 deletions

View File

@@ -10,8 +10,8 @@ from asyncio.transports import BaseTransport, DatagramTransport, ReadTransport,
from collections.abc import Callable, Iterable, Sequence
from contextvars import Context
from socket import AddressFamily, SocketKind, _Address, _RetAddress, socket
from typing import IO, Any, TypeVar, overload
from typing_extensions import Literal, TypeAlias, TypeVarTuple, Unpack
from typing import IO, Any, Literal, TypeVar, overload
from typing_extensions import TypeAlias, TypeVarTuple, Unpack
if sys.version_info >= (3, 9):
__all__ = ("BaseEventLoop", "Server")

View File

@@ -1,7 +1,6 @@
from collections.abc import Callable, Sequence
from contextvars import Context
from typing import Any
from typing_extensions import Literal
from typing import Any, Literal
from . import futures

View File

@@ -1,6 +1,6 @@
import enum
import sys
from typing_extensions import Literal
from typing import Literal
LOG_THRESHOLD_FOR_CONNLOST_WRITES: Literal[5]
ACCEPT_RETRY_DELAY: Literal[1]

View File

@@ -5,8 +5,8 @@ from abc import ABCMeta, abstractmethod
from collections.abc import Callable, Coroutine, Generator, Sequence
from contextvars import Context
from socket import AddressFamily, SocketKind, _Address, _RetAddress, socket
from typing import IO, Any, Protocol, TypeVar, overload
from typing_extensions import Literal, Self, TypeAlias, TypeVarTuple, Unpack, deprecated
from typing import IO, Any, Literal, Protocol, TypeVar, overload
from typing_extensions import Self, TypeAlias, TypeVarTuple, Unpack, deprecated
from . import _AwaitableLike, _CoroutineLike
from .base_events import Server

View File

@@ -2,8 +2,8 @@ import sys
from collections.abc import Awaitable, Callable, Generator, Iterable
from concurrent.futures._base import Future as _ConcurrentFuture
from contextvars import Context
from typing import Any, TypeVar
from typing_extensions import Literal, Self, TypeGuard
from typing import Any, Literal, TypeVar
from typing_extensions import Self, TypeGuard
from .events import AbstractEventLoop

View File

@@ -4,8 +4,8 @@ from _typeshed import Unused
from collections import deque
from collections.abc import Callable, Generator
from types import TracebackType
from typing import Any, TypeVar
from typing_extensions import Literal, Self
from typing import Any, Literal, TypeVar
from typing_extensions import Self
from .events import AbstractEventLoop
from .futures import Future

View File

@@ -1,8 +1,7 @@
import sys
from collections.abc import Mapping
from socket import socket
from typing import Any, ClassVar
from typing_extensions import Literal
from typing import Any, ClassVar, Literal
from . import base_events, constants, events, futures, streams, transports

View File

@@ -2,8 +2,8 @@ import sys
from _typeshed import Unused
from collections.abc import Callable, Coroutine
from contextvars import Context
from typing import Any, TypeVar
from typing_extensions import Self, final
from typing import Any, TypeVar, final
from typing_extensions import Self
from .events import AbstractEventLoop

View File

@@ -3,8 +3,8 @@ import sys
from collections import deque
from collections.abc import Callable
from enum import Enum
from typing import Any, ClassVar
from typing_extensions import Literal, TypeAlias
from typing import Any, ClassVar, Literal
from typing_extensions import TypeAlias
from . import constants, events, futures, protocols, transports

View File

@@ -2,8 +2,8 @@ import ssl
import sys
from _typeshed import StrPath
from collections.abc import AsyncIterator, Awaitable, Callable, Iterable, Sequence
from typing import Any
from typing_extensions import Self, SupportsIndex, TypeAlias
from typing import Any, SupportsIndex
from typing_extensions import Self, TypeAlias
from . import events, protocols, transports
from .base_events import Server

View File

@@ -3,8 +3,7 @@ import sys
from _typeshed import StrOrBytesPath
from asyncio import events, protocols, streams, transports
from collections.abc import Callable, Collection
from typing import IO, Any
from typing_extensions import Literal
from typing import IO, Any, Literal
__all__ = ("create_subprocess_exec", "create_subprocess_shell")

View File

@@ -2,8 +2,8 @@ import concurrent.futures
import sys
from collections.abc import Awaitable, Coroutine, Generator, Iterable, Iterator
from types import FrameType
from typing import Any, Protocol, TextIO, TypeVar, overload
from typing_extensions import Literal, TypeAlias
from typing import Any, Literal, Protocol, TextIO, TypeVar, overload
from typing_extensions import TypeAlias
from . import _CoroutineLike
from .events import AbstractEventLoop

View File

@@ -1,5 +1,6 @@
from types import TracebackType
from typing_extensions import Self, final
from typing import final
from typing_extensions import Self
__all__ = ("Timeout", "timeout", "timeout_at")

View File

@@ -2,7 +2,8 @@ import sys
import types
from abc import ABCMeta, abstractmethod
from collections.abc import Callable
from typing_extensions import Literal, Self, TypeVarTuple, Unpack, deprecated
from typing import Literal
from typing_extensions import Self, TypeVarTuple, Unpack, deprecated
from .events import AbstractEventLoop, BaseDefaultEventLoopPolicy
from .selector_events import BaseSelectorEventLoop

View File

@@ -2,8 +2,7 @@ import socket
import sys
from _typeshed import Incomplete, ReadableBuffer, WriteableBuffer
from collections.abc import Callable
from typing import IO, Any, ClassVar, NoReturn
from typing_extensions import Literal
from typing import IO, Any, ClassVar, Literal, NoReturn
from . import events, futures, proactor_events, selector_events, streams, windows_utils

View File

@@ -2,8 +2,8 @@ import subprocess
import sys
from collections.abc import Callable
from types import TracebackType
from typing import Any, AnyStr
from typing_extensions import Literal, Self
from typing import Any, AnyStr, Literal
from typing_extensions import Self
if sys.platform == "win32":
__all__ = ("pipe", "Popen", "PIPE", "PipeHandle")