mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-24 21:01:52 +08:00
Remove asyncio.tasks.async (#2296)
While this alias for ensure_future existed prior to Python 3.7, it causes a syntax error when parsing it with Python 3.7 or above.
This commit is contained in:
committed by
Guido van Rossum
parent
ce1504d9e9
commit
d3865574a9
@@ -46,7 +46,6 @@ from asyncio.tasks import (
|
||||
ALL_COMPLETED as ALL_COMPLETED,
|
||||
as_completed as as_completed,
|
||||
ensure_future as ensure_future,
|
||||
async as async,
|
||||
gather as gather,
|
||||
run_coroutine_threadsafe as run_coroutine_threadsafe,
|
||||
shield as shield,
|
||||
|
||||
@@ -24,7 +24,8 @@ def as_completed(fs: Sequence[_FutureT[_T]], *, loop: AbstractEventLoop = ...,
|
||||
timeout: Optional[float] = ...) -> Iterator[Generator[Any, None, _T]]: ...
|
||||
def ensure_future(coro_or_future: _FutureT[_T],
|
||||
*, loop: AbstractEventLoop = ...) -> Future[_T]: ...
|
||||
async = ensure_future
|
||||
# Prior to Python 3.7 'async' was an alias for 'ensure_future'.
|
||||
# It became a keyword in 3.7.
|
||||
@overload
|
||||
def gather(coro_or_future1: _FutureT[_T1],
|
||||
*, loop: AbstractEventLoop = ..., return_exceptions: bool = ...) -> Future[Tuple[_T1]]: ...
|
||||
|
||||
Reference in New Issue
Block a user