From ab55971e5f35a2aa2195b7ea653fb6d3e8712005 Mon Sep 17 00:00:00 2001 From: Max Muoto Date: Sat, 20 Jul 2024 23:19:36 -0500 Subject: [PATCH] Add `os.waitid` and `os.waitid_result` for osx (#12391) --- stdlib/@tests/stubtest_allowlists/darwin-py313.txt | 2 -- stdlib/posix.pyi | 5 +++-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/stdlib/@tests/stubtest_allowlists/darwin-py313.txt b/stdlib/@tests/stubtest_allowlists/darwin-py313.txt index 37c516cbc..6797acbe8 100644 --- a/stdlib/@tests/stubtest_allowlists/darwin-py313.txt +++ b/stdlib/@tests/stubtest_allowlists/darwin-py313.txt @@ -6,8 +6,6 @@ fcntl.F_OFD_SETLKW fcntl.F_RDAHEAD fcntl.F_SETNOSIGPIPE posixpath.splitroot -posix.waitid -posix.waitid_result webbrowser.MacOSX # TODO: fix diff --git a/stdlib/posix.pyi b/stdlib/posix.pyi index 371adfcb5..1a4f22af8 100644 --- a/stdlib/posix.pyi +++ b/stdlib/posix.pyi @@ -286,13 +286,14 @@ if sys.platform != "win32": sched_setscheduler as sched_setscheduler, setresgid as setresgid, setresuid as setresuid, - waitid as waitid, - waitid_result as waitid_result, ) if sys.version_info >= (3, 10): from os import RWF_APPEND as RWF_APPEND + if sys.platform != "darwin" or sys.version_info >= (3, 13): + from os import waitid as waitid, waitid_result as waitid_result + if sys.platform == "linux": from os import ( GRND_NONBLOCK as GRND_NONBLOCK,