diff --git a/.github/workflows/daily.yml b/.github/workflows/daily.yml index e8d36dbcfe85..516e6a2633b9 100644 --- a/.github/workflows/daily.yml +++ b/.github/workflows/daily.yml @@ -35,8 +35,7 @@ jobs: strategy: matrix: os: ["ubuntu-latest", "windows-latest", "macos-latest"] - # TODO: unpin the patch versions of Python 3.13/3.14 once stubtest failures are fixed - python-version: ["3.10", "3.11", "3.12", "3.13.12", "3.14.3"] + python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"] fail-fast: false steps: diff --git a/.github/workflows/stubtest_stdlib.yml b/.github/workflows/stubtest_stdlib.yml index 99f4c5ff9d6a..db679c9971cd 100644 --- a/.github/workflows/stubtest_stdlib.yml +++ b/.github/workflows/stubtest_stdlib.yml @@ -31,8 +31,7 @@ jobs: strategy: matrix: os: ["ubuntu-latest", "windows-latest", "macos-latest"] - # TODO: unpin the patch versions of Python 3.13/3.14 once stubtest failures are fixed - python-version: ["3.10", "3.11", "3.12", "3.13.12", "3.14.3"] + python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"] fail-fast: false steps: diff --git a/stdlib/@tests/stubtest_allowlists/darwin-py313.txt b/stdlib/@tests/stubtest_allowlists/darwin-py313.txt index bb7f4bba4c2f..681f65781662 100644 --- a/stdlib/@tests/stubtest_allowlists/darwin-py313.txt +++ b/stdlib/@tests/stubtest_allowlists/darwin-py313.txt @@ -1,3 +1,13 @@ +# ============= +# 3.13 and 3.14 +# ============= + +# Starting with Python 3.13.13, these methods accept None for the "scheduler" +# and "setpgroup" parameters, but would raise a TypeError with Python 3.13.12 +# and earlier. For compatibility reasons, we don't allow None in the stubs. +os.posix_spawn +os.posix_spawnp + # ======= # >= 3.13 # ======= diff --git a/stdlib/@tests/stubtest_allowlists/darwin-py314.txt b/stdlib/@tests/stubtest_allowlists/darwin-py314.txt index ddd16a1acb74..b651b2826e49 100644 --- a/stdlib/@tests/stubtest_allowlists/darwin-py314.txt +++ b/stdlib/@tests/stubtest_allowlists/darwin-py314.txt @@ -1,3 +1,13 @@ +# ============= +# 3.13 and 3.14 +# ============= + +# Starting with Python 3.14.4, these methods accept None for the "scheduler" +# and "setpgroup" parameters, but would raise a TypeError with Python 3.13.12 +# and earlier. For compatibility reasons, we don't allow None in the stubs. +os.posix_spawn +os.posix_spawnp + # ========= # 3.14 only # ========= diff --git a/stdlib/@tests/stubtest_allowlists/linux-py313.txt b/stdlib/@tests/stubtest_allowlists/linux-py313.txt new file mode 100644 index 000000000000..4fccdd15a0b5 --- /dev/null +++ b/stdlib/@tests/stubtest_allowlists/linux-py313.txt @@ -0,0 +1,9 @@ +# ============= +# 3.13 and 3.14 +# ============= + +# Starting with Python 3.13.13, these methods accept None for the "scheduler" +# and "setpgroup" parameters, but would raise a TypeError with Python 3.13.12 +# and earlier. For compatibility reasons, we don't allow None in the stubs. +os.posix_spawn +os.posix_spawnp diff --git a/stdlib/@tests/stubtest_allowlists/linux-py314.txt b/stdlib/@tests/stubtest_allowlists/linux-py314.txt index 98f33e427a30..cf414e9a9b3b 100644 --- a/stdlib/@tests/stubtest_allowlists/linux-py314.txt +++ b/stdlib/@tests/stubtest_allowlists/linux-py314.txt @@ -1,3 +1,13 @@ +# ============= +# 3.13 and 3.14 +# ============= + +# Starting with Python 3.14.4, these methods accept None for the "scheduler" +# and "setpgroup" parameters, but would raise a TypeError with Python 3.13.12 +# and earlier. For compatibility reasons, we don't allow None in the stubs. +os.posix_spawn +os.posix_spawnp + # ========= # 3.14 only # ========= diff --git a/stdlib/os/__init__.pyi b/stdlib/os/__init__.pyi index 4117a9bf74eb..66a9d1dd3bc6 100644 --- a/stdlib/os/__init__.pyi +++ b/stdlib/os/__init__.pyi @@ -1532,7 +1532,36 @@ else: def WSTOPSIG(status: int) -> int: ... def WTERMSIG(status: int) -> int: ... - if sys.version_info >= (3, 13): + if sys.version_info >= (3, 15): + def posix_spawn( + path: StrOrBytesPath, + argv: _ExecVArgs, + env: _ExecEnv | None, + /, + *, + file_actions: Sequence[tuple[Any, ...]] | None = (), + setpgroup: int | None = None, # None allowed starting in 3.15 + resetids: bool = False, + setsid: bool = False, + setsigmask: Iterable[int] = (), + setsigdef: Iterable[int] = (), + scheduler: tuple[Any, sched_param] | None = None, # None allowed starting in 3.15 + ) -> int: ... + def posix_spawnp( + path: StrOrBytesPath, + argv: _ExecVArgs, + env: _ExecEnv | None, + /, + *, + file_actions: Sequence[tuple[Any, ...]] | None = (), + setpgroup: int | None = None, # None allowed starting in 3.15 + resetids: bool = False, + setsid: bool = False, + setsigmask: Iterable[int] = (), + setsigdef: Iterable[int] = (), + scheduler: tuple[Any, sched_param] | None = None, # None allowed starting in 3.15 + ) -> int: ... + elif sys.version_info >= (3, 13): def posix_spawn( path: StrOrBytesPath, argv: _ExecVArgs,