Skip to content

Fix import instead of using audioop-lts

Description:

The audioop module has been removed in Python 3.13 and the Pydub developers has introduced pyaudioop to replace it. But the problem is that the developers doesn't use relative imports that's why it fails to import.

The maintainers choose to add python-audioop-lts package but I suggest just to fix the import bu using: sed -i 's/import pyaudioop as audioop/from . import pyaudioop as audioop/g' pydub/utils.py in prepare function than remove python-audioop-lts from dependencies.

I have test this with several packages that depends on Pydub and it works well.

Additional info:

Steps to reproduce:

  1. Install the package
  2. Remove audioop-lts package
  3. Execute from pydub import AudioSegment for example in Python.
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information