Make loop optional in asyncio.Queue (#2923)

Default value is `None`, so `loop` should be optional.
This commit is contained in:
Yegor Roganov
2019-04-14 22:43:33 +03:00
committed by Jelle Zijlstra
parent cf88c79a93
commit 4cd9a8ef91

View File

@@ -2,7 +2,7 @@ import sys
from asyncio.events import AbstractEventLoop
from .coroutines import coroutine
from .futures import Future
from typing import Any, Generator, Generic, List, TypeVar
from typing import Any, Generator, Generic, List, TypeVar, Optional
__all__: List[str]
@@ -13,7 +13,7 @@ class QueueFull(Exception): ...
_T = TypeVar('_T')
class Queue(Generic[_T]):
def __init__(self, maxsize: int = ..., *, loop: AbstractEventLoop = ...) -> None: ...
def __init__(self, maxsize: int = ..., *, loop: Optional[AbstractEventLoop] = ...) -> None: ...
def _init(self, maxsize: int) -> None: ...
def _get(self) -> _T: ...
def _put(self, item: _T) -> None: ...