Skip to content

Commit 19992e6

Browse files
srittauAlexWaygood
andauthored
Mark some errnos as darwin- or solaris-only (#10440)
Co-authored-by: Alex Waygood <[email protected]>
1 parent d14ab09 commit 19992e6

File tree

2 files changed

+8
-7
lines changed

2 files changed

+8
-7
lines changed

stdlib/errno.pyi

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -91,9 +91,15 @@ ECANCELED: int # undocumented
9191
ENOTRECOVERABLE: int # undocumented
9292
EOWNERDEAD: int # undocumented
9393

94+
if sys.platform == "sunos5" or sys.platform == "solaris": # noqa: Y008
95+
ELOCKUNMAPPED: int
96+
ENOTACTIVE: int
97+
9498
if sys.platform != "win32":
9599
ENOTBLK: int
96100
EMULTIHOP: int
101+
102+
if sys.platform == "darwin":
97103
# All of the below are undocumented
98104
EAUTH: int
99105
EBADARCH: int
@@ -112,9 +118,8 @@ if sys.platform != "win32":
112118
EPWROFF: int
113119
ERPCMISMATCH: int
114120
ESHLIBVERS: int
115-
116-
if sys.platform != "darwin" or sys.version_info >= (3, 11):
117-
EQFULL: int # undocumented
121+
if sys.version_info >= (3, 11):
122+
EQFULL: int
118123

119124
if sys.platform != "darwin":
120125
EDEADLOCK: int
@@ -164,9 +169,6 @@ if sys.platform != "win32" and sys.platform != "darwin":
164169
ENOKEY: int
165170
ENOMEDIUM: int
166171
ERFKILL: int
167-
EL: int
168-
ELOCKUNMAPPED: int
169-
ENOTACTIVE: int
170172

171173
if sys.platform == "win32":
172174
# All of these are undocumented

tests/stubtest_allowlists/linux.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ selectors.KqueueSelector
1212
signal.SIGEMT
1313
signal.SIGINFO
1414
socket.[A-Z0-9_]+
15-
errno.[A-Z0-9]+
1615

1716
# Exists at runtime, but missing from stubs
1817
mimetypes.MimeTypes.read_windows_registry

0 commit comments

Comments
 (0)