Skip to content

Fix tests that failed in Python 3.13 when building the conda-forge package #3923

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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

aywi
Copy link

@aywi aywi commented Jun 7, 2025

The following tests failed in Python 3.13 when building the conda-forge package (conda-forge/torchaudio-feedstock#30):

FAILED test/torchaudio_unittest/backend/dispatcher/soundfile/info_test.py::TestInfo::test_unknown_subtype_warning - assert 2 == 1
 +  where 2 = len([<warnings.WarningMessage object at 0x1712d0cb0>, <warnings.WarningMessage object at 0x1712d0d40>])

This was caused by FutureWarning: functools.partial will be a method descriptor in future Python versions; wrap it in staticmethod() if you want to preserve the old behavior with Python 3.13 (python/cpython#121027).

FAILED test/torchaudio_unittest/datasets/cmuarctic_test.py::TestCMUARCTIC::test_cmuarctic_path - ValueError: bad delimiter value
FAILED test/torchaudio_unittest/datasets/cmuarctic_test.py::TestCMUARCTIC::test_cmuarctic_str - ValueError: bad delimiter value

These were caused by csv.reader(text, delimiter="\n") in torchaudio/datasets/cmuarctic.py, which is not allowed with Python 3.13 (python/cpython#113796).

Additionally, there were some TypeError: LRScheduler.__init__() got an unexpected keyword argument 'verbose' in local tests, caused by the final deprecation of the verbose kwarg to the LRScheduler constructor with PyTorch 2.7 (pytorch/pytorch#147301) (has been deprecated since 2.2).

```
FAILED test/torchaudio_unittest/datasets/cmuarctic_test.py::TestCMUARCTIC::test_cmuarctic_path - ValueError: bad delimiter value
FAILED test/torchaudio_unittest/datasets/cmuarctic_test.py::TestCMUARCTIC::test_cmuarctic_str - ValueError: bad delimiter value
```
@aywi aywi requested review from nateanl, hwangjeff and a team as code owners June 7, 2025 16:57
Copy link

pytorch-bot bot commented Jun 7, 2025

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/audio/3923

Note: Links to docs will display an error until the docs builds have been completed.

This comment was automatically generated by Dr. CI and updates every 15 minutes.

`FutureWarning: functools.partial will be a method descriptor in future Python versions; wrap it in staticmethod() if you want to preserve the old behavior`
`TypeError: LRScheduler.__init__() got an unexpected keyword argument 'verbose'`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants