From 886a72d729e74b23b01019d47934af019fe0a76c Mon Sep 17 00:00:00 2001 From: Sebastian Rittau Date: Thu, 6 Aug 2026 14:01:40 +0200 Subject: [PATCH] [stdlib] Python 3.13.15, 3.14.7 changes --- stdlib/_ctypes.pyi | 3 ++- stdlib/_winapi.pyi | 3 ++- stdlib/concurrent/futures/process.pyi | 3 ++- stdlib/imaplib.pyi | 9 ++++++--- 4 files changed, 12 insertions(+), 6 deletions(-) diff --git a/stdlib/_ctypes.pyi b/stdlib/_ctypes.pyi index 4c65802c4b31..83ac60fd0d42 100644 --- a/stdlib/_ctypes.pyi +++ b/stdlib/_ctypes.pyi @@ -375,5 +375,6 @@ def call_cdeclfunction(address: int, arguments: tuple[Any, ...], /) -> Any: ... def call_function(address: int, arguments: tuple[Any, ...], /) -> Any: ... # dllist() is available on Linux and other platforms like NetBSD -if sys.version_info >= (3, 15) and sys.platform != "win32" and sys.platform != "darwin": +if sys.version_info >= (3, 14) and sys.platform != "win32" and sys.platform != "darwin": + # Added in Python 3.14.7 def dllist() -> list[str]: ... diff --git a/stdlib/_winapi.pyi b/stdlib/_winapi.pyi index a9ad4f19a62e..3c520028e9c6 100644 --- a/stdlib/_winapi.pyi +++ b/stdlib/_winapi.pyi @@ -314,5 +314,6 @@ if sys.platform == "win32": def CopyFile2(existing_file_name: str, new_file_name: str, flags: int, progress_routine: int | None = None) -> int: ... def NeedCurrentDirectoryForExePath(exe_name: str, /) -> bool: ... - if sys.version_info >= (3, 15): + if sys.version_info >= (3, 13): + # Added in Python 3.13.15, 3.14.7 def GetTickCount64() -> int: ... diff --git a/stdlib/concurrent/futures/process.pyi b/stdlib/concurrent/futures/process.pyi index 6c7037cc0bbc..4dfe17afdc7f 100644 --- a/stdlib/concurrent/futures/process.pyi +++ b/stdlib/concurrent/futures/process.pyi @@ -147,7 +147,8 @@ class _ExecutorManagerThread(Thread): def process_result_item(self, result_item: int | _ResultItem) -> None: ... def is_shutting_down(self) -> bool: ... - if sys.version_info >= (3, 15): + if sys.version_info >= (3, 14): + # bpe_message parameter added in 3.14.7 def terminate_broken(self, cause: str, bpe_message: str | None = None) -> None: ... else: def terminate_broken(self, cause: str) -> None: ... diff --git a/stdlib/imaplib.pyi b/stdlib/imaplib.pyi index 2ed47b18b19c..bb58d29099e5 100644 --- a/stdlib/imaplib.pyi +++ b/stdlib/imaplib.pyi @@ -84,7 +84,8 @@ class IMAP4: if sys.version_info >= (3, 14): def idle(self, duration: float | None = None) -> Idler: ... - if sys.version_info >= (3, 15): + if sys.version_info >= (3, 13): + # Default was fixed in Python 3.13.15, 3.14.7 def list(self, directory: str = "", pattern: str = "*") -> tuple[str, _AnyResponseData]: ... else: def list(self, directory: str = '""', pattern: str = "*") -> tuple[str, _AnyResponseData]: ... @@ -93,7 +94,8 @@ class IMAP4: def login_cram_md5(self, user: str, password: str) -> _CommandResults: ... def logout(self) -> tuple[str, _AnyResponseData]: ... - if sys.version_info >= (3, 15): + if sys.version_info >= (3, 13): + # Default was fixed in Python 3.13.15, 3.14.7 def lsub(self, directory: str = "", pattern: str = "*") -> _CommandResults: ... else: def lsub(self, directory: str = '""', pattern: str = "*") -> _CommandResults: ... @@ -108,7 +110,8 @@ class IMAP4: def select(self, mailbox: str = "INBOX", readonly: bool = False) -> tuple[str, _list[bytes | None]]: ... def setacl(self, mailbox: str, who: str, what: str) -> _CommandResults: ... - if sys.version_info >= (3, 15): + if sys.version_info >= (3, 13): + # Parameter "mailbox" was added in Python 3.13.15, 3.14.7 def setannotation(self, mailbox: str | bytes, *args: str) -> _CommandResults: ... else: def setannotation(self, *args: str) -> _CommandResults: ...