Skip to content

wave.open does not accept PathLike objects #75593

Closed

Description

@mscuthbert
BPO 31412
Nosy @berkerpeksag, @serhiy-storchaka, @mscuthbert
PRs
  • bpo-31412: wave.open takes a path-like object #3484
  • 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 = None
    closed_at = None
    created_at = <Date 2017-09-10.18:41:03.935>
    labels = ['3.7', 'type-feature', 'library']
    title = 'wave.open does not accept PathLike objects'
    updated_at = <Date 2017-11-01.09:01:18.609>
    user = 'https://github.com/mscuthbert'

    bugs.python.org fields:

    activity = <Date 2017-11-01.09:01:18.609>
    actor = 'serhiy.storchaka'
    assignee = 'none'
    closed = False
    closed_date = None
    closer = None
    components = ['Library (Lib)']
    creation = <Date 2017-09-10.18:41:03.935>
    creator = 'mscuthbert'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 31412
    keywords = ['patch']
    message_count = 2.0
    messages = ['301826', '305361']
    nosy_count = 3.0
    nosy_names = ['berker.peksag', 'serhiy.storchaka', 'mscuthbert']
    pr_nums = ['3484']
    priority = 'normal'
    resolution = None
    stage = 'patch review'
    status = 'open'
    superseder = None
    type = 'enhancement'
    url = 'https://bugs.python.org/issue31412'
    versions = ['Python 3.7']

    Linked PRs

    Activity

    1. mscuthbert commented on Sep 10, 2017

      mscuthbertmannequin
      MannequinAuthor

      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.

    2. added
      stdlibStandard Library Python modules in the Lib/ directory
      type-featureA feature request or enhancement
      on Sep 10, 2017
    3. serhiy-storchaka commented on Nov 1, 2017

      @serhiy-storchaka
      Member

      wave is a one of three audio file modules (aifc, sunau, wave) that should have the same interface.

    4. transferred this issue fromon Apr 10, 2022
    5. hugovk commented on Apr 12, 2022

      @hugovk
      Member

      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.

    6. mscuthbert commented on Jun 7, 2022

      @mscuthbert
      Author

      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.

    7. arhadthedev commented on Jun 7, 2022

      @arhadthedev
      Member

      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:

      image

      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.

    8. arhadthedev commented on Jun 7, 2022

      @arhadthedev
      Member

      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:

      image

    9. AA-Turner commented on Jun 7, 2022

      @AA-Turner
      Member

      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

    10. arhadthedev commented on Jun 7, 2022

      @arhadthedev
      Member

      I think it could be reopened and updated to drop the changes to the deprecated modules.

      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)?

    11. added
      3.11only security fixes
      and removed on Jun 7, 2022
    12. 5 remaining items

    13. AA-Turner commented on Jun 9, 2022

      @AA-Turner
      Member

      Marking as pending per #3484 (comment), GitHub hasn't been playing nicely with @mscuthbert unfortunatley.

      A

    14. added
      pendingThe issue will be closed if no feedback is provided
      on Jun 9, 2022
    15. arhadthedev commented on Mar 4, 2023

      @arhadthedev
      Member

      Superseded by more general gh-102425.

    16. Bomme commented on Nov 30, 2023

      @Bomme

      @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.

    17. serhiy-storchaka commented on Nov 4, 2025

      @serhiy-storchaka
      Member

      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.

    18. dr-carlos commented on Nov 6, 2025

      @dr-carlos
      Contributor

      Not sure if this is a separate issue, but surely wave.open() should also accept bytes objects (as it is just passing the filename to builtins.open())?

    19. removed
      pendingThe issue will be closed if no feedback is provided
      3.12only security fixes
      on Nov 6, 2025
    20. added a commit that references this issue on Nov 12, 2025
    21. added a commit that references this issue on Dec 6, 2025
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

    Metadata

    Metadata

    Assignees

    No one assigned

      Labels

      3.15bugs and security fixesstdlibStandard Library Python modules in the Lib/ directorytype-featureA feature request or enhancement

      Projects

      No projects

        Milestone

        No milestone

        Relationships

        None yet

        Development

        No branches or pull requests

        Issue actions