Skip to content

Commit 6562381

Browse files
authored
Update _posixsubprocess module for 3.14 (#14127)
1 parent 9cba086 commit 6562381

File tree

3 files changed

+53
-28
lines changed

3 files changed

+53
-28
lines changed

stdlib/@tests/stubtest_allowlists/darwin-py314.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
# TODO: New errors in Python 3.14 that need to be fixed or moved below
33
# ====================================================================
44

5-
_posixsubprocess.fork_exec
65
asyncio.tools
76
asyncio.unix_events.__all__
87
asyncio.unix_events.DefaultEventLoopPolicy

stdlib/@tests/stubtest_allowlists/linux-py314.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
# TODO: New errors in Python 3.14 that need to be fixed or moved below
33
# ====================================================================
44

5-
_posixsubprocess.fork_exec
65
asyncio.tools
76
asyncio.unix_events.__all__
87
asyncio.unix_events.DefaultEventLoopPolicy

stdlib/_posixsubprocess.pyi

Lines changed: 53 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -4,29 +4,56 @@ from collections.abc import Callable, Sequence
44
from typing import SupportsIndex
55

66
if sys.platform != "win32":
7-
def fork_exec(
8-
args: Sequence[StrOrBytesPath] | None,
9-
executable_list: Sequence[bytes],
10-
close_fds: bool,
11-
pass_fds: tuple[int, ...],
12-
cwd: str,
13-
env: Sequence[bytes] | None,
14-
p2cread: int,
15-
p2cwrite: int,
16-
c2pread: int,
17-
c2pwrite: int,
18-
errread: int,
19-
errwrite: int,
20-
errpipe_read: int,
21-
errpipe_write: int,
22-
restore_signals: int,
23-
call_setsid: int,
24-
pgid_to_set: int,
25-
gid: SupportsIndex | None,
26-
extra_groups: list[int] | None,
27-
uid: SupportsIndex | None,
28-
child_umask: int,
29-
preexec_fn: Callable[[], None],
30-
allow_vfork: bool,
31-
/,
32-
) -> int: ...
7+
if sys.version_info >= (3, 14):
8+
def fork_exec(
9+
args: Sequence[StrOrBytesPath] | None,
10+
executable_list: Sequence[bytes],
11+
close_fds: bool,
12+
pass_fds: tuple[int, ...],
13+
cwd: str,
14+
env: Sequence[bytes] | None,
15+
p2cread: int,
16+
p2cwrite: int,
17+
c2pread: int,
18+
c2pwrite: int,
19+
errread: int,
20+
errwrite: int,
21+
errpipe_read: int,
22+
errpipe_write: int,
23+
restore_signals: int,
24+
call_setsid: int,
25+
pgid_to_set: int,
26+
gid: SupportsIndex | None,
27+
extra_groups: list[int] | None,
28+
uid: SupportsIndex | None,
29+
child_umask: int,
30+
preexec_fn: Callable[[], None],
31+
/,
32+
) -> int: ...
33+
else:
34+
def fork_exec(
35+
args: Sequence[StrOrBytesPath] | None,
36+
executable_list: Sequence[bytes],
37+
close_fds: bool,
38+
pass_fds: tuple[int, ...],
39+
cwd: str,
40+
env: Sequence[bytes] | None,
41+
p2cread: int,
42+
p2cwrite: int,
43+
c2pread: int,
44+
c2pwrite: int,
45+
errread: int,
46+
errwrite: int,
47+
errpipe_read: int,
48+
errpipe_write: int,
49+
restore_signals: bool,
50+
call_setsid: bool,
51+
pgid_to_set: int,
52+
gid: SupportsIndex | None,
53+
extra_groups: list[int] | None,
54+
uid: SupportsIndex | None,
55+
child_umask: int,
56+
preexec_fn: Callable[[], None],
57+
allow_vfork: bool,
58+
/,
59+
) -> int: ...

0 commit comments

Comments
 (0)