Skip to content

Use of deprecated module audioop #9477

@wookie184

Description

@wookie184

Summary

discord.py uses the audioop module which will be removed in Python 3.13

Reproduction Steps

On Python 3.11: python -Walways -c "import discord"

Output:

...\Python311\Lib\site-packages\discord\player.py:28: DeprecationWarning: 'audioop' is deprecated and slated for removal in Python 3.13
  import audioop

System Information

- Python v3.11.2-final
- discord.py v2.3.1-final
- aiohttp v3.8.3

Additional Context

The only usage is here:

return audioop.mul(ret, 2, min(self._volume, 2.0))

There doesn't seem to be any standard library alternative, or external library that I can obviously see. It's been a while since it was deprecated so I'm not sure how much chance there is someone will turn it into an external library.

One option could be to try and reimplement it in Python, which seems like it could be doable as it doesn't seem too complicated: https://github.com/python/cpython/blob/036da3bd43aa2593d17d2fb73d4794f9965c577d/Modules/audioop.c#L944, not really sure though.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugThis is a bug with the library.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions