From 0532e72e7f3262785d67a36f9f60eba462c67636 Mon Sep 17 00:00:00 2001 From: Shantanu Date: Wed, 22 Apr 2020 10:34:30 -0700 Subject: [PATCH] asyncio: mark positional-only args (#3934) --- stdlib/3/asyncio/futures.pyi | 6 +++--- stdlib/3/asyncio/tasks.pyi | 2 +- tests/stubtest_whitelists/py38.txt | 14 -------------- 3 files changed, 4 insertions(+), 18 deletions(-) diff --git a/stdlib/3/asyncio/futures.pyi b/stdlib/3/asyncio/futures.pyi index f4f97c607..cda5bdf05 100644 --- a/stdlib/3/asyncio/futures.pyi +++ b/stdlib/3/asyncio/futures.pyi @@ -52,9 +52,9 @@ class Future(Awaitable[_T], Iterable[_T]): def done(self) -> bool: ... def result(self) -> _T: ... def exception(self) -> Optional[BaseException]: ... - def remove_done_callback(self: _S, fn: Callable[[_S], Any]) -> int: ... - def set_result(self, result: _T) -> None: ... - def set_exception(self, exception: Union[type, BaseException]) -> None: ... + def remove_done_callback(self: _S, __fn: Callable[[_S], Any]) -> int: ... + def set_result(self, __result: _T) -> None: ... + def set_exception(self, __exception: Union[type, BaseException]) -> None: ... def _copy_state(self, other: Any) -> None: ... def __iter__(self) -> Generator[Any, None, _T]: ... def __await__(self) -> Generator[Any, None, _T]: ... diff --git a/stdlib/3/asyncio/tasks.pyi b/stdlib/3/asyncio/tasks.pyi index a209adfc1..424e78027 100644 --- a/stdlib/3/asyncio/tasks.pyi +++ b/stdlib/3/asyncio/tasks.pyi @@ -110,7 +110,7 @@ class Task(Future[_T], Generic[_T]): if sys.version_info >= (3, 8): def get_coro(self) -> Any: ... def get_name(self) -> str: ... - def set_name(self, value: object) -> None: ... + 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: ... diff --git a/tests/stubtest_whitelists/py38.txt b/tests/stubtest_whitelists/py38.txt index ae9e8702c..52858b37d 100644 --- a/tests/stubtest_whitelists/py38.txt +++ b/tests/stubtest_whitelists/py38.txt @@ -9,14 +9,7 @@ asyncio.AbstractEventLoop.sock_sendfile asyncio.Future.__init__ asyncio.Future._callbacks asyncio.Future._schedule_callbacks -asyncio.Future.remove_done_callback -asyncio.Future.set_exception -asyncio.Future.set_result asyncio.Handle.__init__ -asyncio.Task.remove_done_callback -asyncio.Task.set_exception -asyncio.Task.set_name -asyncio.Task.set_result asyncio.TimerHandle.__init__ asyncio.events.AbstractEventLoop.sock_sendfile asyncio.events.Handle.__init__ @@ -24,14 +17,7 @@ asyncio.events.TimerHandle.__init__ asyncio.futures.Future.__init__ asyncio.futures.Future._callbacks asyncio.futures.Future._schedule_callbacks -asyncio.futures.Future.remove_done_callback -asyncio.futures.Future.set_exception -asyncio.futures.Future.set_result asyncio.proactor_events._ProactorBasePipeTransport.__del__ -asyncio.tasks.Task.remove_done_callback -asyncio.tasks.Task.set_exception -asyncio.tasks.Task.set_name -asyncio.tasks.Task.set_result bdb.Bdb.runcall builtins.bytearray.extend builtins.bytearray.pop