Aider-AI / aider

aider is AI pair programming in your terminal
https://aider.chat/
Apache License 2.0
20.18k stars 1.85k forks source link

Introduction of PyDub introduces deprecation warning for python 3.13 #1980

Open ngharrington opened 8 hours ago

ngharrington commented 8 hours ago

Issue

I would like to call it to your attention that the introduction of pydub as a dependency we have introduced standard library dependencies that will be deprecated in python 3.13.

$ python -B -Werror $(which aider)
Traceback (most recent call last):
  File "/home/neal/workspace/aider-sandbox/venv312/bin/aider", line 5, in <module>
    from aider.main import main
  File "/home/neal/workspace/aider-sandbox/venv312/lib/python3.12/site-packages/aider/main.py", line 16, in <module>
    from aider.coders import Coder
  File "/home/neal/workspace/aider-sandbox/venv312/lib/python3.12/site-packages/aider/coders/__init__.py", line 1, in <module>
    from .architect_coder import ArchitectCoder
  File "/home/neal/workspace/aider-sandbox/venv312/lib/python3.12/site-packages/aider/coders/architect_coder.py", line 2, in <module>
    from .ask_coder import AskCoder
  File "/home/neal/workspace/aider-sandbox/venv312/lib/python3.12/site-packages/aider/coders/ask_coder.py", line 2, in <module>
    from .base_coder import Coder
  File "/home/neal/workspace/aider-sandbox/venv312/lib/python3.12/site-packages/aider/coders/base_coder.py", line 22, in <module>
    from aider.commands import Commands
  File "/home/neal/workspace/aider-sandbox/venv312/lib/python3.12/site-packages/aider/commands.py", line 16, in <module>
    from aider import models, prompts, voice
  File "/home/neal/workspace/aider-sandbox/venv312/lib/python3.12/site-packages/aider/voice.py", line 18, in <module>
    from pydub import AudioSegment  # noqa
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/neal/workspace/aider-sandbox/venv312/lib/python3.12/site-packages/pydub/__init__.py", line 1, in <module>
    from .audio_segment import AudioSegment
  File "/home/neal/workspace/aider-sandbox/venv312/lib/python3.12/site-packages/pydub/audio_segment.py", line 11, in <module>
    from .utils import mediainfo_json, fsdecode
  File "/home/neal/workspace/aider-sandbox/venv312/lib/python3.12/site-packages/pydub/utils.py", line 15, in <module>
    import audioop
DeprecationWarning: 'audioop' is deprecated and slated for removal in Python 3.13

This is in addition to the "invalid escape warnings" the dependency introduces as well, as described here: https://github.com/Aider-AI/aider/issues/1722#issuecomment-2400879113

Version and model info

Aider: 0.59.1

ngharrington commented 8 hours ago

Discussion of the deprecation of audioop and it's impact on pydub here https://github.com/jiaaro/pydub/issues/725

fry69 commented 8 hours ago

FYI: There is -> https://pypi.org/project/audioop-lts/ thanks to https://github.com/Rapptz/discord.py relying on that too.

Their fallback solution -> https://github.com/Rapptz/discord.py/blob/master/requirements.txt

Also aider currently requires Python 3.9 - 3.12, 3.13 is not yet supported. See here -> https://github.com/Aider-AI/aider/blob/main/pyproject.toml#L23