Skip to content

Commit 6dfa285

Browse files
authored
Add os.EX_OK on Windows, Python 3.11+ (#10748)
1 parent a76978b commit 6dfa285

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

stdlib/os/__init__.pyi

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -252,12 +252,14 @@ environ: _Environ[str]
252252
if sys.platform != "win32":
253253
environb: _Environ[bytes]
254254

255+
if sys.version_info >= (3, 11) or sys.platform != "win32":
256+
EX_OK: int
257+
255258
if sys.platform != "win32":
256259
confstr_names: dict[str, int]
257260
pathconf_names: dict[str, int]
258261
sysconf_names: dict[str, int]
259262

260-
EX_OK: int
261263
EX_USAGE: int
262264
EX_DATAERR: int
263265
EX_NOINPUT: int

tests/stubtest_allowlists/win32-py311.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
asyncio.IocpProactor.recvfrom_into
33
asyncio.windows_events.IocpProactor.recvfrom_into
44
msvcrt.GetErrorMode
5-
os.EX_OK
65

76
# pathlib methods that exist on Windows, but always raise NotImplementedError,
87
# so are omitted from the stub

tests/stubtest_allowlists/win32-py312.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ asyncio.windows_events.IocpProactor.finish_socket_func
55
asyncio.windows_events.IocpProactor.recvfrom_into
66
msvcrt.GetErrorMode
77
ntpath.isdir
8-
os.EX_OK
98
os.get_blocking
109
os.listdrives
1110
os.listmounts

0 commit comments

Comments
 (0)