Skip to content

Conversation

@taconi
Copy link

@taconi taconi commented Oct 15, 2024

The audioop library was removed in python 3.13, which caused the pyaudioop fallback to be called, but this also gives an error (I believe the import should be import pydub.pyaudioop as audioop).

Even changing the import to pydub.pyaudioop broke many tests, so I added audioop-lts for python>=3.13.

Closes #815

Copy link

@reneleonhardt reneleonhardt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello @taconi can you remove the

- PYTHON: "C:/Python34"
  FFMPEG: "4.2.3"

block in appveyor.yml?
That pip version is ancient (doesn't understand your 3.13 condition), so the tests fail to install setup.py.

@taconi
Copy link
Author

taconi commented Apr 7, 2025

@reneleonhardt @jiaaro Will support for 3.4 be removed?

@reneleonhardt
Copy link

I'm no maintainer, just saying that if you want to support 3.13 you have to drop unsupported versions anyway 😅
https://endoflife.date/python
I just "fixed" 3.13 support for Aider-AI/aider#3037 by dropping 3.9 support (because scipy 1.14 dropped it too)... maybe letting go of 11 years old releases here could be a good thing for the future too 😄

@jiaaro
Copy link
Owner

jiaaro commented Apr 7, 2025

That's fine - 3.4 released in 2014

@reneleonhardt
Copy link

Sadly the "newer" pip still fails with 'install_requires' must be a string or list of strings containing valid project/version requirement specifiers... I guess setuptools would have to be updated too (it was removed only recently in CPython 3.12): python-pendulum/pendulum#187
Can you try to install locally in an 3.13 venv before pushing?
pip install -e .

@taconi
Copy link
Author

taconi commented Apr 7, 2025

Can you try to install locally in an 3.13 venv before pushing?

I installed it locally with python 3.13 and ran the tests and it worked.

I think it's something to do with pip, the other versions are running with pip==19.3.1 (including python 2.7) and even updating pip in the pipeline the latest version available for python 3.4 is pip==19.1.

@reneleonhardt
Copy link

Yes, Python 3.4 was updating pip to 19.1.1... and still failed:
https://ci.appveyor.com/project/jiaaro/pydub/builds/51840615/job/qk8obdde2djgl4bo
Is it possible/necessary to copy the last PYTHON: block to test Python 3.7 - 3.13 against the latest ffmpeg?

@taconi
Copy link
Author

taconi commented Apr 7, 2025

Is it possible/necessary to copy the last PYTHON: block to test Python 3.7 - 3.13 against the latest ffmpeg?

The server running the tests (AppVeyor) does not have python versions 3.9, 3.10, 3.11, 3.12 and 3.13.

I've never worked with this CI, so I don't know if it needs any configuration

One option, as commented in issue #827 (#827 (comment) and #827 (comment)), is to move the CI to Github Actions.

What do you think @Jairo ?
@dunossauro had volunteered for this task, anything I can try to do it later.

From what I understand there are two CI, appveyor.yml to run on windowns and .travis.yml to run on linux.

@reneleonhardt
Copy link

reneleonhardt commented Apr 7, 2025

It was just a question, I don't need AppVeyor (Windows) personally, Travis would be enough for me 😅
And it's not specifically needed for this issue so it could be tackled later anyway.

If Python 3.9 is not available then you're probably using an at least 8 years old Visual Studio 2017 image (or below):
https://www.appveyor.com/docs/windows-images-software/#python

@reneleonhardt
Copy link

@taconi I have no permissions, can you see if travis really hasn't finished yet... after 24h? 🤣

A new release would be great, after https://github.com/huggingface/transformers/releases/tag/v4.51.1 pydub seems to be the only thing left for Python 3.13 support in Aider-AI/aider#3037 💚

@taconi
Copy link
Author

taconi commented Apr 8, 2025

[...] can you see if travis really hasn't finished yet [...]

I don't have permission to see it either.
It looks like the CI needs some tweaking.

And it's not specifically needed for this issue so it could be tackled later anyway.

I'll revert the changes I made to the CI.

I managed to run the tests with 3.13 on my machine, but I don't know if it works on windowns. I think it would be good to tweak the CI, but until then, if anyone can run the tests with 3.13 on windowns it would be great

@medaminezghal
Copy link

@taconi This commit should be able to fix the problem.

@reneleonhardt
Copy link

@medaminezghal An import is no fix if the dependency hasn't been installed, this is what this PR does 😉

@medaminezghal
Copy link

@reneleonhardt the pyaudioop.py file replace the audioop module that's removed in Python 3.13. So if you correct the import process, you don't need the audioop-lts package anymore.

Note that I have tested the fix with gradio that depends on Pydub especially the utils.py and it works fine.

@reneleonhardt
Copy link

I didn't see that, sorry. Have you tested on Python 3.13 or 3.14rc2?

@medaminezghal
Copy link

@reneleonhardt I'm using Python 3.13

@reneleonhardt
Copy link

But no contribution matters anyway if the project isn't maintained anymore, no amount of work will be merged, it's sad if not more maintainers are being added 😞

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ModuleNotFoundError: No module named 'pyaudioop'

4 participants