From 16b98846017c07ebbca9c75c099cb4b6c6b11ad8 Mon Sep 17 00:00:00 2001 From: Nikita Sobolev Date: Sat, 30 Sep 2023 19:51:33 +0300 Subject: [PATCH] Fix `_posixsubprocess` module for python3.12 (#10809) --- stdlib/_posixsubprocess.pyi | 16 ++++++++-------- tests/stubtest_allowlists/darwin-py312.txt | 1 - tests/stubtest_allowlists/linux-py312.txt | 1 - 3 files changed, 8 insertions(+), 10 deletions(-) diff --git a/stdlib/_posixsubprocess.pyi b/stdlib/_posixsubprocess.pyi index ca95336bb..170806372 100644 --- a/stdlib/_posixsubprocess.pyi +++ b/stdlib/_posixsubprocess.pyi @@ -6,15 +6,15 @@ from typing_extensions import SupportsIndex if sys.platform != "win32": def cloexec_pipe() -> tuple[int, int]: ... def fork_exec( - __process_args: Sequence[StrOrBytesPath] | None, + __args: Sequence[StrOrBytesPath] | None, __executable_list: Sequence[bytes], __close_fds: bool, - __fds_to_keep: tuple[int, ...], - __cwd_obj: str, - __env_list: Sequence[bytes] | None, + __pass_fds: tuple[int, ...], + __cwd: str, + __env: Sequence[bytes] | None, __p2cread: int, __p2cwrite: int, - __c2pred: int, + __c2pread: int, __c2pwrite: int, __errread: int, __errwrite: int, @@ -23,9 +23,9 @@ if sys.platform != "win32": __restore_signals: int, __call_setsid: int, __pgid_to_set: int, - __gid_object: SupportsIndex | None, - __groups_list: list[int] | None, - __uid_object: SupportsIndex | None, + __gid: SupportsIndex | None, + __extra_groups: list[int] | None, + __uid: SupportsIndex | None, __child_umask: int, __preexec_fn: Callable[[], None], __allow_vfork: bool, diff --git a/tests/stubtest_allowlists/darwin-py312.txt b/tests/stubtest_allowlists/darwin-py312.txt index 96d02b206..e269cc199 100644 --- a/tests/stubtest_allowlists/darwin-py312.txt +++ b/tests/stubtest_allowlists/darwin-py312.txt @@ -1,5 +1,4 @@ _?curses.color_pair -_posixsubprocess.fork_exec (dbm.gnu)? (locale.bind_textdomain_codeset)? diff --git a/tests/stubtest_allowlists/linux-py312.txt b/tests/stubtest_allowlists/linux-py312.txt index f81ce1b08..8c7bc9af5 100644 --- a/tests/stubtest_allowlists/linux-py312.txt +++ b/tests/stubtest_allowlists/linux-py312.txt @@ -1,5 +1,4 @@ _?curses.color_pair -_posixsubprocess.fork_exec # Exists on some Linux builds, and is documented, # but is unavailable in Github Actions on Linux with Python 3.12