Skip to content

Commit 09525f9

Browse files
authored
Unpin Python 3.13 and 3.14 (#15634)
1 parent 86e2b85 commit 09525f9

File tree

7 files changed

+71
-5
lines changed

7 files changed

+71
-5
lines changed

.github/workflows/daily.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,7 @@ jobs:
3535
strategy:
3636
matrix:
3737
os: ["ubuntu-latest", "windows-latest", "macos-latest"]
38-
# TODO: unpin the patch versions of Python 3.13/3.14 once stubtest failures are fixed
39-
python-version: ["3.10", "3.11", "3.12", "3.13.12", "3.14.3"]
38+
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
4039
fail-fast: false
4140

4241
steps:

.github/workflows/stubtest_stdlib.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,7 @@ jobs:
3131
strategy:
3232
matrix:
3333
os: ["ubuntu-latest", "windows-latest", "macos-latest"]
34-
# TODO: unpin the patch versions of Python 3.13/3.14 once stubtest failures are fixed
35-
python-version: ["3.10", "3.11", "3.12", "3.13.12", "3.14.3"]
34+
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
3635
fail-fast: false
3736

3837
steps:

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

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
1+
# =============
2+
# 3.13 and 3.14
3+
# =============
4+
5+
# Starting with Python 3.13.13, these methods accept None for the "scheduler"
6+
# and "setpgroup" parameters, but would raise a TypeError with Python 3.13.12
7+
# and earlier. For compatibility reasons, we don't allow None in the stubs.
8+
os.posix_spawn
9+
os.posix_spawnp
10+
111
# =======
212
# >= 3.13
313
# =======

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

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
1+
# =============
2+
# 3.13 and 3.14
3+
# =============
4+
5+
# Starting with Python 3.14.4, these methods accept None for the "scheduler"
6+
# and "setpgroup" parameters, but would raise a TypeError with Python 3.13.12
7+
# and earlier. For compatibility reasons, we don't allow None in the stubs.
8+
os.posix_spawn
9+
os.posix_spawnp
10+
111
# =========
212
# 3.14 only
313
# =========
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# =============
2+
# 3.13 and 3.14
3+
# =============
4+
5+
# Starting with Python 3.13.13, these methods accept None for the "scheduler"
6+
# and "setpgroup" parameters, but would raise a TypeError with Python 3.13.12
7+
# and earlier. For compatibility reasons, we don't allow None in the stubs.
8+
os.posix_spawn
9+
os.posix_spawnp

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

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
1+
# =============
2+
# 3.13 and 3.14
3+
# =============
4+
5+
# Starting with Python 3.14.4, these methods accept None for the "scheduler"
6+
# and "setpgroup" parameters, but would raise a TypeError with Python 3.13.12
7+
# and earlier. For compatibility reasons, we don't allow None in the stubs.
8+
os.posix_spawn
9+
os.posix_spawnp
10+
111
# =========
212
# 3.14 only
313
# =========

stdlib/os/__init__.pyi

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1532,7 +1532,36 @@ else:
15321532
def WSTOPSIG(status: int) -> int: ...
15331533
def WTERMSIG(status: int) -> int: ...
15341534

1535-
if sys.version_info >= (3, 13):
1535+
if sys.version_info >= (3, 15):
1536+
def posix_spawn(
1537+
path: StrOrBytesPath,
1538+
argv: _ExecVArgs,
1539+
env: _ExecEnv | None,
1540+
/,
1541+
*,
1542+
file_actions: Sequence[tuple[Any, ...]] | None = (),
1543+
setpgroup: int | None = None, # None allowed starting in 3.15
1544+
resetids: bool = False,
1545+
setsid: bool = False,
1546+
setsigmask: Iterable[int] = (),
1547+
setsigdef: Iterable[int] = (),
1548+
scheduler: tuple[Any, sched_param] | None = None, # None allowed starting in 3.15
1549+
) -> int: ...
1550+
def posix_spawnp(
1551+
path: StrOrBytesPath,
1552+
argv: _ExecVArgs,
1553+
env: _ExecEnv | None,
1554+
/,
1555+
*,
1556+
file_actions: Sequence[tuple[Any, ...]] | None = (),
1557+
setpgroup: int | None = None, # None allowed starting in 3.15
1558+
resetids: bool = False,
1559+
setsid: bool = False,
1560+
setsigmask: Iterable[int] = (),
1561+
setsigdef: Iterable[int] = (),
1562+
scheduler: tuple[Any, sched_param] | None = None, # None allowed starting in 3.15
1563+
) -> int: ...
1564+
elif sys.version_info >= (3, 13):
15361565
def posix_spawn(
15371566
path: StrOrBytesPath,
15381567
argv: _ExecVArgs,

0 commit comments

Comments
 (0)