KEMBAR78
gh-131453: Add missing constants to winsound module by aisk · Pull Request #131454 · python/cpython · GitHub
Skip to content

Conversation

@aisk
Copy link
Contributor

@aisk aisk commented Mar 19, 2025

SND_ALIAS_ID has not been added to winsound in this PR because it requires passing the hmod parameter to the PlaySound function. Since we do not expose this parameter, it does not make sense to add SND_ALIAS_ID before we support the hmod parameter.

BOOL PlaySound(
   LPCTSTR pszSound,
   HMODULE hmod,
   DWORD   fdwSound
);

Other possible macrons are added.


📚 Documentation preview 📚: https://cpython-previews--131454.org.readthedocs.build/

@zooba
Copy link
Member

zooba commented Mar 19, 2025

LGTM. Any other changes coming here, or is this ready to merge?

@aisk
Copy link
Contributor Author

aisk commented Mar 19, 2025

All usable constants are added in this PR, so it's ready to merge.


.. data:: MB_ICONWARNING

Play the ``SystemExclamation`` sound.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think these could all use a ..versionadded:: next

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, added!

@zooba
Copy link
Member

zooba commented Mar 20, 2025

FWIW, the versionadded:: next is a literal "next" now - it gets replaced with the actual version on release. But it doesn't really matter for changes that aren't going to be backported - it should still end up as 3.14.


Ref: https://discuss.python.org/t/versionadded-next/65280

@zooba zooba merged commit 00a9844 into python:main Mar 20, 2025
42 checks passed
@aisk aisk deleted the winsound-improve branch March 21, 2025 01:57
seehwan pushed a commit to seehwan/cpython that referenced this pull request Apr 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants