Skip to content

Add new constants to winsound #13695

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
May 18, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 0 additions & 7 deletions stdlib/@tests/stubtest_allowlists/win32-py314.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,6 @@ encodings.win32_code_page_search_function
nt.readinto
pathlib.Path.group
pathlib.Path.owner
winsound.MB_ICONERROR
winsound.MB_ICONINFORMATION
winsound.MB_ICONSTOP
winsound.MB_ICONWARNING
winsound.SND_SENTRY
winsound.SND_SYNC
winsound.SND_SYSTEM
zlib.ZLIBNG_VERSION


Expand Down
10 changes: 10 additions & 0 deletions stdlib/winsound.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,22 @@ if sys.platform == "win32":
SND_NODEFAULT: Final = 2
SND_NOSTOP: Final = 16
SND_NOWAIT: Final = 8192
if sys.version_info >= (3, 14):
SND_SENTRY: Final = 524288
SND_SYNC: Final = 0
SND_SYSTEM: Final = 2097152

MB_ICONASTERISK: Final = 64
MB_ICONEXCLAMATION: Final = 48
MB_ICONHAND: Final = 16
MB_ICONQUESTION: Final = 32
MB_OK: Final = 0
if sys.version_info >= (3, 14):
MB_ICONERROR: Final = 16
MB_ICONINFORMATION: Final = 64
MB_ICONSTOP: Final = 16
MB_ICONWARNING: Final = 48

def Beep(frequency: int, duration: int) -> None: ...
# Can actually accept anything ORed with 4, and if not it's definitely str, but that's inexpressible
@overload
Expand Down