You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
assignee=Noneclosed_at=Nonecreated_at=<Date2017-09-10.18:41:03.935>labels= ['3.7', 'type-feature', 'library']
title='wave.open does not accept PathLike objects'updated_at=<Date2017-11-01.09:01:18.609>user='https://github.com/mscuthbert'
The wave library (reading and writing .wav audio files) accepts filehandles, strings, and bytes, but does not accept PathLike objects. Patch will modify wave.py to allow open to use these objects.
The code I contributed to 3.7 is still, I believe, the best path forward. Based on my experiences trying to contribute to cpython, I will not be continuing on this issue. It can be closed.
Based on my experiences trying to contribute to cpython, I will not be continuing on this issue. It can be closed.
After the migration, the issue pile finally started to actively reduce in size towards something manageable:
So your issue being accidentally pulled out-of-order from the abyss of 6,878 gives a great chance to finally see it merged.
I suspect that hugovk just noted that in September, 2023 two affected modules will cease to exist. However, we need to live till that date first, so your fix is still relevant in full volume.
... after a month, give-or-take, to allow anybody concerned a chance to give a fresh feedback. The important thing now is not to allow it to sink back.
Actually, your PR is really just got buried under the fresher ones, no ghosting or deliberate ignorance is involved.
I suspect, everybody has such an experience here when even simple PRs sink under the radar and require once-per-month update to bring it back into the unread notifications. Here're my PRs, for example:
The linked PR (#3484) was closed, although it doesn't say by whom -- I think it could be reopened and updated to drop the changes to the deprecated modules.
@arhadthedev@AA-Turner could this issue be reopened after the superseding issues gh-102425 and gh-103659 seem to have been closed or stopped?
I believe that the issue is still valid and it would be nice to (finally) use the wave module with PathLike objects. 😃
Further, I think @mscuthbert had a point when he wrote:
The code I contributed to 3.7 is still, I believe, the best path forward.
I agree that the original PR was just buried under the pile of others.
The issue is still valid, although it has low priority. If someone wants to finish it, you are welcome. But if it remains inactive again, it will be closed dues to the lack of interest.
Activity
mscuthbert commentedon Sep 10, 2017
The wave library (reading and writing .wav audio files) accepts filehandles, strings, and bytes, but does not accept PathLike objects. Patch will modify wave.py to allow open to use these objects.
serhiy-storchaka commentedon Nov 1, 2017
wave is a one of three audio file modules (aifc, sunau, wave) that should have the same interface.
hugovk commentedon Apr 12, 2022
Note the aifc and sunau modules are deprecated in 3.11 and set for removal in 3.13.
See PEP 594 – Removing dead batteries from the standard library and #91217.
The wave module is being kept.
mscuthbert commentedon Jun 7, 2022
The code I contributed to 3.7 is still, I believe, the best path forward. Based on my experiences trying to contribute to cpython, I will not be continuing on this issue. It can be closed.
arhadthedev commentedon Jun 7, 2022
After the migration, the issue pile finally started to actively reduce in size towards something manageable:
So your issue being accidentally pulled out-of-order from the abyss of 6,878 gives a great chance to finally see it merged.
I suspect that hugovk just noted that in September, 2023 two affected modules will cease to exist. However, we need to live till that date first, so your fix is still relevant in full volume.
... after a month, give-or-take, to allow anybody concerned a chance to give a fresh feedback. The important thing now is not to allow it to sink back.
arhadthedev commentedon Jun 7, 2022
Actually, your PR is really just got buried under the fresher ones, no ghosting or deliberate ignorance is involved.
I suspect, everybody has such an experience here when even simple PRs sink under the radar and require once-per-month update to bring it back into the unread notifications. Here're my PRs, for example:
AA-Turner commentedon Jun 7, 2022
The linked PR (#3484) was closed, although it doesn't say by whom -- I think it could be reopened and updated to drop the changes to the deprecated modules.
A
arhadthedev commentedon Jun 7, 2022
Can we keep them to make backporting easier (the PR fixes divergence from PEP 519 so I believe it's a bugfix and should be backported)?
5 remaining items
AA-Turner commentedon Jun 9, 2022
Marking as pending per #3484 (comment), GitHub hasn't been playing nicely with @mscuthbert unfortunatley.
A
arhadthedev commentedon Mar 4, 2023
Superseded by more general gh-102425.
Bomme commentedon Nov 30, 2023
@arhadthedev @AA-Turner could this issue be reopened after the superseding issues gh-102425 and gh-103659 seem to have been closed or stopped?
I believe that the issue is still valid and it would be nice to (finally) use the wave module with PathLike objects. 😃
Further, I think @mscuthbert had a point when he wrote:
serhiy-storchaka commentedon Nov 4, 2025
I agree that the original PR was just buried under the pile of others.
The issue is still valid, although it has low priority. If someone wants to finish it, you are welcome. But if it remains inactive again, it will be closed dues to the lack of interest.
wave.opendoes not work withpathlib.Pathfiles #140952 as a duplicate of this issuedr-carlos commentedon Nov 6, 2025
Not sure if this is a separate issue, but surely
wave.open()should also accept bytes objects (as it is just passing the filename tobuiltins.open())?gh-75593: Add support of bytes and path-like paths in wave.open() (GH…
pythongh-75593: Add support of bytes and path-like paths in wave.open…