From 6fb6a3be2bf3e2e7c26727eb92e74f7551b03382 Mon Sep 17 00:00:00 2001 From: Sebastian Rittau Date: Wed, 8 Apr 2026 13:31:39 +0200 Subject: [PATCH 1/4] Unpin Python 3.13 and 3.14 --- .github/workflows/daily.yml | 3 +-- .github/workflows/stubtest_stdlib.yml | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) 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: From 19c92fb4dddcabaaff911eaa304489bb3d06425d Mon Sep 17 00:00:00 2001 From: Sebastian Rittau Date: Wed, 8 Apr 2026 13:41:52 +0200 Subject: [PATCH 2/4] Add allowlist entries --- stdlib/@tests/stubtest_allowlists/darwin-py313.txt | 10 ++++++++++ stdlib/@tests/stubtest_allowlists/darwin-py314.txt | 10 ++++++++++ stdlib/@tests/stubtest_allowlists/linux-py313.txt | 9 +++++++++ stdlib/@tests/stubtest_allowlists/linux-py314.txt | 10 ++++++++++ 4 files changed, 39 insertions(+) create mode 100644 stdlib/@tests/stubtest_allowlists/linux-py313.txt diff --git a/stdlib/@tests/stubtest_allowlists/darwin-py313.txt b/stdlib/@tests/stubtest_allowlists/darwin-py313.txt index bb7f4bba4c2f..a30dbe44c563 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..67893f715ce7 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..4b0b9be1b721 --- /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..f692a878bc4a 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 # ========= From 00b5576c0a4536666416a1b3cfeebf7263ef64e6 Mon Sep 17 00:00:00 2001 From: Sebastian Rittau Date: Wed, 8 Apr 2026 13:42:53 +0200 Subject: [PATCH 3/4] Fix typos --- stdlib/@tests/stubtest_allowlists/darwin-py313.txt | 2 +- stdlib/@tests/stubtest_allowlists/darwin-py314.txt | 2 +- stdlib/@tests/stubtest_allowlists/linux-py313.txt | 2 +- stdlib/@tests/stubtest_allowlists/linux-py314.txt | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/stdlib/@tests/stubtest_allowlists/darwin-py313.txt b/stdlib/@tests/stubtest_allowlists/darwin-py313.txt index a30dbe44c563..681f65781662 100644 --- a/stdlib/@tests/stubtest_allowlists/darwin-py313.txt +++ b/stdlib/@tests/stubtest_allowlists/darwin-py313.txt @@ -4,7 +4,7 @@ # 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. +# 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/darwin-py314.txt b/stdlib/@tests/stubtest_allowlists/darwin-py314.txt index 67893f715ce7..b651b2826e49 100644 --- a/stdlib/@tests/stubtest_allowlists/darwin-py314.txt +++ b/stdlib/@tests/stubtest_allowlists/darwin-py314.txt @@ -4,7 +4,7 @@ # 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. +# 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-py313.txt b/stdlib/@tests/stubtest_allowlists/linux-py313.txt index 4b0b9be1b721..4fccdd15a0b5 100644 --- a/stdlib/@tests/stubtest_allowlists/linux-py313.txt +++ b/stdlib/@tests/stubtest_allowlists/linux-py313.txt @@ -4,6 +4,6 @@ # 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. +# 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 f692a878bc4a..cf414e9a9b3b 100644 --- a/stdlib/@tests/stubtest_allowlists/linux-py314.txt +++ b/stdlib/@tests/stubtest_allowlists/linux-py314.txt @@ -4,7 +4,7 @@ # 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. +# and earlier. For compatibility reasons, we don't allow None in the stubs. os.posix_spawn os.posix_spawnp From 9ff0d53282ebe603c3a6ff08f55d16633cca0384 Mon Sep 17 00:00:00 2001 From: Sebastian Rittau Date: Wed, 8 Apr 2026 14:05:40 +0200 Subject: [PATCH 4/4] Add 3.15 branch --- stdlib/os/__init__.pyi | 31 ++++++++++++++++++++++++++++++- 1 file changed, 30 insertions(+), 1 deletion(-) 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,