Update os and posix to python 3.12 on darwin (#10779)

This commit is contained in:
Nikita Sobolev
2023-09-26 10:46:29 +03:00
committed by GitHub
parent 3f9a3accc8
commit 9f4edca70e
3 changed files with 14 additions and 8 deletions

View File

@@ -122,6 +122,12 @@ if sys.platform == "linux":
GRND_NONBLOCK: int
GRND_RANDOM: int
if sys.platform == "darwin" and sys.version_info >= (3, 12):
PRIO_DARWIN_BG: int
PRIO_DARWIN_NONUI: int
PRIO_DARWIN_PROCESS: int
PRIO_DARWIN_THREAD: int
SEEK_SET: int
SEEK_CUR: int
SEEK_END: int

View File

@@ -347,6 +347,14 @@ if sys.platform != "win32":
unshare as unshare,
)
if sys.version_info >= (3, 12) and sys.platform == "darwin":
from os import (
PRIO_DARWIN_BG as PRIO_DARWIN_BG,
PRIO_DARWIN_NONUI as PRIO_DARWIN_NONUI,
PRIO_DARWIN_PROCESS as PRIO_DARWIN_PROCESS,
PRIO_DARWIN_THREAD as PRIO_DARWIN_THREAD,
)
# Not same as os.environ or os.environb
# Because of this variable, we can't do "from posix import *" in os/__init__.pyi
environ: dict[bytes, bytes]

View File

@@ -4,14 +4,6 @@ _curses.window.get_wch
_posixsubprocess.fork_exec
curses.unget_wch
curses.window.get_wch
os.PRIO_DARWIN_BG
os.PRIO_DARWIN_NONUI
os.PRIO_DARWIN_PROCESS
os.PRIO_DARWIN_THREAD
posix.PRIO_DARWIN_BG
posix.PRIO_DARWIN_NONUI
posix.PRIO_DARWIN_PROCESS
posix.PRIO_DARWIN_THREAD
tty.__all__
tty.cfmakecbreak
tty.cfmakeraw