mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-19 02:15:58 +08:00
Add os.eventfd, os.eventfd_read and os.eventfd_write to Linux for Python 3.10+ (#10768)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
This commit is contained in:
@@ -236,6 +236,16 @@ if sys.platform != "win32":
|
||||
removexattr as removexattr,
|
||||
setxattr as setxattr,
|
||||
)
|
||||
|
||||
if sys.version_info >= (3, 10):
|
||||
from os import (
|
||||
EFD_CLOEXEC as EFD_CLOEXEC,
|
||||
EFD_NONBLOCK as EFD_NONBLOCK,
|
||||
EFD_SEMAPHORE as EFD_SEMAPHORE,
|
||||
eventfd as eventfd,
|
||||
eventfd_read as eventfd_read,
|
||||
eventfd_write as eventfd_write,
|
||||
)
|
||||
else:
|
||||
from os import chflags as chflags, lchflags as lchflags, lchmod as lchmod
|
||||
|
||||
@@ -330,6 +340,7 @@ if sys.platform != "win32":
|
||||
CLONE_SYSVSEM as CLONE_SYSVSEM,
|
||||
CLONE_THREAD as CLONE_THREAD,
|
||||
CLONE_VM as CLONE_VM,
|
||||
unshare as unshare,
|
||||
)
|
||||
|
||||
# Not same as os.environ or os.environb
|
||||
|
||||
Reference in New Issue
Block a user