Skip to content
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

gh-91061: also accept pathlib.Path for winsound.PlaySound #91489

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

Copy link

@moribellamy moribellamy commented Apr 12, 2022

No description provided.

@moribellamy moribellamy requested a review from as a code owner Apr 12, 2022
@cpython-cla-bot
Copy link

@cpython-cla-bot cpython-cla-bot bot commented Apr 12, 2022

All commit authors signed the Contributor License Agreement.
CLA signed

@arhadthedev
Copy link
Contributor

@arhadthedev arhadthedev commented Apr 13, 2022

While the autolinker bot is being enhanced, here is a link so the readers of the PR can jump here via an autogenerated line back there: gh-91061.

PyErr_Format(PyExc_TypeError,
"'sound' must be str or None, not '%s'",
"'sound' must be str, pathlib.Path, or None; not '%s'",
Copy link
Contributor

@barneygale barneygale Apr 19, 2022

Choose a reason for hiding this comment

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

I think this should say os.PathLike rather than pathlib.Path. Per the docs for PyOS_FSPath():

If the object implements the os.PathLike interface, then __fspath__() is returned as long as it is a str or bytes object.

Also affects the NEWS entry.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants