Skip to content
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

Test failures with Python 3.13 #5575

Open
alucryd opened this issue Jan 1, 2025 · 3 comments
Open

Test failures with Python 3.13 #5575

alucryd opened this issue Jan 1, 2025 · 3 comments

Comments

@alucryd
Copy link

alucryd commented Jan 1, 2025

Problem

Running the test suite using python 3.13 led to these problems: https://build.alucryd.xyz/#/builders/229/builds/15/steps/5/logs/stdio

FAILED test/plugins/test_autobpm.py::TestAutoBPMPlugin::test_command - Assert...
FAILED test/plugins/test_autobpm.py::TestAutoBPMPlugin::test_import - Asserti...
FAILED test/plugins/test_bucket.py::BucketPluginTest::test_year_single_year_last_folder
ERROR test/plugins/test_aura.py::TestAuraResponse::test_tracks
ERROR test/plugins/test_aura.py::TestAuraResponse::test_artists
ERROR test/plugins/test_aura.py::TestAuraResponse::test_albums

The autobpm test relies on the aifc module that was removed in Python 3.13, not sure if the other errors are from 3.13 or not.

Setup

  • OS: Arch Linux
  • Python version: 3.13.1
  • beets version: 2.2.0
@austinbutler
Copy link

austinbutler commented Jan 2, 2025

Same failure on NixOS.

FAILED test/plugins/test_bucket.py::BucketPluginTest::test_year_single_year_last_folder - AssertionError: assert '1970' == '2025'

@jackwilsdon
Copy link
Member

The bucket issue was already fixed in #5566.

@satmandu
Copy link

satmandu commented Jan 9, 2025

With Python 3.13 beets is complaining about both aifc and sunauwhen using the chroma plugin, as those are deprecated since Python 3.11 and removed with Python 3.13:

https://docs.python.org/3/library/aifc.html
https://docs.python.org/3/library/sunau.html

  File "/home/satadru/beets/lib/python3.13/site-packages/beetsplug/chroma.py", line 86, in acoustid_match                                                                                     
    duration, fp = acoustid.fingerprint_file(util.syspath(path))                                                                                                                              
                   ~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^                                                                                                                              
  File "/usr/lib/python3/dist-packages/acoustid.py", line 352, in fingerprint_file                                                                                                            
    return _fingerprint_file_audioread(path, maxlength)                                                                                                                                       
  File "/usr/lib/python3/dist-packages/acoustid.py", line 292, in _fingerprint_file_audioread                                                                                                 
    with audioread.audio_open(path) as f:                                                                                                                                                     
         ~~~~~~~~~~~~~~~~~~~~^^^^^^                                                                                                                                                           
  File "/usr/lib/python3/dist-packages/audioread/__init__.py", line 123, in audio_open                                                                                                        
    backends = available_backends()                                                                                                                                                           
  File "/usr/lib/python3/dist-packages/audioread/__init__.py", line 80, in available_backends                                                                                                 
    from . import rawread                                                                                                                                                                     
  File "/usr/lib/python3/dist-packages/audioread/rawread.py", line 16, in <module>                                                                                                            
    import aifc                                                                                                                                                                               
ModuleNotFoundError: No module named 'aifc' 
  File "/home/satadru/beets/lib/python3.13/site-packages/beetsplug/chroma.py", line 86, in acoustid_match                                                                                     
    duration, fp = acoustid.fingerprint_file(util.syspath(path))                                                                                                                              
                   ~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^                                                                                                                              
  File "/usr/lib/python3/dist-packages/acoustid.py", line 352, in fingerprint_file                                                                                                            
    return _fingerprint_file_audioread(path, maxlength)                                                                                                                                       
  File "/usr/lib/python3/dist-packages/acoustid.py", line 292, in _fingerprint_file_audioread                                                                                                 
    with audioread.audio_open(path) as f:                                                                                                                                                     
         ~~~~~~~~~~~~~~~~~~~~^^^^^^                                                                                                                                                           
  File "/usr/lib/python3/dist-packages/audioread/__init__.py", line 123, in audio_open                                                                                                        
    backends = available_backends()                                                                                                                                                           
  File "/usr/lib/python3/dist-packages/audioread/__init__.py", line 80, in available_backends                                                                                                 
    from . import rawread                                                                                                                                                                     
  File "/usr/lib/python3/dist-packages/audioread/rawread.py", line 19, in <module>                                                                                                            
    import sunau                                                                                                                                                                              
ModuleNotFoundError: No module named 'sunau' 

This can be worked around with these packages:
https://pypi.org/project/standard-aifc/
https://pypi.org/project/standard-sunau/
e.g., python3.13 -m pip install standard-aifc standard-sunau

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

No branches or pull requests

4 participants