-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Open
Description
Description:
Python 3.13 has removed the built-in audioop module, which pydub currently depends on in pydub/utils.py. As a result, import audioop fails on Python 3.13.
Proposed solution:
- Wrap the import in a try-except block:
try:
import audioop
except ImportError:
import pyaudioop as audioop # fallback for Python 3.13+- Add
pyaudioopas an optional dependency insetup.pyorpyproject.toml. - Optionally, include a clear error message if neither
audioopnorpyaudioopis available.
Impact:
This change ensures pydub remains compatible with Python 3.13 and higher, while maintaining backward compatibility with older Python versions.
Reference:
- Python 3.13 changelog: https://docs.python.org/3.13/whatsnew/changelog.html#removals
dotchetter
Metadata
Metadata
Assignees
Labels
No labels