asyncio: update cancels for py39 (#4135)

Co-authored-by: hauntsaninja <>
This commit is contained in:
Shantanu
2020-05-28 13:42:31 -07:00
committed by GitHub
parent da2aa297a2
commit 62304eb02f
3 changed files with 8 additions and 6 deletions

View File

@@ -46,7 +46,10 @@ class Future(Awaitable[_T], Iterable[_T]):
@property
def _callbacks(self: _S) -> List[Callable[[_S], Any]]: ...
def add_done_callback(self: _S, __fn: Callable[[_S], Any]) -> None: ...
def cancel(self) -> bool: ...
if sys.version_info >= (3, 9):
def cancel(self, msg: Optional[str] = ...) -> bool: ...
else:
def cancel(self) -> bool: ...
def cancelled(self) -> bool: ...
def done(self) -> bool: ...
def result(self) -> _T: ...

View File

@@ -113,7 +113,10 @@ class Task(Future[_T], Generic[_T]):
def set_name(self, __value: object) -> None: ...
def get_stack(self, *, limit: int = ...) -> List[FrameType]: ...
def print_stack(self, *, limit: int = ..., file: TextIO = ...) -> None: ...
def cancel(self) -> bool: ...
if sys.version_info >= (3, 9):
def cancel(self, msg: Optional[str] = ...) -> bool: ...
else:
def cancel(self) -> bool: ...
if sys.version_info < (3, 7):
def _wakeup(self, fut: Future[Any]) -> None: ...

View File

@@ -16,18 +16,14 @@ ast.Str.__new__
asyncio.AbstractEventLoop.sock_sendfile
asyncio.Future.__init__
asyncio.Future._callbacks
asyncio.Future.cancel
asyncio.Handle.__init__
asyncio.Task.cancel
asyncio.TimerHandle.__init__
asyncio.events.AbstractEventLoop.sock_sendfile
asyncio.events.Handle.__init__
asyncio.events.TimerHandle.__init__
asyncio.futures.Future.__init__
asyncio.futures.Future._callbacks
asyncio.futures.Future.cancel
asyncio.proactor_events._ProactorBasePipeTransport.__del__
asyncio.tasks.Task.cancel
builtins.bytearray.extend
builtins.bytearray.pop
builtins.compile