DFSG NEW Queue

DFSG, Licensing & New Packages Team

pretty-midi 0.2.11-1

Package Information

Descriptionutility functions for handling MIDI data in a nice/intuitive way

This contains utility function/classes for handling MIDI data, so that it's in a format which is easy to modify and extract information from.

This package installs the library for Python 3.

MaintainerAlex Myczko <tar@debian.org>
Changed ByAlex Myczko <tar@debian.org>
Sponsortar@debian.org
Distributionunstable
Architectureall
VCSgit: https://salsa.debian.org/debian/pretty-midi.git (browse)
Trackerhttps://tracker.debian.org/pkg/pretty-midi
Uploaded2 hours ago

New Package Report

.changes◂
Architecturesource all
Distributionunstable
DateWed, 02 Dec 2026 19:53:42 +0100
Sourcepretty-midi
Version0.2.11-1
Changed-ByAlex Myczko <tar@debian.org>
Changelog◂
pretty-midi (0.2.11-1) unstable; urgency=medium
 .
   * Initial release.
.dsc◂
Componentmain
Package-Listpython3-pretty-midi deb python optional arch=all
Sectionpython
Priorityoptional
debian/copyright◂
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Source: https://github.com/craffel/pretty-midi
Upstream-Name: pretty-midi
Upstream-Contact: Colin Raffel

Files:
 *
Copyright:
 2014-2026 Colin Raffel
License: MIT
 Permission is hereby granted, free of charge, to any person obtaining a copy
 of this software and associated documentation files (the "Software"), to deal
 in the Software without restriction, including without limitation the rights
 to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 copies of the Software, and to permit persons to whom the Software is
 furnished to do so, subject to the following conditions:
 .
 The above copyright notice and this permission notice shall be included in
 all copies or substantial portions of the Software.
 .
 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
 THE SOFTWARE.

Files:
 debian/*
Copyright:
 2026 Alex Myczko <tar@debian.org>
License: GPL-2+
 This package is free software; you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
 the Free Software Foundation; either version 2 of the License, or
 (at your option) any later version.
 .
 This package is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 GNU General Public License for more details.
 .
 You should have received a copy of the GNU General Public License
 along with this package. If not, see <https://www.gnu.org/licenses/>.
Comment:
 On Debian systems, the complete text of the GNU General
 Public License version 2 can be found in "/usr/share/common-licenses/GPL-2".

DFSG Assistant LLM REVIEW 1 blocker, 2 important, 1 minor

This is an LLM based review using a Debian Inference based workflow. It was not written by a member of the DFSG team and has not been checked by one. It is not a decision on the package: it may be wrong, and it may have missed things.

Reviewed 1 hour ago.

Report◂

DFSG NEW review for pretty-midi version 0.2.11-1

Summary

  • Licensing is DFSG-compliant and debian/copyright is accurate: No
  • Packaging is of good quality: No
  • Issues: 1 blocker, 2 important, 1 minor
  • debian/watch: version 5
  • debian/copyright: machine-readable
  • Scan before the review: 2 found

Licensing

The Python code is MIT (LICENSE.txt, Copyright (c) 2014 Colin Raffel) and debian/copyright reproduces that licence faithfully, with a GPL-2+ stanza for debian/* that points at /usr/share/common-licenses. But the source package also ships pretty_midi/TimGM6mb.sf2, the 6 MB TimGM6mb General MIDI soundfont by Tim Brechbill (Debian packages it separately as timgm6mb-soundfont), which setup.py installs into the binary package. debian/copyright's only upstream stanza attributes that file to Colin Raffel under MIT, and nothing in the source package states the soundfont's author or licence, so the copyright file is inaccurate for a shipped file.

Packaging

The dh/pybuild packaging is conventional in most respects (compat 13, 3.0 (quilt), correct Vcs-*/Homepage, current Standards-Version, no patches), but debian/rules replaces dh_auto_test with @echo moo, so the package's real pytest tests are never run in any build and no autopkgtest exists either. More seriously, pretty_midi/fluidsynth.py imports the importlib_resources backport unconditionally and dh_python3 has no pydist mapping for it, so ${python3:Depends} will not contain any package providing it and import pretty_midi fails unless the module is installed by hand. The binary also carries its own copy of a soundfont Debian already ships, and its copyright/licence are wrong there (see the licensing issue).

Issues

blocker licensing 1. Files: * attributes the bundled TimGM6mb.sf2 soundfont to Colin Raffel under MIT; it is Tim Brechbill's soundfont and its licence is stated nowhere ◂
  • Files: pretty_midi/TimGM6mb.sf2, debian/copyright:6-10, setup.py:11
  • Basis: inferred from what was read, not seen directly
  • Evidence: debian/copyright: Files: *, Copyright: 2014-2026 Colin Raffel, License: MIT. setup.py:11: package_data={'': ['TimGM6mb.sf2']}. apt-cache timgm6mb-soundfont 1.3-5: TimGM6mb SoundFont from MuseScore 1.3, Homepage: https://timbrechbill.com/saxguru/Timidity.php, Installed-Size 6073.
  • Problem: pretty_midi/TimGM6mb.sf2 is the TimGM6mb General MIDI soundfont by Tim Brechbill, which Debian itself ships as timgm6mb-soundfont; it is not Colin Raffel's code. It is not merely source-tree baggage: setup.py's package_data installs it into /usr/lib/python3/dist-packages/pretty_midi/ and pretty_midi/fluidsynth.py loads it, so it is in the binary package. debian/copyright's catch-all stanza claims the file for Colin Raffel under MIT, and no stanza, notice or licence text anywhere in the source package names its author or its actual terms. The copyright file is therefore inaccurate about a shipped file, and the package redistributes it without stating its licence (Policy 2.3, 12.5).
  • Fix: Add a Files stanza for pretty_midi/TimGM6mb.sf2 naming Tim Brechbill and the soundfont's real licence, with the licence text or a /usr/share/common-licenses pointer (Debian's timgm6mb-soundfont copyright records it); alternatively drop the file and use /usr/share/sounds/sf2/TimGM6mb.sf2 from timgm6mb-soundfont.
important packaging 2. debian/rules disables the test suite with @echo moo, and there is no autopkgtest either ◂
  • Files: debian/rules:9-10, debian/control:4-9
  • Basis: checked, in the package or with a reference tool
  • Evidence: override_dh_auto_test: / @echo moo; tests/test_pretty_midi.py and tests/test_utilities.py contain real pytest tests; Build-Depends lists python3-mido but neither python3-pytest nor python3-numpy.
  • Problem: The override replaces dh_auto_test unconditionally in every build, so none of the project's tests run (at compat 13 dh would already skip this override for DEB_BUILD_OPTIONS=nocheck, so the standard mechanism was available). Merely removing the override is not enough: pybuild's distutils fallback is python3 -m unittest discover, which does not collect these pytest-style modules, so the tests must be invoked explicitly with pytest, which needs Build-Depends additions. With no debian/tests and the Testsuite field commented out, nothing exercises the package at all, which is how the broken import below goes unnoticed.
  • Fix: Replace the echo with a real test run (e.g. PYBUILD_TEST_PYTEST=1 dh_auto_test or override_dh_auto_test: python3 -m pytest), add python3-pytest and python3-numpy to Build-Depends (plus the module from the next issue), and add debian/tests with Testsuite: autopkgtest-pkg-python.
important packaging 3. import importlib_resources at module level gets no Depends: dh_python3 has no pydist mapping for importlib-resources ◂
  • Files: debian/control:18, pretty_midi/fluidsynth.py:6, pretty_midi/instrument.py:9
  • Basis: checked, in the package or with a reference tool
  • Evidence: pretty_midi/fluidsynth.py:6 import importlib_resources (also imported via from .fluidsynth import get_fluidsynth_instance at instrument.py:9); debian/control Depends: ${python3:Depends}, ${misc:Depends}; /usr/share/dh-python/dist/cpython3_fallback maps numpy, mido and six but has no importlib-resources entry, and guess_dependency() in /usr/share/dh-python/dhpython/pydist.py then runs dpkg -S and returns None with "Cannot find package that provides importlib_resources".
  • Problem: dh_python3 only turns a Requires-Dist entry into a dependency when its pydist database maps the name (or dpkg -S finds a provider among the build dependencies). importlib-resources is mapped by neither, and debian/ adds no py3dist-overrides or explicit Depends, so ${python3:Depends} will carry numpy, mido and six but nothing providing importlib_resources. Since pretty_midi/init.py imports .instrument, which imports .fluidsynth, every import pretty_midi needs that module; without it the installed package raises ModuleNotFoundError (Policy 3.5).
  • Fix: Depend on the Debian package providing importlib_resources (a py3dist-overrides entry or an explicit Depends on python3-importlib-resources), or patch fluidsynth.py to import importlib.resources and use importlib.resources.files(), which Python 3.9+ provides, and drop it from setup.py's install_requires.
minor packaging 4. python3-pretty-midi embeds a copy of TimGM6mb.sf2 that duplicates the existing timgm6mb-soundfont package ◂
  • Files: pretty_midi/TimGM6mb.sf2, setup.py:11
  • Basis: inferred from what was read, not seen directly
  • Evidence: apt-cache timgm6mb-soundfont 1.3-5: TimGM6mb SoundFont from MuseScore 1.3 ... This package will be installed into /usr/share/sounds/sf2/; pretty_midi ships the same soundfont as package_data.
  • Problem: The soundfont is already in the archive under its own package, so the binary package carries a second ~6 MB copy and fixes to that package will not reach pretty_midi. Upstream's default (loading the file from its own package data) is only a convenience; Debian can use the packaged file. The duplicate is also the file whose copyright and licence debian/copyright gets wrong (see the licensing issue).
  • Fix: Depend on timgm6mb-soundfont and patch pretty_midi.fluidsynth.DEFAULT_SF2 to /usr/share/sounds/sf2/TimGM6mb.sf2, or justify keeping the copy and record its copyright and licence in debian/copyright.
Verified ◂
  • Read every file under debian/ (control, changelog, rules, copyright, docs, source/format, source/options, upstream/metadata); there are no patches, maintainer scripts, install files or debian/tests.
  • LICENSE.txt is the MIT licence with Copyright (c) 2014 Colin Raffel; debian/copyright's MIT paragraph reproduces it word for word, and a tree-wide grep for copyright/licence wording found no other statement except docs/conf.py's copyright = "Colin Raffel".
  • The debian/* stanza (GPL-2+, Alex Myczko) points at /usr/share/common-licenses/GPL-2 as usual; Files: * is the only upstream stanza and the file is machine-readable DEP-5.
  • example.mid is a MIDI example referenced by README.md and Tutorial.ipynb (the tests build their own MIDI in NamedTemporaryFile) and is not installed by the binary package (debian/docs installs only README.md).
  • pretty_midi/TimGM6mb.sf2 was not opened; it is identified as Tim Brechbill's TimGM6mb soundfont, which Debian packages as timgm6mb-soundfont (apt-cache: version 1.3-5, 'from MuseScore 1.3', homepage timbrechbill.com).
  • Checked dh-python's pydist database /usr/share/dh-python/dist/cpython3_fallback and pydist.py: numpy, mido and six are mapped, importlib-resources is not, so ${python3:Depends} will add the first three and skip the last.
  • apt-cache: python3-mido 1.3.3-0.4, python3-six 1.17.0-3, python3-numpy 1:2.4.6+ds-5 and python3-setuptools 84.2.0-1 exist; Standards-Version 4.7.4 agrees with the reviewing system's Policy in its first two components.
  • No build or test was run, and no binary file was opened.
  • uscan found the packaged version as the newest upstream release (upstream 0.2.11, packaged 0.2.11).
  • Every pointer of debian/copyright to /usr/share/common-licenses names a file that is there (GPL-2).
Not confirmed ◂
  • The exact licence of pretty_midi/TimGM6mb.sf2: it is stated nowhere in the package, the .sf2 was not opened, and timgm6mb-soundfont is not installed so its copyright could not be read.
  • Whether python3-importlib-resources still exists in the archive: it is not in the reviewing system's package lists (which also lack other existing packages), so this could not be settled; the missing Depends stands either way.
  • Whether example.mid is an original Colin Raffel work or a transcription of third-party music: its MIDI content was not opened, and it is not installed in the binary package.
  • debian/watch looks at github.com/craffel/@package@, but the Source field of debian/copyright names github.com/craffel/pretty-midi. Whether these are the same upstream was not checked.
  • debian/watch looks at github.com/craffel/@package@, but Repository in debian/upstream/metadata names github.com/craffel/pretty-midi. Whether these are the same upstream was not checked.
Proposed changes ◂

None.

Uploader's response to the LLM review

Waiting for the uploader's response until , because the review found serious issues.

Are you a maintainer or uploader of this package? Log in with Salsa to comment on the review.

Back to Dashboard | View all reviews for this package