From 46ab77eb20c4fc4d357c4691ac113b1ed431b4e3 Mon Sep 17 00:00:00 2001 From: Jelle Zijlstra Date: Thu, 20 Dec 2018 15:24:03 -0800 Subject: [PATCH] loop argument to asyncio.ensure_future is Optional (#2708) The default value is None: https://github.com/python/cpython/blob/master/Lib/asyncio/tasks.py#L616. --- stdlib/3/asyncio/tasks.pyi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stdlib/3/asyncio/tasks.pyi b/stdlib/3/asyncio/tasks.pyi index 6a193f428..6fe13f57e 100644 --- a/stdlib/3/asyncio/tasks.pyi +++ b/stdlib/3/asyncio/tasks.pyi @@ -24,7 +24,7 @@ ALL_COMPLETED: str def as_completed(fs: Sequence[_FutureT[_T]], *, loop: AbstractEventLoop = ..., timeout: Optional[float] = ...) -> Iterator[Future[_T]]: ... def ensure_future(coro_or_future: _FutureT[_T], - *, loop: AbstractEventLoop = ...) -> Future[_T]: ... + *, loop: Optional[AbstractEventLoop] = ...) -> Future[_T]: ... # Prior to Python 3.7 'async' was an alias for 'ensure_future'. # It became a keyword in 3.7. @overload