DrumScript v0.4.0#
Release Date: 21-Nov-26
Minor-version bump. A compatibility release. DrumScript now installs and runs on Python 3.13, and Python 3.9 support is deprecated.
Highlights#
Python 3.13 support. DrumScript installs and runs on Python 3.13. This was
the most requested change on the tracker and had been blocked since v0.2.1,
which declared requires-python = "<3.13" so that pip would refuse the install
cleanly rather than fail with a confusing numpy build error.
python3.13 -m pip install drumscript
drumscript "drum_loop.wav"
requires-python is now >=3.9,<3.14. Python 3.14 is untested rather than
blocked on purpose: DrumScript pins torch<2.9, and torch ships 3.14 wheels
only from 2.9.
The numpy 2.x migration that unblocked it. numpy<2 is relaxed to
numpy<3. The two were always one task rather than two, because numpy 1.x has
no cp313 wheels on PyPI, so a 3.13 install could only ever have built numpy
from source.
No source changes were needed for numpy 2 itself. ruff check --select NPY201
and a search for removed numpy 1.x APIs found nothing in the package to fix.
No API changes. transcribe(), export_midi(), build_score() and every
CLI flag behave exactly as they did in v0.3.0. If you are on Python 3.9 to
3.12, this release changes nothing you can observe.
Deprecated#
Python 3.9 support will be removed in a future release. Python 3.9 reached end of life in October 2025. Nothing breaks in v0.4.0, and the 3.9 classifier and test-matrix entry both remain, but the removal is now announced and tracked in #364.
The reasons, if you are curious:
It caps numpy at 2.0. numpy 2.1 requires 3.10, 2.3 requires 3.11, and 2.5 requires 3.12.
It is the only version where the Demucs integration tests fail.
It forces a
lameencdowngrade, because the locked 1.8.2 has no macOS wheel for 3.9.It now holds the CI runner on an older Ubuntu image, below.
If you are on 3.9, moving to 3.10 or later at your convenience is the recommendation. There is no deadline yet.
Dependency Updates#
numpy<2relaxed tonumpy<3. There is no lower bound, so numpy 1.x still satisfies the constraint on Python 3.12 and below. Nothing is forced on an existing install.audioop-ltsadded, on Python 3.13 and above only. Python 3.13 removed the stdlibaudioopmodule under PEP 594, andpydubimports it at import time, soimport drumscriptfails on 3.13 without it. It does arrive indirectly throughlibrosa, but DrumScript importspydubdirectly and should declare what it needs rather than lean on a transitive dependency.librosacapped to<1. librosa 1.0 removed theaudioreadfallback, which changed the error for a missing file fromFileNotFoundErrortosoundfile.LibsndfileError.load_audio()documents the former, so the cap holds the documented behaviour steady while the contract is fixed properly in #365. This is a holding measure, not the intended end state.uv.lockregenerated.
On Python 3.13 the librosa cap also keeps audioread, standard-aifc,
standard-chunk and standard-sunau in the dependency tree. All four are PEP
594 “dead battery” redistributions of modules the stdlib dropped. They are
harmless, and lifting the cap in a later release removes them.
Fixes & Improvements#
Python 3.13 added to the test matrix in
tests.ymland to the classifiers inpyproject.toml.tests.ymlpinned toubuntu-24.04. Theubuntu-latestlabel moved to Ubuntu 26.04 in October 2026, andactions/python-versionshas no 26.04 build for Python 3.9 because it is end of life, so the 3.9 matrix entry could no longer start at all. Python 3.10 through 3.13 all have 26.04 builds, so this pin comes out as soon as 3.9 is dropped.The supported-range line corrected in
README.md,docs/index.md,docs/about.mdanddocs/guide/installation.md.The
audioreadrow in Troubleshooting rewritten to explain the 3.13 backport packages, so the warning is recognisable rather than alarming.
Upgrading#
pip install --upgrade drumscript
No breaking changes, and no code to change. Python 3.9 through 3.13 are supported.
If you were previously blocked on 3.13, a fresh install is all that is needed:
pip install drumscript
Contributors#
@yucheng-du - first contribution. The Python 3.13 and numpy 2.x migration in #355, closing #303.