Skip to content

Conversation

@bmcfee
Copy link
Contributor

@bmcfee bmcfee commented Feb 3, 2025

Fixes #144

This PR is similar to #145, but implements the alternative strategy described in #144 of making deprecated dependencies optional on python 3.13.

This isn't necessarily meant to supersede #145, just to provide an alternative implementation that's ready to go in case @sampsyo wants to go this route instead.

Summary of changes:

  • Added audioop-lts as a hard requirement on python >= 3.13. This is necessary for the lin2lin function used in all rawread paths.
  • Reorganized the codec ordering in RawRead so that wave (still supported) is first, followed by aiff and au.
  • Implemented soft failure for aifc and sunau modules, issuing a warning if the module is missing.
  • Added legacy mode installation which includes dependencies for standard-aifc and standard-sunau if python >= 3.13. Can be invoked by python -m pip install audioread[legacy].
  • Updated documentation (README) to reflect the status of deprecated packages and legacy install instructions.

@lucas42
Copy link
Contributor

lucas42 commented Feb 3, 2025

Cool. I didn't even realise pip had an option to do this!
Can I suggest adding python 3.12 and 3.13 to the test matrix in .github/workflows/main.yml?

@bmcfee
Copy link
Contributor Author

bmcfee commented Feb 3, 2025

Can I suggest adding python 3.12 and 3.13 to the test matrix in .github/workflows/main.yml?

I don't think that would do anything at present, since the workflow doesn't actually run pytest, or even install the package. It also appears that the CI action has not run for 2 years at this point - probably that maintenance should happen in a separate PR.

@lucas42
Copy link
Contributor

lucas42 commented Feb 3, 2025

Fair enough. I managed to get the tests running on my fork, but never really dug into what they were actually doing.

Copy link
Member

@snejus snejus left a comment

Choose a reason for hiding this comment

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

Is this still relevant? This looks good to me

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.

aifc module is deprecated (and removed in Python 3.13)

4 participants