Skip to content

Commit

Permalink
Relax signature of gather(). Fixes #675
Browse files Browse the repository at this point in the history
  • Loading branch information
Guido van Rossum committed Nov 10, 2016
1 parent dfe4bf0 commit 83184f3
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions stdlib/3.4/asyncio/tasks.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,10 @@ def as_completed(fs: Sequence[Future[_T]], *, loop: AbstractEventLoop = ...,
timeout=None) -> Iterator[Generator[Any, None, _T]]: ...
def ensure_future(coro_or_future: Union[Future[_T], Generator[Any, None, _T]],
*, loop: AbstractEventLoop = ...) -> Future[_T]: ...
def gather(*coros_or_futures: Union[Future[_T], Generator[Any, None, _T], Awaitable[_T]],
loop: AbstractEventLoop = ..., return_exceptions: bool = False) -> Future[List[_T]]: ...
# TODO: gather() should use variadic type vars instead of _TAny.
_TAny = Any
def gather(*coros_or_futures: Union[Future[_TAny], Generator[Any, None, _TAny], Awaitable[_TAny]],
loop: AbstractEventLoop = ..., return_exceptions: bool = False) -> Future[List[_TAny]]: ...
def run_coroutine_threadsafe(coro: Union[Generator[Any, None, _T], Coroutine[Any, None, _T], Awaitable[_T]],
loop: AbstractEventLoop) -> concurrent.futures.Future[_T]: ...
def shield(arg: Union[Future[_T], Generator[Any, None, _T]],
Expand Down

0 comments on commit 83184f3

Please sign in to comment.