Add missing posix functions for 3.13 (#12375)

This commit is contained in:
Max Muoto
2024-07-20 14:26:35 -05:00
committed by GitHub
parent fa0c14fa33
commit 304b8e9626
4 changed files with 9 additions and 16 deletions

View File

@@ -5,15 +5,7 @@ fcntl.F_OFD_SETLK
fcntl.F_OFD_SETLKW
fcntl.F_RDAHEAD
fcntl.F_SETNOSIGPIPE
os.grantpt
os.posix_openpt
os.ptsname
os.unlockpt
posix.grantpt
posix.posix_openpt
posix.ptsname
posixpath.splitroot
posix.unlockpt
posix.waitid
posix.waitid_result
readline.backend

View File

@@ -23,30 +23,22 @@ os.TFD_CLOEXEC
os.TFD_NONBLOCK
os.TFD_TIMER_ABSTIME
os.TFD_TIMER_CANCEL_ON_SET
os.grantpt
os.posix_openpt
os.ptsname
os.timerfd_create
os.timerfd_gettime
os.timerfd_gettime_ns
os.timerfd_settime
os.timerfd_settime_ns
os.unlockpt
posix.POSIX_SPAWN_CLOSEFROM
posix.TFD_CLOEXEC
posix.TFD_NONBLOCK
posix.TFD_TIMER_ABSTIME
posix.TFD_TIMER_CANCEL_ON_SET
posix.grantpt
posix.posix_openpt
posix.ptsname
posixpath.splitroot
posix.timerfd_create
posix.timerfd_gettime
posix.timerfd_gettime_ns
posix.timerfd_settime
posix.timerfd_settime_ns
posix.unlockpt
readline.backend
stat.SF_SUPPORTED
stat.SF_SYNTHETIC

View File

@@ -1156,3 +1156,9 @@ if sys.version_info >= (3, 12) and sys.platform == "linux":
CLONE_VM: int
def unshare(flags: int) -> None: ...
def setns(fd: FileDescriptorLike, nstype: int = 0) -> None: ...
if sys.version_info >= (3, 13) and sys.platform != "win32":
def posix_openpt(oflag: int, /) -> int: ...
def grantpt(fd: FileDescriptorLike, /) -> None: ...
def unlockpt(fd: FileDescriptorLike, /) -> None: ...
def ptsname(fd: FileDescriptorLike, /) -> str: ...

View File

@@ -236,6 +236,9 @@ if sys.platform != "win32":
if sys.version_info >= (3, 11):
from os import login_tty as login_tty
if sys.version_info >= (3, 13):
from os import grantpt as grantpt, posix_openpt as posix_openpt, ptsname as ptsname, unlockpt as unlockpt
if sys.platform != "linux":
from os import chflags as chflags, lchflags as lchflags, lchmod as lchmod