Skip to content

Commit 1ed616e

Browse files
committed
Remove typing.AwaitableGenerator
Part of #7580
1 parent be34e92 commit 1ed616e

File tree

1 file changed

+1
-12
lines changed

1 file changed

+1
-12
lines changed

stdlib/typing.pyi

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -577,7 +577,7 @@ class Awaitable(Protocol[_T_co]):
577577
@abstractmethod
578578
def __await__(self) -> Generator[Any, Any, _T_co]: ...
579579

580-
# Non-default variations to accommodate coroutines, and `AwaitableGenerator` having a 4th type parameter.
580+
# Non-default variations to accommodate coroutines having a 4th type parameter.
581581
_SendT_nd_contra = TypeVar("_SendT_nd_contra", contravariant=True)
582582
_ReturnT_nd_co = TypeVar("_ReturnT_nd_co", covariant=True)
583583

@@ -598,17 +598,6 @@ class Coroutine(Awaitable[_ReturnT_nd_co], Generic[_YieldT_co, _SendT_nd_contra,
598598
@abstractmethod
599599
def close(self) -> None: ...
600600

601-
# NOTE: This type does not exist in typing.py or PEP 484 but mypy needs it to exist.
602-
# The parameters correspond to Generator, but the 4th is the original type.
603-
# Obsolete, use _typeshed._type_checker_internals.AwaitableGenerator instead.
604-
@type_check_only
605-
class AwaitableGenerator(
606-
Awaitable[_ReturnT_nd_co],
607-
Generator[_YieldT_co, _SendT_nd_contra, _ReturnT_nd_co],
608-
Generic[_YieldT_co, _SendT_nd_contra, _ReturnT_nd_co, _S],
609-
metaclass=ABCMeta,
610-
): ...
611-
612601
@runtime_checkable
613602
class AsyncIterable(Protocol[_T_co]):
614603
@abstractmethod

0 commit comments

Comments
 (0)