#1144979 ITP: python-discid -- Python binding of Libdiscid

#1144979#5
Date:
2026-08-21 05:33:55 UTC
From:
To:

* Package name    : python-discid
  Version         : 1.4.2
  Upstream Author:  Johannes Dewender <brainz@JonnyJD.net>
* URL             : https://github.com/metabrainz/python-discid
* License         : LGPL-3.0
  Programming Lang: Python
  Description     : Python binding of Libdiscid

This is a dependency of laser and will be maintained in the Debian Python Team

Regards,

Aryan Karamtoth
Debian Maintainer
(IRC: Spaciouskarter78)

#1144979#10
Date:
2026-08-21 06:28:52 UTC
From:
To:
Hi

Note that we already have python-libdiscid (which builds an extension
module linking against libdiscid0 instead of using ctypes) in the
archive which has a compat interface for python-discid. See [1] and [2]
how this can be integrated.

Cheers

[1] https://salsa.debian.org/multimedia-team/picard/-/blob/master/debian/patches/0001-Require-python-libdiscid.patch?ref_type=heads
[2] https://salsa.debian.org/multimedia-team/picard/-/blob/master/picard/disc/__init__.py?ref_type=heads#L44

#1144979#15
Date:
2026-10-07 04:05:00 UTC
From:
To:
 > Note that we already have python-libdiscid (which builds an
extension module linking against libdiscid0 instead of using ctypes) in
the archive which has a compat interface for python-discid. See [1] and
[2]how this can be integrated.

Hi Sebastian,

python-discid is an official wrapper library from MusicBrainz, the
developers of libdiscid. I've also seen someone who had to rewrite their
software to make use of python-libdiscid because python-discid wasn't
available in the archive at that time [1].

Also, I'm packaging this for laser and I tried to see if I could
integrate the existing python-libdiscid functionality to it but laser
uses some functions that are specific to python-discid. Integrating
python-libdiscid into laser would require me to rewrite a large amount
of code and maintain it but packaging python-discid would be a lot
easier and would also benefit other users and software that wants to use
this version of the library.

[1] https://forums.raspberrypi.com/viewtopic.php?t=379415

#1144979#20
Date:
2026-10-07 19:44:15 UTC
From:
To:
Hi Aryan

I am not sure which functions you are referring to. The compat module of
python_libdiscid provides everything from discid. In any case, the
following patch works for laser:

diff --git a/src/metadata.py b/src/metadata.py
index 82c30de..561dea5 100644
--- a/src/metadata.py
+++ b/src/metadata.py
@@ -2,7 +2,10 @@ import os
 import re
 import asyncio

#1144979#25
Date:
2026-10-08 09:57:32 UTC
From:
To:
The Debian NEW review of python-discid 1.4.2-1 has been completed.

Decision: ACCEPTED
Reviewer: Andrew McMillan

Review comment:

Hi,

Accepted, but there are still some issues which should be fixed...

debian/copyright issues
=======================

Missing copyright holder — must fix. discid/disc.py:2 and test_discid.py:3 both carry # Copyright (C) 2017  Frederik "Freso" S. Olesen, but every Files: stanza names only Johannes Dewender and Philipp Wolfer. The holder is absent from debian/copyright. Fix: add Frederik S. Olesen to the * stanza's Copyright: list (at least for discid/disc.py and test_discid.py, or as a separate stanza).

Wrong short name: LGPL-3 should be LGPL-3+. All discid/*.py headers (e.g. discid/__init__.py:4-6) say "…Lesser General Public License … either version 3 of the License, or (at your option) any later version." DEP-5 short name LGPL-3 means version 3 only; the quoted text inside the copyright's own LGPL paragraph even reads "or (at your option) any later version" (debian/copyright:28-30). Fix: rename the short name (and the *, doc/*, debian/* stanzas) to LGPL-3+.

examples.py / test_discid.py are not LGPL-3+. They carry # This example/test is free. You can redistribute and/or modify it at will. (examples.py:2-3, test_discid.py:5), an informal permissive/public-domain-style grant, and no LGPL header. The * catch-all currently attributes LGPL-3 to them. Not a DFSG problem (clearly permissive), but the attribution is factually wrong; give them their own stanza or note the "at will" grant.

doc/* stanza: "LGPL-3 OR Expat" is unsupported. No file under doc/ is Expat-licensed; doc/index.rst:12-14 states the module docs are "LGNU Lesser General Public License Version 3 … or later (LGPL3+)". The "Expat" reference in debian/copyright:18 appears to be a carry-over from the relative, python-libdiscid which index.rst:36-37 mentions is Expat. Fix: doc/* should be LGPL-3+ (and the Expat paragraph then becomes unused).

Wrong common-licenses path in the Comment (debian/copyright:36-38). The comment says the LGPL v3 text lives at /usr/share/common-licenses/LGPL; on Debian that file is the LGPL-2.1 text — v3 is at /usr/share/common-licenses/LGPL-3. Fix the path (and with the short-name fix, the "version 3" wording becomes correct).


General packaging quality issues
================================

Watch file — likely broken, verify with uscan (debian/watch:1-5). It uses Version: 5 and Version-Mangle: s/^v// (fine — upstream tags are v1.4.2), but then Template: Github + Dist: https://github.com/metabrainz/python-discid. The v5 GitHub template is parameterised with Owner:/Project:, neither of which appears; Dist: is not a field of the GitHub template (the documented field set has Source, Template, Matching-Pattern, mangle/Repack/Compression/Search-Mode/Mode/Component/Version-Constraint etc., but no Dist), and the template name Github doesn't match GitHub. As written this is unlikely to resolve the release. Recommend the canonical form:

```
Version: 5
Version-Mangle: s/^v//
Template: GitHub
Owner: metabrainz
Project: python-discid
```

Unused/odd Build-Depends (debian/control:6-15). pre-commit and ruff are upstream dev tooling (see .pre-commit-config.yaml), not used anywhere by the build (debian/rules is a bare dh $@ --buildsystem=pybuild); pre-commit in a build dependency is especially unusual. python3-sphinx, python3-sphinx-autodoc-typehints, python3-sphinx-rtd-theme are likewise never invoked — there is no doc-build override and no dh-sequence-sphinxdoc, and the binary ships no docs. libdiscid-dev is only there to pull the runtime .so for a hypothetical build-time test import (nothing is compiled; discid loads libdiscid0 via ctypes).  Recommendation: drop pre-commit, ruff, and the three sphinx packages unless docs are actually built (and then add the sphinxdoc sequence/override); use libdiscid0 instead of libdiscid-dev in Build-Depends.

Thanks!

Full review details: https://dfsg-new-queue.debian.org/reviews/python-discid

#1144979#30
Date:
2026-10-08 10:00:13 UTC
From:
To:
We believe that the bug you reported is fixed in the latest version of
python-discid, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 1144979@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Aryan Karamtoth <spaciouscoder78@disroot.org> (supplier of updated python-discid package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@ftp-master.debian.org)
Format: 1.8
Date: Fri, 21 Aug 2026 11:07:32 +0530
Binary: python3-discid
Source: python-discid
Architecture: all source
Version: 1.4.2-1
Distribution: unstable
Urgency: medium
Maintainer: Debian Python Team <team+python@tracker.debian.org>
Changed-By: Aryan Karamtoth <spaciouscoder78@disroot.org>
Closes: 1144979
Description:
 python3-discid - Python binding for libdiscid (Python 3)
Changes:
 python-discid (1.4.2-1) unstable; urgency=medium
 .
   * Initial release. (Closes: #1144979)
Checksums-Sha1:
 66d27954658f46f289e225833d42363f4048f98d 2174 python-discid_1.4.2-1.dsc
 a316f94feb2b79a311491cb738b65c8abcfd5916 48536 python-discid_1.4.2.orig.tar.gz
 aebae2da694f6cc3de4666c9c3d45e610ad452db 2356 python-discid_1.4.2-1.debian.tar.xz
 d2607a846afaf62fa5974377bedc31d879f8e36b 7865 python-discid_1.4.2-1_all.buildinfo
 57c02e8ef3ad4ddc65735ed4cb5882a824fea8b1 12200 python3-discid_1.4.2-1_all.deb
Checksums-Sha256:
 6c987ae74d39cfa45551263695a280a6ecc2bd996356c8c4fe6b6ef61faf6c0f 2174 python-discid_1.4.2-1.dsc
 1e8e004220cba22651be124335a66f6bb30f458870e3dc4b7cac5eb2629c8016 48536 python-discid_1.4.2.orig.tar.gz
 9a9ebafe8b705d62d9415c77a013fe1f622c00165b170b87462eeaf8c8536bb1 2356 python-discid_1.4.2-1.debian.tar.xz
 0c77fe0f6338c4da3bc473c2d463ebb373e593e0de4bb249a9f48bf297eb3016 7865 python-discid_1.4.2-1_all.buildinfo
 465aaa59a513da7a1be195ae6a36ddde08c78dd594ca6d7b5c391a7ccdb4c97c 12200 python3-discid_1.4.2-1_all.deb
Files:
 e551cb85e44c747773251ff7c9e8d0c0 2174 python optional python-discid_1.4.2-1.dsc
 5457f214bcf8725d07f02ace4c4e5b4f 48536 python optional python-discid_1.4.2.orig.tar.gz
 c19b1d98e76f05114ab50d267ba2d866 2356 python optional python-discid_1.4.2-1.debian.tar.xz
 549b8e85da4ddd9351489584c711f81e 7865 python optional python-discid_1.4.2-1_all.buildinfo
 2741b8acc511ecc7dc5e173d398e2634 12200 python optional python3-discid_1.4.2-1_all.deb
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCgAdFiEE8Yvci2wl+QqiPVF0Y03E8GhwRvgFAmrHJrwACgkQY03E8Ghw
RvgA4hAAnl5tYxsGcZJ0enzQ0iQlMCVNVsixSEfmz1xK9yX+7pRYeVEhZnFTP2XW
AfxTFwO5jWlve4DwfBbBR/rvW59uiq7A2v9uRwn+H2OxKyrzdDbJDgsrSZzHr+b2
Y0suMVUIGI3wHSXwKo0q/sisLdMYYZUtpjVuZf+pXWi3criXjpAlL98mwab/+Upi
z655UuWbm4eEKDS14QdThRqZryRd3LoJkNLoIS+4glftuc2EeDgVfIpqKa3lJ/Zf
BapnTn9rxuBknqi/cWgKm6mtOFtPP6V7iP4W4wwER1N87mmVsHFmIXSxDNTDVNTj
Datzg4D4Q0KOwXT4TxV+QEvBS+YinQE1LA3G3XjVRCtMkt+79syfLLEidmE/ztyP
AHAFbr4SVfQRO0i4yODXSjCNb7A47Ex+gXSDbc0ZRmVwTLQzb2IWJlWJ/V8zitM6
YZ8K5ddIpRFlZYod9mFLaK/oDTQV2qGWZUPX8hbiJVOIPxaOC45e03cBbrBP8s/m
ETtcU62if4VeLJa3VhhacF4BUpLN4Li8R/21S8odJ5q7aeuBC4sG0U6sZvojlf5Q
JhvlXZy8IF8DdYdNNY5niiM9Fdwd5DkgCcgjX6p2qHsqqiInLU6/VqEpyO9S8MIn
ZyXtV5mosU/w2nrQykFqtGdiUXiDqywZv14dYIWkoVLsVVVpDwU=
=ICMg
-----END PGP SIGNATURE-----

#1144979#35
Date:
2026-10-11 12:38:48 UTC
From:
To:
Thanks for the review, I've fixed these issues in version 1.4.2-2 and
will get it uploaded to unstable shortly.