From d8822689f79e893c9e0a644f81af3a4a79ef0017 Mon Sep 17 00:00:00 2001 From: Stephen Morton Date: Wed, 25 Dec 2024 14:25:39 -0800 Subject: [PATCH] fix stubs for `asyncio.BaseEventLoop.subprocess_exec` (#13220) --- stdlib/@tests/stubtest_allowlists/common.txt | 2 -- stdlib/asyncio/base_events.pyi | 1 + 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/stdlib/@tests/stubtest_allowlists/common.txt b/stdlib/@tests/stubtest_allowlists/common.txt index d42b1e05a..6876e60e4 100644 --- a/stdlib/@tests/stubtest_allowlists/common.txt +++ b/stdlib/@tests/stubtest_allowlists/common.txt @@ -9,8 +9,6 @@ _collections_abc.AsyncGenerator.ag_code _collections_abc.AsyncGenerator.ag_frame _collections_abc.AsyncGenerator.ag_running asyncio.__all__ -asyncio.BaseEventLoop.subprocess_exec # BaseEventLoop adds several parameters and stubtest fails on the difference if we add them -asyncio.base_events.BaseEventLoop.subprocess_exec # BaseEventLoop adds several parameters and stubtest fails on the difference if we add them builtins.dict.get collections\.ChainMap\.fromkeys # https://github.com/python/mypy/issues/17023 contextlib._GeneratorContextManagerBase.__init__ # skipped in the stubs in favor of its child classes diff --git a/stdlib/asyncio/base_events.pyi b/stdlib/asyncio/base_events.pyi index cba2c7799..8d033a04b 100644 --- a/stdlib/asyncio/base_events.pyi +++ b/stdlib/asyncio/base_events.pyi @@ -452,6 +452,7 @@ class BaseEventLoop(AbstractEventLoop): bufsize: Literal[0] = 0, encoding: None = None, errors: None = None, + text: Literal[False] | None = None, **kwargs: Any, ) -> tuple[SubprocessTransport, _ProtocolT]: ... def add_reader(self, fd: FileDescriptorLike, callback: Callable[[Unpack[_Ts]], Any], *args: Unpack[_Ts]) -> None: ...