Update os. EX_NOTFOUND not available in Linux (#11461)

This commit is contained in:
Amin Alaee
2024-02-26 09:36:33 +01:00
committed by GitHub
parent 49b1a1a96a
commit 9916efae63
3 changed files with 5 additions and 6 deletions

View File

@@ -308,7 +308,8 @@ if sys.platform != "win32":
EX_NOPERM: int
EX_CONFIG: int
if sys.platform != "win32" and sys.platform != "darwin":
# Exists on some Unix platforms, e.g. Solaris.
if sys.platform != "win32" and sys.platform != "darwin" and sys.platform != "linux":
EX_NOTFOUND: int
P_NOWAIT: int

View File

@@ -239,9 +239,11 @@ if sys.platform != "win32":
if sys.platform != "linux":
from os import chflags as chflags, lchflags as lchflags, lchmod as lchmod
if sys.platform != "linux" and sys.platform != "darwin":
from os import EX_NOTFOUND as EX_NOTFOUND
if sys.platform != "darwin":
from os import (
EX_NOTFOUND as EX_NOTFOUND,
POSIX_FADV_DONTNEED as POSIX_FADV_DONTNEED,
POSIX_FADV_NOREUSE as POSIX_FADV_NOREUSE,
POSIX_FADV_NORMAL as POSIX_FADV_NORMAL,

View File

@@ -41,10 +41,6 @@ fcntl.I_[A-Z0-9_]+
os.SCHED_[A-Z_]+
posix.SCHED_[A-Z_]+
# Exists on some Unix platforms, but not in CI:
os.EX_NOTFOUND
posix.EX_NOTFOUND
# Some of these exist on non-windows, but they are useless and this is not intended
stat.FILE_ATTRIBUTE_[A-Z_]+