Skip to content

Commit

Permalink
Add os.EX_OK on Windows, Python 3.11+ (#10748)
Browse files Browse the repository at this point in the history
  • Loading branch information
aminalaee authored Sep 22, 2023
1 parent a76978b commit 6dfa285
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
4 changes: 3 additions & 1 deletion stdlib/os/__init__.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -252,12 +252,14 @@ environ: _Environ[str]
if sys.platform != "win32":
environb: _Environ[bytes]

if sys.version_info >= (3, 11) or sys.platform != "win32":
EX_OK: int

if sys.platform != "win32":
confstr_names: dict[str, int]
pathconf_names: dict[str, int]
sysconf_names: dict[str, int]

EX_OK: int
EX_USAGE: int
EX_DATAERR: int
EX_NOINPUT: int
Expand Down
1 change: 0 additions & 1 deletion tests/stubtest_allowlists/win32-py311.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
asyncio.IocpProactor.recvfrom_into
asyncio.windows_events.IocpProactor.recvfrom_into
msvcrt.GetErrorMode
os.EX_OK

# pathlib methods that exist on Windows, but always raise NotImplementedError,
# so are omitted from the stub
Expand Down
1 change: 0 additions & 1 deletion tests/stubtest_allowlists/win32-py312.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ asyncio.windows_events.IocpProactor.finish_socket_func
asyncio.windows_events.IocpProactor.recvfrom_into
msvcrt.GetErrorMode
ntpath.isdir
os.EX_OK
os.get_blocking
os.listdrives
os.listmounts
Expand Down

0 comments on commit 6dfa285

Please sign in to comment.