-
Notifications
You must be signed in to change notification settings - Fork 108
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
aifc
module is deprecated (and removed in Python 3.13)
#144
Comments
Python 3.13 no longer includes `aifc` in standard libraries https://docs.python.org/3.13/whatsnew/3.13.html#whatsnew313-pep594 This is still used by audioread, a dependency of pyacousticid beetbox/audioread#144
It's worth mentioning that the There's an attempt to make the deprecated libraries available as pip dependencies: https://github.com/youknowone/python-deadlib However, it seems there's currently a couple of issues with that repository which means it won't work with 3.13 yet. |
I've submitted a pull request to the Another potential approach would be to handle the |
…repo to prevent import errors on Python 3.13 Workaround for beetbox/audioread#144
The python-deadlib modules have now been fixed up and can be used to replace the missing modules from python core. So a workaround to this issue is |
…and above. Python core removed these modules in 3.13 as part of PEP-594 https://peps.python.org/pep-0594/ The standard-* modules are forks of the modules that had previously been in the python core. Fixes beetbox#144
The library does not build on python 3.12 too Anjok07/ultimatevocalremovergui#1578 (comment)
|
I wonder if using https://github.com/scientific-python/lazy-loader could help? Then the modules would only be loaded (and thus fail to be found) on demand. |
@ISSOtm That approach would mean some uses of audioread would work in python 3.13, but others would error. Whilst it's tempting (and would certainly solve my personal use of it), I think it'd cause confusing results to people unfamiliar with the internal implementation. The question of "is this library supported in python 3.13?" would need an answer of "it depends", followed by details of the nuance. |
Isn't this always the case though? The formats supported by any particular installation of audioread generally depend on several factors that can't be strictly determined by python dependencies. For example, if it calls out to the ffmpeg backend, the supported formats will depend on whatever that version of ffmpeg happened to be compiled with. |
In my mind, which runtime versions a library supports feels more fundamental than other programmes it interacts with. But taking a step back, I concede that distinction is kinda arbitrary. So I guess the real question is whether people prefer to face more errors at install time, or make installs easier with the potential for more runtime errors. As a user of the library, I'm in favour of install time errors I find them much easier to identify and debug than runtime errors. But I understand others may disagree. |
I'm with you on that. 😅 There's a limit to what python package specs can realistically accomplish here though. For whatever it's worth, I like the solution of having a 3.13-specific dependency for aifc and sunau (as done in #145 ). One variation on this could be putting it in an extras_require section, so you could do eg |
This package still uses the aifc module that is deprecated since Python 3.11, and was removed in Python 3.13.
As a result, the test suite fails with 3.13.0b2:
The text was updated successfully, but these errors were encountered: