diff -Nru mutagen-1.46.0/debian/changelog mutagen-1.47.0/debian/changelog --- mutagen-1.46.0/debian/changelog 2023-07-13 13:11:48.000000000 +0000 +++ mutagen-1.47.0/debian/changelog 2023-10-21 14:56:51.000000000 +0000 @@ -1,511 +1,5 @@ -mutagen (1.46.0-2) unstable; urgency=medium +mutagen (1.47.0-0~ppa0~mantic) mantic; urgency=medium - * Team upload - * Remove retired uploader + * unofficial/untested trunk build - -- Bastian Germann Thu, 13 Jul 2023 15:11:48 +0200 - -mutagen (1.46.0-1) unstable; urgency=medium - - * Team upload. - - [ Louis-Philippe Véronneau ] - * d/watch: use git mode, since Release pages on Github can't be used with - uscan anymore. - * d/patches: refresh for new upstream. - * d/tests: make the unit tests more readable. - * d/control: Standards-Version update to 4.6.1. No changes. - * d/control: do not depend on libc-bin, as it's essential. - - -- Louis-Philippe Véronneau Sun, 30 Oct 2022 15:48:52 -0400 - -mutagen (1.45.1-3) unstable; urgency=medium - - [ Sandro Tosi ] - * Use the new Debian Python Team contact name and address - - [ Debian Janitor ] - * Remove constraints unnecessary since buster: - + Build-Depends: Drop versioned constraint on libc-bin and python3-sphinx. - - -- Sandro Tosi Wed, 04 May 2022 00:38:54 -0400 - -mutagen (1.45.1-2) unstable; urgency=medium - - [ Ondřej Nový ] - * d/control: Update Vcs-* fields with new Debian Python Team Salsa - layout. - - [ Michael Hudson-Doyle ] - * d/tests/control: Add python3-all to Depends: (Closes: #972526) - - -- Tristan Seligmann Tue, 20 Oct 2020 09:43:23 +0200 - -mutagen (1.45.1-1) unstable; urgency=medium - - * New upstream release. - - -- Tristan Seligmann Thu, 20 Aug 2020 18:04:10 +0200 - -mutagen (1.45.0-2) unstable; urgency=medium - - * Add Breaks: beets (old autopkgtests fail with new mutagen). - * Fix privacy violations. - - -- Tristan Seligmann Wed, 12 Aug 2020 16:12:40 +0200 - -mutagen (1.45.0-1) unstable; urgency=low - - [ Debian Janitor ] - * Bump debhelper from old 11 to 12. - * Set upstream metadata fields: Bug-Database, Bug-Submit, Repository, - Repository-Browse. - - [ Tristan Seligmann ] - * New upstream release. - * Declare rootless build. - * Bump debhelper-compat to 13. - * Bump Standards-Version to 4.5.0 (no changes). - * Override Lintian warnings about binaries. - * Add autopkgtests. - * Simplify rules. - - -- Tristan Seligmann Wed, 22 Jul 2020 18:42:13 +0200 - -mutagen (1.44.0-1) unstable; urgency=medium - - [ Ondřej Nový ] - * Use debhelper-compat instead of debian/compat. - - [ Sandro Tosi ] - * New upstream release; Closes: #952213 - - drop python2 and PyPy support; Closes: #937094 - * debian/copyright - - update copyright information - * debian/patches/use-system-inventory - - update patch to new upstream code - * debian/control - - add setuptools to b-d, needed by new code - - just b-d on python3-doc, needed for intersphinx objects; Closes: #951846 - * debian/python-mutagen-doc.doc-base - - register doc-base against the python-mutagen-doc content - - -- Sandro Tosi Sun, 15 Mar 2020 18:34:54 -0400 - -mutagen (1.40.0-2) unstable; urgency=medium - - * Team upload. - - [ Ondřej Nový ] - * Convert git repository from git-dpm to gbp layout - - [ Mattia Rizzolo ] - * Switch to python3.7-doc. - - -- Mattia Rizzolo Wed, 19 Dec 2018 02:48:06 +0100 - -mutagen (1.40.0-1) unstable; urgency=medium - - [ Ondřej Nový ] - * d/control: Set Vcs-* to salsa.debian.org - * d/copyright: Use https protocol in Format field - * d/control: Remove ancient X-Python-Version field - - [ Tristan Seligmann ] - * New upstream release (closes: #900128). - * Switch to Python 3 for Sphinx. - * Override lintian warning about helper binaries. - * Bump Standards-Version to 4.1.4 (no changes). - * Drop Simon Chopin from Uploaders; thanks for the past work on mutagen! - (closes: #889764) - * Bump debhelper compat level to 11. - - -- Tristan Seligmann Sun, 10 Jun 2018 18:17:44 +0200 - -mutagen (1.38-1) unstable; urgency=medium - - * Update watch file. - * New upstream release. - * Use Python 3.6 docs instead of 3.5 (closes: #871426). - * Run wrap-and-sort -t -s. - * Bump Standards-Version to 4.0.0 (no changes). - - -- Tristan Seligmann Tue, 08 Aug 2017 03:53:42 +0200 - -mutagen (1.36-1) unstable; urgency=medium - - * New upstream release. - - -- Tristan Seligmann Mon, 26 Dec 2016 14:18:19 +0200 - -mutagen (1.35.1-1) unstable; urgency=medium - - * New upstream release. - - Build-depend on python-pytest. - - -- Tristan Seligmann Fri, 16 Dec 2016 11:14:30 +0200 - -mutagen (1.34.1-1) unstable; urgency=medium - - * New upstream release. - * Fix debian/watch again. - - -- Tristan Seligmann Mon, 29 Aug 2016 01:04:22 +0200 - -mutagen (1.34-1) unstable; urgency=medium - - * Update Homepage: link (closes: #833332). - * Fix debian/watch. - * New upstream release. - - -- Tristan Seligmann Wed, 03 Aug 2016 12:14:49 +0200 - -mutagen (1.33.2-1) unstable; urgency=medium - - * New upstream release. - * Fix docs patch for using system inventory, and disable network access. - - -- Tristan Seligmann Sat, 16 Jul 2016 18:29:00 +0200 - -mutagen (1.33.1-1) unstable; urgency=medium - - * New upstream release. - - -- Tristan Seligmann Mon, 04 Jul 2016 00:20:27 +0200 - -mutagen (1.32-1) unstable; urgency=medium - - [ Ondřej Nový ] - * Fixed VCS URL (https) - - [ Tristan Seligmann ] - * New upstream release. - * Bump Standards-Version to 3.9.8 (no changes). - - -- Tristan Seligmann Sun, 22 May 2016 04:27:36 +0200 - -mutagen (1.31-1) unstable; urgency=medium - - * New upstream release. - - Refresh patches/use-rtd-package. - * Fix Homepage url. - - -- Tristan Seligmann Sat, 19 Sep 2015 02:05:12 +0200 - -mutagen (1.30-1) unstable; urgency=medium - - * New upstream release. - - -- Tristan Seligmann Sat, 29 Aug 2015 07:40:43 +0200 - -mutagen (1.29-1) unstable; urgency=medium - - * New upstream release. - - -- Tristan Seligmann Fri, 31 Jul 2015 08:59:21 +0200 - -mutagen (1.28-2) unstable; urgency=medium - - * Reupload to unstable with minor changes. - * Use sphinx inventory from python-doc instead of the web. - - -- Tristan Seligmann Fri, 01 May 2015 01:38:04 +0200 - -mutagen (1.28-1) experimental; urgency=low - - * New upstream release. - - New release signing key. - - -- Tristan Seligmann Sun, 15 Mar 2015 14:25:12 +0200 - -mutagen (1.27-1) experimental; urgency=low - - * New upstream release. - - -- Tristan Seligmann Mon, 08 Dec 2014 01:45:10 +0200 - -mutagen (1.25.1-1) unstable; urgency=low - - * New upstream release. - * Make debian/copyright DEP-5 compliant. - * Update debian/copyright. - * Enable signature verification in debian/watch. - - -- Tristan Seligmann Sun, 19 Oct 2014 15:23:22 +0200 - -mutagen (1.25-1) unstable; urgency=medium - - * New upstream release. - * Build python3-mutagen package. - * Bump Standards-Version. - - -- Tristan Seligmann Sat, 04 Oct 2014 00:40:46 +0200 - -mutagen (1.24-1) unstable; urgency=medium - - * New upstream release. - - -- Tristan Seligmann Sun, 28 Sep 2014 00:49:44 +0200 - -mutagen (1.23-2) unstable; urgency=medium - - * Explicitly set LC_ALL=C.UTF-8 to avoid test suite failures if LC_ALL is - set to something else in the environment during a build (closes: #753141). - - -- Tristan Seligmann Sun, 27 Jul 2014 07:36:35 +0200 - -mutagen (1.23-1) unstable; urgency=medium - - * New upstream release. (Closes: #751155) - * Switch to pybuild. - * Bump Standards-Version. - * Build pypy-mutagen package for pypy. - - -- Tristan Seligmann Sat, 14 Jun 2014 14:01:23 +0200 - -mutagen (1.22-1) unstable; urgency=low - - [ Tristan Seligmann ] - * Update my email address. - * Update Homepage. (Closes: #673615) - - [ Simon Chopin ] - * New upstream release. - + Document copyright on docs/id3_frames_gen.py to Christoph Reiter. - + Bump X-Python-Version to 2.6. - + Drop all patches as being applied upstream. - + Add a dependency on libc-bin and use the C.UTF-8 locale to run the - tests. - * Add myself to Uploaders. - * Regenerate the man pages during the build. - * Add a new package python-mutagen-doc with the Sphinx documentation. - - -- Tristan Seligmann Mon, 25 Nov 2013 01:06:19 +0200 - -mutagen (1.21-1) unstable; urgency=low - - * Team upload. - - [ Jakub Wilk ] - * Use canonical URIs for Vcs-* fields. - - [ Simon Chopin ] - * New upstream version (Closes: #709810) - + Drop the patches integrated upstream: - -remove-hashbang.diff - -mpeg-length.diff - -mpeg-length-remove.diff - + Add a patch to fix an undefined name - * Bump Standard-Version to 3.9.4: - + Bump debhelper dependency to >= 9 to benefit from -arch/-indep targets - + Reorder dh arguments in d/rules - * Add Christoph Reiter to the copyright file. - - -- Simon Chopin Tue, 16 Jul 2013 23:24:27 +0200 - -mutagen (1.20-1) unstable; urgency=low - - * New upstream release (closes: #636710). - * Acknowledge NMUs (thanks to Jakub Wilk and Alessio Treglia). - * Bump Standards-Version (no changes needed). - * Run the test suite during build; thanks to Andrey Rahmatullin for the - patch. (closes: #616106) - * Add DPMT to Uploaders. - * Remove preinst script, since we no longer need to support upgrades from - lenny. - - -- Tristan Seligmann Sun, 11 Sep 2011 20:04:44 +0200 - -mutagen (1.19-2.2) unstable; urgency=low - - * Non-maintainer upload. - * Fix wrong file length calculation (Closes: #637061): - - debian/patches/mpeg-length.diff: Fix CBR length calculation, it used - the rounded frame_length including the current frame's padding. - - debian/patches/mpeg-length-remove.diff: Remove the code which should - have prevented the use of impossible lengths by performing the - 'bitrate/file size' check. This was never used because the args are - switched, plus the calculation is wrong as the result is 1/64 of the - real length. - - -- Alessio Treglia Mon, 08 Aug 2011 10:15:32 +0200 - -mutagen (1.19-2.1) unstable; urgency=low - - * Non-maintainer upload (with maintainer's permission). - * Rebuild against python-defaults (>= 2.6.6-14) - - -- Jakub Wilk Mon, 02 May 2011 21:48:11 +0200 - -mutagen (1.19-2) unstable; urgency=low - - * Switch from cdbs / pycentral to dh / pysupport. - - -- Tristan Seligmann Sun, 30 May 2010 09:20:53 +0200 - -mutagen (1.19-1) UNRELEASED; urgency=low - - [ Jakub Wilk ] - * Fix watch file. - - [ Tristan Seligmann ] - * New upstream release. - * Switch to 3.0 (quilt) format. - - -- Tristan Seligmann Thu, 20 May 2010 20:18:03 +0200 - -mutagen (1.15-2) unstable; urgency=low - - * Upload to unstable. - - -- Tristan Seligmann Mon, 16 Feb 2009 19:55:06 +0200 - -mutagen (1.15-1) experimental; urgency=low - - * New upstream release (closes: #510149). - * Add ${misc:Depends} to debian/control. - * Update VCS / Homepage URLs in debian/control. - * Bump Standards-Version to 3.8.0. - * Update watch file. - * Switch to quilt. - - -- Tristan Seligmann Thu, 29 Jan 2009 22:49:25 +0200 - -mutagen (1.14-1) unstable; urgency=low - - * New upstream release. - * Update my e-mail address. - - -- Tristan Seligmann Mon, 02 Jun 2008 23:55:07 +0200 - -mutagen (1.13-1) unstable; urgency=low - - * New upstream release. - - FLAC: Raise IOError, instead of UnboundLocalError, when trying to open a - non-existant file (closes: #448734). - - TCP/TCMP support (closes: #452231). - - 2x-100x speedup writing files on filesystems that don't support mmap(). - * Add Vcs-Darcs field. - * Move Homepage into source package field. - * Bump to debhelper v6. - * Bump Standards-Version. - - -- Tristan Seligmann Sat, 26 Jan 2008 20:56:45 +0200 - -mutagen (1.11-1) unstable; urgency=medium - - * New upstream release. - - Medium urgency: fixes a major bug reading TDAT frames; month and day - were reversed. - * Remove lintian override as this should be fixed upstream shortly. - - -- Tristan Seligmann Fri, 27 Apr 2007 18:52:30 +0200 - -mutagen (1.10.1-1) unstable; urgency=low - - * New upstream version. - - Fix id3 syncsafe / flag handling that could cause data corruption in - some instances (closes: #403542). - - Allow skipping over ID3 tags incorrectly present in FLAC files, instead - of choking on them (closes: #411431) - - Fix reading of GStreamer-corrupted Ogg files (closes: #411432). - - Correct invalid APEv2 tag key and flags handling (closes: #411433). - - Supercedes previous NMUs, thanks guys! (closes: #412874). - * Add note to README.Debian about mutagen.m4a deprecation. - * Add lintian override to suppress bogus warning about python-central being - needed to run the clean target (it's not). - - -- Tristan Seligmann Sun, 22 Apr 2007 23:57:03 +0200 - -mutagen (1.8-1) unstable; urgency=low - - * New upstream version. - - -- Tristan Seligmann Mon, 9 Oct 2006 00:04:58 +0200 - -mutagen (1.7.1-1) unstable; urgency=low - - * New upstream version. - * Bump version on python-central build-dep. - - -- Tristan Seligmann Sun, 1 Oct 2006 03:14:57 +0200 - -mutagen (1.6-1) unstable; urgency=low - - * New upstream version. - * Install upstream changelog as changelog.gz (closes: #376575). - - Thanks to Bastian Kleineidam for the patch. - * Tweak watch file. - * Add Provides: pythonX.Y-mutagen. - - -- Tristan Seligmann Sat, 12 Aug 2006 16:13:06 +0200 - -mutagen (1.5.1-1) unstable; urgency=low - - * New upstream version. - * Add lintian overrides. - - -- Tristan Seligmann Tue, 27 Jun 2006 03:51:48 +0200 - -mutagen (1.5-1) unstable; urgency=low - - * New upstream version. - * Adopt package (closes: #374502). - * Convert to cdbs and python-central. - * Add watch file. - - -- Tristan Seligmann Wed, 21 Jun 2006 21:25:57 +0200 - -mutagen (1.4-2) unstable; urgency=low - - * Update to new Python policy (XS-Python-Version >= 2.3). - - -- Joe Wreschnig Tue, 13 Jun 2006 14:10:31 -0500 - -mutagen (1.4-1) unstable; urgency=low - - * New upstream version. - * debian/control: Remove pyvorbis Suggests/mention. - * debian/rules: Add no-op rules to shush lintian. - - -- Joe Wreschnig Sat, 3 Jun 2006 20:15:00 -0500 - -mutagen (1.3-1) unstable; urgency=low - - * New upstream version. - * debian/rules: Let setup.py handle tools and man pages. - - -- Joe Wreschnig Mon, 29 May 2006 22:06:48 -0500 - -mutagen (1.2-2) unstable; urgency=low - - * Use python-support. - * Standards-Version 3.7.2 (no updates required). - - -- Joe Wreschnig Sat, 13 May 2006 02:12:22 -0500 - -mutagen (1.2-1) unstable; urgency=low - - * New upstream version. - * debian/control: Suggest python-pyvorbis. - * debian/docs: Add TUTORIAL. - - -- Joe Wreschnig Sun, 23 Apr 2006 01:09:14 -0500 - -mutagen (1.1-1) unstable; urgency=low - - * New upstream version. - - -- Joe Wreschnig Tue, 4 Apr 2006 01:06:20 -0500 - -mutagen (1.0-1) unstable; urgency=low - - * New upstream version. - - -- Joe Wreschnig Mon, 13 Mar 2006 16:20:14 -0600 - -mutagen (0.9-1) unstable; urgency=low - - * Initial release. (Closes: #353505) - - -- Joe Wreschnig Tue, 21 Feb 2006 03:06:14 -0600 + -- Christoph Reiter Sat, 21 Oct 2023 16:56:51 +0200 diff -Nru mutagen-1.46.0/debian/clean mutagen-1.47.0/debian/clean --- mutagen-1.46.0/debian/clean 2023-07-13 13:09:57.000000000 +0000 +++ mutagen-1.47.0/debian/clean 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -docs/api/id3_frames.rst diff -Nru mutagen-1.46.0/debian/compat mutagen-1.47.0/debian/compat --- mutagen-1.46.0/debian/compat 1970-01-01 00:00:00.000000000 +0000 +++ mutagen-1.47.0/debian/compat 2023-10-21 14:56:51.000000000 +0000 @@ -0,0 +1 @@ +9 diff -Nru mutagen-1.46.0/debian/control mutagen-1.47.0/debian/control --- mutagen-1.46.0/debian/control 2023-07-13 13:09:57.000000000 +0000 +++ mutagen-1.47.0/debian/control 2023-10-21 14:56:51.000000000 +0000 @@ -1,36 +1,29 @@ Source: mutagen Section: python Priority: optional -Maintainer: Debian Python Team +Maintainer: Tristan Seligmann +Uploaders: + Debian Python Modules Team , Build-Depends: - debhelper-compat (= 13), - dh-sequence-python3, - dh-sequence-sphinxdoc , - faad , - flac , - oggz-tools , + debhelper (>= 9), + dh-python, + faad, + flac, + libc-bin (>= 2.13), + oggz-tools, python3-all, - python3-doc , - python3-docutils, - python3-hypothesis , - python3-pycodestyle , - python3-pyflakes , - python3-pytest , python3-setuptools, - python3-sphinx , - python3-sphinx-rtd-theme , - vorbis-tools , -Standards-Version: 4.6.1 -Vcs-Git: https://salsa.debian.org/python-team/packages/mutagen.git -Vcs-Browser: https://salsa.debian.org/python-team/packages/mutagen + vorbis-tools +Standards-Version: 4.1.4 +Vcs-Git: https://salsa.debian.org/python-team/modules/mutagen.git +Vcs-Browser: https://salsa.debian.org/python-team/modules/mutagen Homepage: https://github.com/quodlibet/mutagen -Rules-Requires-Root: no Package: python3-mutagen Architecture: all -Depends: ${misc:Depends}, ${python3:Depends} -Suggests: python-mutagen-doc -Breaks: beets (<< 1.4.9-6~), python-mutagen (<< 1.44.0-1) +Depends: ${misc:Depends}, ${python3:Depends}, + python3-pkg-resources +Breaks: python-mutagen (<< 1.44.0-1) Replaces: python-mutagen (<< 1.44.0-1) Description: audio metadata editing library (Python 3) Mutagen is a Python module to handle audio metadata. It supports FLAC, @@ -42,21 +35,3 @@ Ogg streams on an individual packet/page level. . This package is built for Python 3. - -Package: python-mutagen-doc -Architecture: all -Section: doc -Depends: ${misc:Depends}, ${sphinxdoc:Depends} -Recommends: python3-mutagen -Built-Using: ${sphinxdoc:Built-Using} -Build-Profiles: -Description: audio metadata editing library - documentation - Mutagen is a Python module to handle audio metadata. It supports FLAC, - M4A, MP3, Ogg FLAC, Ogg Speex, Ogg Theora, Ogg Vorbis, True Audio, and - WavPack audio files. All versions of ID3v2 are supported, and all - standard ID3v2.4 frames are parsed. It can read Xing headers to - accurately calculate the bitrate and length of MP3s. ID3 and APEv2 - tags can be edited regardless of audio format. It can also manipulate - Ogg streams on an individual packet/page level. - . - This package provides documentation for the mutagen package. diff -Nru mutagen-1.46.0/debian/copyright mutagen-1.47.0/debian/copyright --- mutagen-1.46.0/debian/copyright 2023-07-13 13:09:57.000000000 +0000 +++ mutagen-1.47.0/debian/copyright 2023-10-21 14:56:51.000000000 +0000 @@ -1,7 +1,7 @@ -Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ Upstream-Name: Mutagen -Upstream-Contact: Christoph Reiter -Source: https://bitbucket.org/lazka/mutagen +Upstream-Contact: Christoph Reiter +Source: https://github.com/quodlibet/mutagen Files: * Copyright: 2005-2006, 2009 Joe Wreschnig diff -Nru mutagen-1.46.0/debian/patches/0003-Drop-external-images-from-README.rst.patch mutagen-1.47.0/debian/patches/0003-Drop-external-images-from-README.rst.patch --- mutagen-1.46.0/debian/patches/0003-Drop-external-images-from-README.rst.patch 2023-07-13 13:09:57.000000000 +0000 +++ mutagen-1.47.0/debian/patches/0003-Drop-external-images-from-README.rst.patch 1970-01-01 00:00:00.000000000 +0000 @@ -1,27 +0,0 @@ -From: Tristan Seligmann -Date: Wed, 12 Aug 2020 16:01:17 +0200 -Subject: Drop external images from README.rst - ---- - README.rst | 7 ------- - 1 file changed, 7 deletions(-) - -Index: mutagen/README.rst -=================================================================== ---- mutagen.orig/README.rst -+++ mutagen/README.rst -@@ -1,7 +1,3 @@ --.. image:: https://raw.githubusercontent.com/quodlibet/mutagen/master/docs/images/logo.svg -- :align: center -- :width: 400px -- - | - - Mutagen is a Python module to handle audio metadata. It supports ASF, FLAC, -@@ -18,6 +14,3 @@ under `the GPL version 2 or - later `__. - - For more information visit https://mutagen.readthedocs.org -- --.. image:: https://codecov.io/gh/quodlibet/mutagen/branch/master/graph/badge.svg -- :target: https://codecov.io/gh/quodlibet/mutagen diff -Nru mutagen-1.46.0/debian/patches/series mutagen-1.47.0/debian/patches/series --- mutagen-1.46.0/debian/patches/series 2023-07-13 13:09:57.000000000 +0000 +++ mutagen-1.47.0/debian/patches/series 2023-10-21 14:56:51.000000000 +0000 @@ -1,3 +1 @@ -use-rtd-package -use-system-inventory -0003-Drop-external-images-from-README.rst.patch + diff -Nru mutagen-1.46.0/debian/patches/use-rtd-package mutagen-1.47.0/debian/patches/use-rtd-package --- mutagen-1.46.0/debian/patches/use-rtd-package 2023-07-13 13:09:57.000000000 +0000 +++ mutagen-1.47.0/debian/patches/use-rtd-package 1970-01-01 00:00:00.000000000 +0000 @@ -1,23 +0,0 @@ -From: Tristan Seligmann -Date: Thu, 8 Oct 2015 09:57:12 -0700 -Subject: Use the Debian package of the sphinx-rtd theme - -Forwarded: no -Last-Update: 2014-12-08 -Patch-Name: use-rtd-package ---- - docs/conf.py | 1 + - 1 file changed, 1 insertion(+) - -Index: mutagen/docs/conf.py -=================================================================== ---- mutagen.orig/docs/conf.py -+++ mutagen/docs/conf.py -@@ -1,6 +1,7 @@ - - import os - import sys -+import sphinx_rtd_theme - - dir_ = os.path.dirname(os.path.realpath(__file__)) - sys.path.insert(0, dir_) diff -Nru mutagen-1.46.0/debian/patches/use-system-inventory mutagen-1.47.0/debian/patches/use-system-inventory --- mutagen-1.46.0/debian/patches/use-system-inventory 2023-07-13 13:09:57.000000000 +0000 +++ mutagen-1.47.0/debian/patches/use-system-inventory 1970-01-01 00:00:00.000000000 +0000 @@ -1,23 +0,0 @@ -From: Tristan Seligmann -Date: Thu, 8 Oct 2015 09:57:13 -0700 -Subject: Use the system copy of the Python documentation inventory - -Forwarded: no -Patch-Name: use-system-inventory ---- - docs/conf.py | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -Index: mutagen/docs/conf.py -=================================================================== ---- mutagen.orig/docs/conf.py -+++ mutagen/docs/conf.py -@@ -16,7 +16,7 @@ extensions = [ - 'sphinx.ext.extlinks', - ] - intersphinx_mapping = { -- 'python': ('https://docs.python.org/3', None), -+ 'python': ('https://docs.python.org/3', '/usr/share/doc/python3/html/objects.inv'), - } - source_suffix = '.rst' - master_doc = 'index' diff -Nru mutagen-1.46.0/debian/python3-mutagen.lintian-overrides mutagen-1.47.0/debian/python3-mutagen.lintian-overrides --- mutagen-1.46.0/debian/python3-mutagen.lintian-overrides 2023-07-13 13:09:57.000000000 +0000 +++ mutagen-1.47.0/debian/python3-mutagen.lintian-overrides 1970-01-01 00:00:00.000000000 +0000 @@ -1,3 +0,0 @@ -# These are "demo" type utilities -python3-mutagen binary: application-in-library-section -python3-mutagen binary: library-package-name-for-application diff -Nru mutagen-1.46.0/debian/python-mutagen-doc.doc-base mutagen-1.47.0/debian/python-mutagen-doc.doc-base --- mutagen-1.46.0/debian/python-mutagen-doc.doc-base 2023-07-13 13:09:57.000000000 +0000 +++ mutagen-1.47.0/debian/python-mutagen-doc.doc-base 1970-01-01 00:00:00.000000000 +0000 @@ -1,9 +0,0 @@ -Document: mutagen -Title: mutagen -Author: Christoph Reitner -Abstract: Python library to edit audio metadata. -Section: Sound - -Format: HTML -Index: /usr/share/doc/python-mutagen-doc/html/index.html -Files: /usr/share/doc/python-mutagen-doc/html/*.html diff -Nru mutagen-1.46.0/debian/python-mutagen-doc.docs mutagen-1.47.0/debian/python-mutagen-doc.docs --- mutagen-1.46.0/debian/python-mutagen-doc.docs 2023-07-13 13:09:57.000000000 +0000 +++ mutagen-1.47.0/debian/python-mutagen-doc.docs 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -.pybuild/docs/* diff -Nru mutagen-1.46.0/debian/python-mutagen-doc.links mutagen-1.47.0/debian/python-mutagen-doc.links --- mutagen-1.46.0/debian/python-mutagen-doc.links 2023-07-13 13:09:57.000000000 +0000 +++ mutagen-1.47.0/debian/python-mutagen-doc.links 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -/usr/share/doc/python-mutagen/html/_sources /usr/share/doc/python-mutagen/rst diff -Nru mutagen-1.46.0/debian/python-mutagen.docs mutagen-1.47.0/debian/python-mutagen.docs --- mutagen-1.46.0/debian/python-mutagen.docs 1970-01-01 00:00:00.000000000 +0000 +++ mutagen-1.47.0/debian/python-mutagen.docs 2023-10-21 14:56:51.000000000 +0000 @@ -0,0 +1 @@ +README.rst diff -Nru mutagen-1.46.0/debian/rules mutagen-1.47.0/debian/rules --- mutagen-1.46.0/debian/rules 2023-07-13 13:09:57.000000000 +0000 +++ mutagen-1.47.0/debian/rules 2023-10-21 14:56:51.000000000 +0000 @@ -1,33 +1,14 @@ #!/usr/bin/make -f export PYBUILD_NAME=mutagen - -# This is generally a good idea to avoid littering the filesystem with unneeded -# pyc files, but it is also specifically needed to avoid byte-compilation of -# the binaries in tools/ when the test suite is run. -export PYTHONDONTWRITEBYTECODE=yes - -# Set UTF-8 locale as the tests expect this -export LC_ALL=C.UTF-8 - -export PYBUILD_TEST_ARGS=-m 'not quality' +export PYBUILD_DISABLE=test %: - dh $@ --buildsystem=pybuild + dh $@ --with python3 --buildsystem=pybuild -execute_after_dh_auto_build: -ifeq ($(filter nodoc,$(DEB_BUILD_PROFILES)),) - PYTHONPATH=. \ - http_proxy='127.0.0.1:9' \ - https_proxy='127.0.0.1:9' \ - python3 -m sphinx -N -b html docs/ $(CURDIR)/.pybuild/docs/html/ - $(MAKE) -C docs/man -endif +override_dh_auto_install: + dh_auto_install override_dh_installchangelogs: dh_installchangelogs NEWS - - -execute_after_dh_clean: - rm -rf docs/man/_man diff -Nru mutagen-1.46.0/debian/tests/control mutagen-1.47.0/debian/tests/control --- mutagen-1.46.0/debian/tests/control 2023-07-13 13:09:57.000000000 +0000 +++ mutagen-1.47.0/debian/tests/control 1970-01-01 00:00:00.000000000 +0000 @@ -1,2 +0,0 @@ -Tests: unittests -Depends: @, python3-hypothesis, python3-pytest, python3-all diff -Nru mutagen-1.46.0/debian/tests/unittests mutagen-1.47.0/debian/tests/unittests --- mutagen-1.46.0/debian/tests/unittests 2023-07-13 13:09:57.000000000 +0000 +++ mutagen-1.47.0/debian/tests/unittests 1970-01-01 00:00:00.000000000 +0000 @@ -1,12 +0,0 @@ -#!/bin/sh -set -efu - -pys="$(py3versions -s 2> /dev/null)" - -cp -a tests "$AUTOPKGTEST_TMP" -cd "$AUTOPKGTEST_TMP" - -for py in $pys; do - echo "=== $py ===" - $py -m pytest -m "not quality" 2>&1 -done diff -Nru mutagen-1.46.0/debian/upstream/metadata mutagen-1.47.0/debian/upstream/metadata --- mutagen-1.46.0/debian/upstream/metadata 2023-07-13 13:09:57.000000000 +0000 +++ mutagen-1.47.0/debian/upstream/metadata 1970-01-01 00:00:00.000000000 +0000 @@ -1,5 +0,0 @@ ---- -Bug-Database: https://github.com/quodlibet/mutagen/issues -Bug-Submit: https://github.com/quodlibet/mutagen/issues/new -Repository: https://github.com/quodlibet/mutagen.git -Repository-Browse: https://github.com/quodlibet/mutagen diff -Nru mutagen-1.46.0/debian/watch mutagen-1.47.0/debian/watch --- mutagen-1.46.0/debian/watch 2023-07-13 13:09:57.000000000 +0000 +++ mutagen-1.47.0/debian/watch 2023-10-21 14:56:51.000000000 +0000 @@ -1,4 +1,4 @@ version=4 -opts="mode=git" \ -https://github.com/quodlibet/mutagen.git \ -refs/tags/release-([\d\.]+) +opts=filenamemangle=s/.+\/mutagen-?(\d\S+)\.tar\.gz/mutagen-$1\.tar\.gz/,\ +pgpsigurlmangle=s/$/.sig/ \ + https://github.com/quodlibet/mutagen/releases .*/mutagen-(\d\S+)\.tar\.gz diff -Nru mutagen-1.46.0/docs/conf.py mutagen-1.47.0/docs/conf.py --- mutagen-1.46.0/docs/conf.py 2022-10-09 17:32:53.000000000 +0000 +++ mutagen-1.47.0/docs/conf.py 2023-09-03 16:24:25.000000000 +0000 @@ -26,10 +26,10 @@ exclude_patterns = ['_build'] extlinks = { - 'bug': ('https://github.com/quodlibet/mutagen/issues/%s', '#'), - 'pr': ('https://github.com/quodlibet/mutagen/pull/%s', '#pr'), - 'commit': ('https://github.com/quodlibet/mutagen/commit/%s', '#'), - 'user': ('https://github.com/%s', ''), + 'bug': ('https://github.com/quodlibet/mutagen/issues/%s', '#%s'), + 'pr': ('https://github.com/quodlibet/mutagen/pull/%s', '#pr%s'), + 'commit': ('https://github.com/quodlibet/mutagen/commit/%s', '%s'), + 'user': ('https://github.com/%s', '%s'), } diff -Nru mutagen-1.46.0/fuzzing/fuzztools.py mutagen-1.47.0/fuzzing/fuzztools.py --- mutagen-1.46.0/fuzzing/fuzztools.py 2022-10-09 17:32:53.000000000 +0000 +++ mutagen-1.47.0/fuzzing/fuzztools.py 2023-09-03 16:24:25.000000000 +0000 @@ -1,9 +1,3 @@ - -import sys -import glob -import os -import traceback -import textwrap from io import BytesIO from mutagen import File, Metadata @@ -49,52 +43,51 @@ # OPENERS = [AAC] -def run(opener, data): - f = BytesIO(data) +def run(opener, f): try: res = opener(f) except MutagenError: + return + + # File is special and returns None if loading fails + if opener is File and res is None: + return + + # These can still fail because we might need to parse more data + # to rewrite the file + + f.seek(0) + try: + res.save(f) + except MutagenError: pass - else: - # File is special and returns None if loading fails - if opener is File and res is None: - return - # These can still fail because we might need to parse more data - # to rewrite the file + f.seek(0) + res = opener(f) - f.seek(0) - try: - res.save(f) - except MutagenError: - pass + f.seek(0) + try: + res.delete(f) + except MutagenError: + pass + # These can also save to empty files + if isinstance(res, Metadata): + f = BytesIO() + res.save(f) f.seek(0) - res = opener(f) - + opener(f) f.seek(0) - try: - res.delete(f) - except MutagenError: - pass - - # These can also save to empty files - if isinstance(res, Metadata): - f = BytesIO() - res.save(f) - f.seek(0) - opener(f) - f.seek(0) - res.delete(f) + res.delete(f) def run_all(data): - for opener in OPENERS: - run(opener, data) + f = BytesIO(data) + [run(opener, f) for opener in OPENERS] def group_crashes(result_path): - """Re-cchecks all errors, and groups them by stack trace + """Re-checks all errors, and groups them by stack trace and error type. """ @@ -140,4 +133,9 @@ if __name__ == '__main__': + import sys + import glob + import os + import traceback + import textwrap group_crashes(sys.argv[1]) diff -Nru mutagen-1.46.0/fuzzing/run.sh mutagen-1.47.0/fuzzing/run.sh --- mutagen-1.46.0/fuzzing/run.sh 2022-10-09 17:32:53.000000000 +0000 +++ mutagen-1.47.0/fuzzing/run.sh 2023-09-03 16:24:25.000000000 +0000 @@ -14,10 +14,12 @@ mkdir -p "$RESULTS" mkdir -p "$EXAMPLES" +cp -f ../tests/data/* "$EXAMPLES" + for i in `seq 2 $(nproc)`; do py-afl-fuzz -i "$EXAMPLES" -o "$RESULTS" -S "worker-$i" -- $(which python) sut.py > /dev/null 2>&1 & done py-afl-fuzz -i "$EXAMPLES" -o "$RESULTS" -M "main" -- $(which python) sut.py > /dev/null 2>&1 & watch -n 1 -c afl-whatsup -s "$RESULTS" -pkill afl-fuzz \ No newline at end of file +pkill afl-fuzz diff -Nru mutagen-1.46.0/.github/workflows/test.yml mutagen-1.47.0/.github/workflows/test.yml --- mutagen-1.46.0/.github/workflows/test.yml 2022-10-09 17:32:53.000000000 +0000 +++ mutagen-1.47.0/.github/workflows/test.yml 2023-09-03 16:24:25.000000000 +0000 @@ -10,13 +10,13 @@ fail-fast: false matrix: os: [ubuntu-latest, macos-latest, windows-latest] - python-version: [3.7, 3.8, 3.9, '3.10', pypy-3.7] + python-version: [3.7, 3.8, 3.9, '3.10', 3.11, '3.12', 'pypy-3.8'] exclude: # hangs - os: macos-latest - python-version: pypy-3.7 + python-version: pypy-3.8 - os: windows-latest - python-version: pypy-3.7 + python-version: pypy-3.8 include: - os: ubuntu-latest pip-cache: ~/.cache/pip @@ -31,16 +31,17 @@ python-version: 3.7 build-docs: true - os: ubuntu-latest - python-version: 3.10 + python-version: 3.11 build-docs: true steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v2 + uses: actions/setup-python@v4 with: python-version: ${{ matrix.python-version }} + allow-prereleases: true - - uses: actions/cache@v2 + - uses: actions/cache@v3 with: path: | ${{ matrix.pip-cache }} @@ -59,7 +60,7 @@ poetry run coverage xml -i - name: Run mypy # mypy fails to install - if: matrix.python-version != 'pypy-3.7' + if: matrix.python-version != 'pypy-3.8' run: | poetry run mypy . - name: Run flake8 diff -Nru mutagen-1.46.0/mutagen/ac3.py mutagen-1.47.0/mutagen/ac3.py --- mutagen-1.46.0/mutagen/ac3.py 2022-10-09 17:32:53.000000000 +0000 +++ mutagen-1.47.0/mutagen/ac3.py 2023-09-03 16:24:25.000000000 +0000 @@ -219,7 +219,7 @@ if timecod2e: r.skip(14) # Time Code Second Half if r.bits(1): # Additional Bit Stream Information Exists - addbsil = r.bit(6) # Additional Bit Stream Information Length + addbsil = r.bits(6) # Additional Bit Stream Information Length r.skip((addbsil + 1) * 8) @staticmethod @@ -270,7 +270,7 @@ if r.bits(1): # blkid r.skip(6) # frmsizecod if r.bits(1): # Additional Bit Stream Information Exists - addbsil = r.bit(6) # Additional Bit Stream Information Length + addbsil = r.bits(6) # Additional Bit Stream Information Length r.skip((addbsil + 1) * 8) @staticmethod diff -Nru mutagen-1.46.0/mutagen/apev2.py mutagen-1.47.0/mutagen/apev2.py --- mutagen-1.46.0/mutagen/apev2.py 2022-10-09 17:32:53.000000000 +0000 +++ mutagen-1.47.0/mutagen/apev2.py 2023-09-03 16:24:25.000000000 +0000 @@ -40,6 +40,7 @@ def is_valid_apev2_key(key): + # https://wiki.hydrogenaud.io/index.php?title=APE_key if not isinstance(key, str): raise TypeError("APEv2 key must be str") @@ -251,8 +252,8 @@ def __delitem__(self, key): lower = key.lower() - del(self.__casemap[lower]) - del(self.__dict[lower]) + del self.__casemap[lower] + del self.__dict[lower] def keys(self): return [self.__casemap.get(key, key) for key in self.__dict.keys()] @@ -326,6 +327,10 @@ key = key.decode("ascii") except UnicodeError as err: reraise(APEBadItemError, err, sys.exc_info()[2]) + + if not is_valid_apev2_key(key): + raise APEBadItemError("%r is not a valid APEv2 key" % key) + value = fileobj.read(size) if len(value) != size: raise APEBadItemError diff -Nru mutagen-1.46.0/mutagen/asf/__init__.py mutagen-1.47.0/mutagen/asf/__init__.py --- mutagen-1.46.0/mutagen/asf/__init__.py 2022-10-09 17:32:53.000000000 +0000 +++ mutagen-1.47.0/mutagen/asf/__init__.py 2023-09-03 16:24:25.000000000 +0000 @@ -147,7 +147,7 @@ to_append.append((key, value)) try: - del(self[key]) + del self[key] except KeyError: pass diff -Nru mutagen-1.46.0/mutagen/asf/_util.py mutagen-1.47.0/mutagen/asf/_util.py --- mutagen-1.46.0/mutagen/asf/_util.py 2022-10-09 17:32:53.000000000 +0000 +++ mutagen-1.47.0/mutagen/asf/_util.py 2023-09-03 16:24:25.000000000 +0000 @@ -7,6 +7,7 @@ # (at your option) any later version. import struct +from typing import List from mutagen._util import MutagenError @@ -23,7 +24,7 @@ pass -def guid2bytes(s): +def guid2bytes(s: str) -> bytes: """Converts a GUID to the serialized bytes representation""" assert isinstance(s, str) @@ -37,13 +38,13 @@ ]) -def bytes2guid(s): +def bytes2guid(s: bytes) -> str: """Converts a serialized GUID to a text GUID""" assert isinstance(s, bytes) u = struct.unpack - v = [] + v: List[int] = [] v.extend(u("HQ", s[8:10] + b"\x00\x00" + s[10:])) return "%08X-%04X-%04X-%04X-%012X" % tuple(v) @@ -284,7 +285,7 @@ 0xA10C: u"Media Foundation Spectrum Analyzer Output", 0xA10D: u"GSM 6.10 (Full-Rate) Speech", 0xA10E: u"GSM 6.20 (Half-Rate) Speech", - 0xA10F: u"GSM 6.60 (Enchanced Full-Rate) Speech", + 0xA10F: u"GSM 6.60 (Enhanced Full-Rate) Speech", 0xA110: u"GSM 6.90 (Adaptive Multi-Rate) Speech", 0xA111: u"GSM Adaptive Multi-Rate WideBand Speech", 0xA112: u"Polycom G.722", diff -Nru mutagen-1.46.0/mutagen/easyid3.py mutagen-1.47.0/mutagen/easyid3.py --- mutagen-1.46.0/mutagen/easyid3.py 2022-10-09 17:32:53.000000000 +0000 +++ mutagen-1.47.0/mutagen/easyid3.py 2023-09-03 16:24:25.000000000 +0000 @@ -130,7 +130,7 @@ frame.text = value def deleter(id3, key): - del(id3[frameid]) + del id3[frameid] cls.RegisterKey(key, getter, setter, deleter) @@ -160,7 +160,7 @@ id3.add(mutagen.id3.TXXX(encoding=enc, text=value, desc=desc)) def deleter(id3, key): - del(id3[frameid]) + del id3[frameid] cls.RegisterKey(key, getter, setter, deleter) @@ -270,7 +270,7 @@ def genre_delete(id3, key): - del(id3["TCON"]) + del id3["TCON"] def date_get(id3, key): @@ -282,7 +282,7 @@ def date_delete(id3, key): - del(id3["TDRC"]) + del id3["TDRC"] def original_date_get(id3, key): @@ -294,7 +294,7 @@ def original_date_delete(id3, key): - del(id3["TDOR"]) + del id3["TDOR"] def performer_get(id3, key): @@ -339,7 +339,7 @@ elif people: mcl.people = people else: - del(id3["TMCL"]) + del id3["TMCL"] def performer_list(id3, key): @@ -369,7 +369,7 @@ def musicbrainz_trackid_delete(id3, key): - del(id3["UFID:http://musicbrainz.org"]) + del id3["UFID:http://musicbrainz.org"] def website_get(id3, key): @@ -421,7 +421,7 @@ if frame.peak: frame.gain = 0.0 else: - del(id3["RVA2:" + key[11:-5]]) + del id3["RVA2:" + key[11:-5]] def peak_get(id3, key): @@ -457,7 +457,7 @@ if frame.gain: frame.peak = 0.0 else: - del(id3["RVA2:" + key[11:-5]]) + del id3["RVA2:" + key[11:-5]] def peakgain_list(id3, key): diff -Nru mutagen-1.46.0/mutagen/easymp4.py mutagen-1.47.0/mutagen/easymp4.py --- mutagen-1.46.0/mutagen/easymp4.py 2022-10-09 17:32:53.000000000 +0000 +++ mutagen-1.47.0/mutagen/easymp4.py 2023-09-03 16:24:25.000000000 +0000 @@ -96,7 +96,7 @@ tags[atomid] = value def deleter(tags, key): - del(tags[atomid]) + del tags[atomid] cls.RegisterKey(key, getter, setter, deleter) @@ -113,7 +113,7 @@ tags[atomid] = [clamp(v) for v in map(int, value)] def deleter(tags, key): - del(tags[atomid]) + del tags[atomid] cls.RegisterKey(key, getter, setter, deleter) @@ -144,7 +144,7 @@ tags[atomid] = data def deleter(tags, key): - del(tags[atomid]) + del tags[atomid] cls.RegisterKey(key, getter, setter, deleter) @@ -173,7 +173,7 @@ tags[atomid] = encoded def deleter(tags, key): - del(tags[atomid]) + del tags[atomid] cls.RegisterKey(key, getter, setter, deleter) diff -Nru mutagen-1.46.0/mutagen/_file.py mutagen-1.47.0/mutagen/_file.py --- mutagen-1.46.0/mutagen/_file.py 2022-10-09 17:32:53.000000000 +0000 +++ mutagen-1.47.0/mutagen/_file.py 2023-09-03 16:24:25.000000000 +0000 @@ -6,6 +6,7 @@ # (at your option) any later version. import warnings +from typing import List from mutagen._util import DictMixin, loadfile @@ -81,9 +82,9 @@ if self.tags is None: raise KeyError(key) else: - del(self.tags[key]) + del self.tags[key] - def keys(self): + def keys(self) -> list: """Return a list of keys in the metadata tag. If the file has no tags at all, an empty list is returned. @@ -130,12 +131,13 @@ if self.tags is not None: return self.tags.save(filething, **kwargs) - def pprint(self): + def pprint(self) -> str: """ Returns: text: stream information and comment key=value pairs. """ + assert self.info is not None stream = "%s (%s)" % (self.info.pprint(), self.mime[0]) try: tags = self.tags.pprint() @@ -144,7 +146,7 @@ else: return stream + ((tags and "\n" + tags) or "") - def add_tags(self): + def add_tags(self) -> None: """Adds new tags to the file. Raises: @@ -155,7 +157,7 @@ raise NotImplementedError @property - def mime(self): + def mime(self) -> List[str]: """A list of mime types (:class:`mutagen.text`)""" mimes = [] @@ -166,7 +168,7 @@ return mimes @staticmethod - def score(filename, fileobj, header): + def score(filename, fileobj, header) -> int: """Returns a score for how likely the file can be parsed by this type. Args: @@ -194,7 +196,7 @@ __module__ = "mutagen" - def pprint(self): + def pprint(self) -> str: """ Returns: text: Print stream information diff -Nru mutagen-1.46.0/mutagen/flac.py mutagen-1.47.0/mutagen/flac.py --- mutagen-1.46.0/mutagen/flac.py 2022-10-09 17:32:53.000000000 +0000 +++ mutagen-1.47.0/mutagen/flac.py 2023-09-03 16:24:25.000000000 +0000 @@ -387,7 +387,7 @@ For CD-DA, track_numbers must be 1-99, or 170 for the lead-out. Track_numbers must be unique within a cue sheet. There - must be atleast one index in every track except the lead-out track + must be at least one index in every track except the lead-out track which must have none. Attributes: @@ -519,7 +519,7 @@ track_flags |= 0x40 track_packed = struct.pack( self.__CUESHEET_TRACK_FORMAT, track.start_offset, - track.track_number, track.isrc, track_flags, + track.track_number, track.isrc or b"\0", track_flags, len(track.indexes)) f.write(track_packed) for index in track.indexes: @@ -846,6 +846,15 @@ If no filename is given, the one most recently loaded is used. """ + # add new cuesheet and seektable + if self.cuesheet and self.cuesheet not in self.metadata_blocks: + if not isinstance(self.cuesheet, CueSheet): + raise ValueError("Invalid cuesheet object type!") + self.metadata_blocks.append(self.cuesheet) + if self.seektable and self.seektable not in self.metadata_blocks: + if not isinstance(self.seektable, SeekTable): + raise ValueError("Invalid seektable object type!") + self.metadata_blocks.append(self.seektable) self._save(filething, self.metadata_blocks, deleteid3, padding) diff -Nru mutagen-1.46.0/mutagen/id3/_file.py mutagen-1.47.0/mutagen/id3/_file.py --- mutagen-1.46.0/mutagen/id3/_file.py 2022-10-09 17:32:53.000000000 +0000 +++ mutagen-1.47.0/mutagen/id3/_file.py 2023-09-03 16:24:25.000000000 +0000 @@ -231,7 +231,7 @@ if 0, ID3v1 tags will be removed. if 1, ID3v1 tags will be updated but not added. if 2, ID3v1 tags will be created and/or updated - v2 (int): + v2_version (int): version of ID3v2 tags (3 or 4). v23_sep (text): the separator used to join multiple text values diff -Nru mutagen-1.46.0/mutagen/id3/_frames.py mutagen-1.47.0/mutagen/id3/_frames.py --- mutagen-1.46.0/mutagen/id3/_frames.py 2022-10-09 17:32:53.000000000 +0000 +++ mutagen-1.47.0/mutagen/id3/_frames.py 2023-09-03 16:24:25.000000000 +0000 @@ -568,7 +568,7 @@ genre_re = re.compile(r"((?:\((?P[0-9]+|RX|CR)\))*)(?P.+)?") for value in self.text: # 255 possible entries in id3v1 - if value.isdigit() and int(value) < 256: + if value.isdecimal() and int(value) < 256: try: genres.append(self.GENRES[int(value)]) except IndexError: @@ -832,7 +832,7 @@ class TSOP(TextFrame): - "Perfomer Sort Order key" + "Performer Sort Order key" class TSOT(TextFrame): @@ -1110,7 +1110,7 @@ class COMM(TextFrame): """User comment. - User comment frames have a descrption, like TXXX, and also a three + User comment frames have a description, like TXXX, and also a three letter ISO language code in the 'lang' attribute. """ @@ -1895,7 +1895,7 @@ class TSP(TSOP): - "Perfomer Sort Order key" + "Performer Sort Order key" class TSC(TSOC): @@ -1931,7 +1931,7 @@ class TOA(TOPE): - "Original Artist/Perfomer" + "Original Artist/Performer" class TOL(TOLY): @@ -1995,7 +1995,7 @@ class ULT(USLT): - "Unsychronised lyrics/text transcription" + "Unsynchronised lyrics/text transcription" class SLT(SYLT): diff -Nru mutagen-1.46.0/mutagen/id3/_specs.py mutagen-1.47.0/mutagen/id3/_specs.py --- mutagen-1.46.0/mutagen/id3/_specs.py 2022-10-09 17:32:53.000000000 +0000 +++ mutagen-1.47.0/mutagen/id3/_specs.py 2023-09-03 16:24:25.000000000 +0000 @@ -540,7 +540,7 @@ spec = self.specs[0] # Merge single text spec multispecs only. - # (TimeStampSpec beeing the exception, but it's not a valid v2.3 frame) + # (TimeStampSpec being the exception, but it's not a valid v2.3 frame) if not isinstance(spec, EncodedTextSpec) or \ isinstance(spec, TimeStampSpec): return value diff -Nru mutagen-1.46.0/mutagen/id3/_tags.py mutagen-1.47.0/mutagen/id3/_tags.py --- mutagen-1.46.0/mutagen/id3/_tags.py 2022-10-09 17:32:53.000000000 +0000 +++ mutagen-1.47.0/mutagen/id3/_tags.py 2023-09-03 16:24:25.000000000 +0000 @@ -108,6 +108,9 @@ # excludes itself." extsize = struct.unpack('>L', extsize_data)[0] + if extsize < 0: + raise error("invalid extended header size") + self._extdata = read_full(fileobj, extsize) @@ -253,12 +256,12 @@ """ if key in self: - del(self[key]) + del self[key] else: key = key + ":" for k in list(self.keys()): if k.startswith(key): - del(self[k]) + del self[k] def pprint(self): """ @@ -366,17 +369,20 @@ # TDAT, TYER, and TIME have been turned into TDRC. timestamps = [] old_frames = [self.pop(n, []) for n in ["TYER", "TDAT", "TIME"]] - for y, d, t in zip_longest(*old_frames, fillvalue=u""): - ym = re.match(r"([0-9]+)\Z", y) - dm = re.match(r"([0-9]{2})([0-9]{2})\Z", d) - tm = re.match(r"([0-9]{2})([0-9]{2})\Z", t) + for tyer, tdat, time in zip_longest(*old_frames, fillvalue=""): + ym = re.match(r"([0-9]{4})(-[0-9]{2}-[0-9]{2})?\Z", tyer) + dm = re.match(r"([0-9]{2})([0-9]{2})\Z", tdat) + tm = re.match(r"([0-9]{2})([0-9]{2})\Z", time) timestamp = "" if ym: - timestamp += u"%s" % ym.groups() + (year, month_day) = ym.groups() + timestamp += "%s" % year if dm: - timestamp += u"-%s-%s" % dm.groups()[::-1] + month_day = "-%s-%s" % dm.groups()[::-1] + if month_day: + timestamp += month_day if tm: - timestamp += u"T%s:%s:00" % tm.groups() + timestamp += "T%s:%s:00" % tm.groups() if timestamp: timestamps.append(timestamp) if timestamps and "TDRC" not in self: @@ -401,7 +407,7 @@ # should have been removed already. for key in ["RVAD", "EQUA", "TRDA", "TSIZ", "TDAT", "TIME"]: if key in self: - del(self[key]) + del self[key] # Recurse into chapters for f in self.getall("CHAP"): @@ -465,7 +471,7 @@ for key in v24_frames: if key in self: - del(self[key]) + del self[key] # Recurse into chapters for f in self.getall("CHAP"): diff -Nru mutagen-1.46.0/mutagen/id3/_util.py mutagen-1.47.0/mutagen/id3/_util.py --- mutagen-1.46.0/mutagen/id3/_util.py 2022-10-09 17:32:53.000000000 +0000 +++ mutagen-1.47.0/mutagen/id3/_util.py 2023-09-03 16:24:25.000000000 +0000 @@ -7,6 +7,8 @@ # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. +from typing import Union + from mutagen._util import MutagenError @@ -44,7 +46,7 @@ class unsynch(object): @staticmethod - def decode(value): + def decode(value: bytes) -> bytes: fragments = bytearray(value).split(b'\xff') if len(fragments) > 1 and not fragments[-1]: raise ValueError('string ended unsafe') @@ -59,7 +61,7 @@ return bytes(bytearray(b'\xff').join(fragments)) @staticmethod - def encode(value): + def encode(value: bytes) -> bytes: fragments = bytearray(value).split(b'\xff') for f in fragments[1:]: if (not f) or (f[0] >= 0xE0) or (f[0] == 0x00): @@ -73,7 +75,8 @@ return self.to_str(self, self.bits, self.bigendian, width, minwidth) @staticmethod - def to_str(value, bits=7, bigendian=True, width=4, minwidth=4): + def to_str(value: int, bits: int = 7, bigendian: bool = True, + width: int = 4, minwidth: int = 4) -> bytes: mask = (1 << bits) - 1 if width != -1: @@ -101,7 +104,7 @@ return bytes(bytes_) @staticmethod - def has_valid_padding(value, bits=7): + def has_valid_padding(value: Union[int, bytes], bits: int = 7) -> bool: """Whether the padding bits are all zero""" assert bits <= 8 diff -Nru mutagen-1.46.0/mutagen/_iff.py mutagen-1.47.0/mutagen/_iff.py --- mutagen-1.46.0/mutagen/_iff.py 2022-10-09 17:32:53.000000000 +0000 +++ mutagen-1.47.0/mutagen/_iff.py 2023-09-03 16:24:25.000000000 +0000 @@ -1,7 +1,7 @@ # Copyright (C) 2014 Evan Purkhiser # 2014 Ben Ockmore # 2017 Borewit -# 2019-2020 Philipp Wolfer +# 2019-2021 Philipp Wolfer # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -37,7 +37,7 @@ pass -def is_valid_chunk_id(id): +def is_valid_chunk_id(id: str) -> bool: """ is_valid_chunk_id(FOURCC) Arguments: @@ -56,7 +56,7 @@ # Assert FOURCC formatted valid -def assert_valid_chunk_id(id): +def assert_valid_chunk_id(id: str) -> None: if not is_valid_chunk_id(id): raise ValueError("IFF chunk ID must be four ASCII characters.") @@ -126,13 +126,13 @@ % (type(self).__name__, self.id, self.offset, self.size, self.data_offset, self.data_size)) - def read(self): + def read(self) -> bytes: """Read the chunks data""" self._fileobj.seek(self.data_offset) return self._fileobj.read(self.data_size) - def write(self, data): + def write(self, data: bytes) -> None: """Write the chunk data""" if len(data) > self.data_size: @@ -146,7 +146,7 @@ self._fileobj.seek(self.data_offset + self.data_size) self._fileobj.write(b'\x00' * padding) - def delete(self): + def delete(self) -> None: """Removes the chunk from the file""" delete_bytes(self._fileobj, self.size, self.offset) @@ -172,23 +172,36 @@ self.size = self.HEADER_SIZE + self.data_size + self.padding() assert self.size % 2 == 0 - def resize(self, new_data_size): + def resize(self, new_data_size: int) -> None: """Resize the file and update the chunk sizes""" + old_size = self._get_actual_data_size() padding = new_data_size % 2 - resize_bytes(self._fileobj, self.data_size + self.padding(), + resize_bytes(self._fileobj, old_size, new_data_size + padding, self.data_offset) size_diff = new_data_size - self.data_size self._update_size(size_diff) self._fileobj.flush() - def padding(self): + def padding(self) -> int: """Returns the number of padding bytes (0 or 1). IFF chunks are required to be a even number in total length. If data_size is odd a padding byte will be added at the end. """ return self.data_size % 2 + def _get_actual_data_size(self) -> int: + """Returns the data size that is actually possible. + Some files have chunks that are truncated and their reported size + would be outside of the file's actual size.""" + fileobj = self._fileobj + fileobj.seek(0, 2) + file_size = fileobj.tell() + + expected_size = self.data_size + self.padding() + max_size_possible = file_size - self.data_offset + return min(expected_size, max_size_possible) + class IffContainerChunkMixin(): """A IFF chunk containing other chunks. @@ -249,7 +262,7 @@ if not is_valid_chunk_id(id_): raise KeyError("Invalid IFF key.") - next_offset = self.offset + self.size + next_offset = self.data_offset + self._get_actual_data_size() size = self.HEADER_SIZE data_size = 0 if data: diff -Nru mutagen-1.46.0/mutagen/__init__.py mutagen-1.47.0/mutagen/__init__.py --- mutagen-1.46.0/mutagen/__init__.py 2022-10-09 17:32:53.000000000 +0000 +++ mutagen-1.47.0/mutagen/__init__.py 2023-09-03 16:24:25.000000000 +0000 @@ -22,7 +22,7 @@ from mutagen._file import FileType, StreamInfo, File from mutagen._tags import Tags, Metadata, PaddingInfo -version = (1, 46, 0) +version = (1, 47, 0) """Version tuple.""" version_string = ".".join(map(str, version)) diff -Nru mutagen-1.46.0/mutagen/mp3/__init__.py mutagen-1.47.0/mutagen/mp3/__init__.py --- mutagen-1.46.0/mutagen/mp3/__init__.py 2022-10-09 17:32:53.000000000 +0000 +++ mutagen-1.47.0/mutagen/mp3/__init__.py 2023-09-03 16:24:25.000000000 +0000 @@ -455,7 +455,11 @@ def score(filename, fileobj, header_data): filename = filename.lower() - return (header_data.startswith(b"ID3") * 2 + + return ((header_data.startswith(b"ID3") or + header_data.startswith(b'\xFF\xF2') or + header_data.startswith(b'\xFF\xF3') or + header_data.startswith(b'\xFF\xFA') or + header_data.startswith(b'\xFF\xFB')) * 2 + endswith(filename, b".mp3") + endswith(filename, b".mp2") + endswith(filename, b".mpg") + endswith(filename, b".mpeg")) diff -Nru mutagen-1.46.0/mutagen/mp4/__init__.py mutagen-1.47.0/mutagen/mp4/__init__.py --- mutagen-1.46.0/mutagen/mp4/__init__.py 2022-10-09 17:32:53.000000000 +0000 +++ mutagen-1.47.0/mutagen/mp4/__init__.py 2023-09-03 16:24:25.000000000 +0000 @@ -247,7 +247,7 @@ last = len(order) # If there's no key-based way to distinguish, order by length. # If there's still no way, go by string comparison on the - # values, so we at least have something determinstic. + # values, so we at least have something deterministic. return (order.get(key[:4], last), len(repr(value)), repr(value)) @@ -519,10 +519,13 @@ fileobj.seek(atom.offset + 12) data = fileobj.read(atom.length - 12) fmt = fmt % cdata.uint_be(data[:4]) - offsets = struct.unpack(fmt, data[4:]) - offsets = [o + (0, delta)[offset < o] for o in offsets] - fileobj.seek(atom.offset + 16) - fileobj.write(struct.pack(fmt, *offsets)) + try: + offsets = struct.unpack(fmt, data[4:]) + offsets = [o + (0, delta)[offset < o] for o in offsets] + fileobj.seek(atom.offset + 16) + fileobj.write(struct.pack(fmt, *offsets)) + except struct.error: + raise MP4MetadataError("wrong offset inside %r" % atom.name) def __update_tfhd(self, fileobj, atom, delta, offset): if atom.offset > offset: diff -Nru mutagen-1.46.0/mutagen/ogg.py mutagen-1.47.0/mutagen/ogg.py --- mutagen-1.46.0/mutagen/ogg.py 2022-10-09 17:32:53.000000000 +0000 +++ mutagen-1.47.0/mutagen/ogg.py 2023-09-03 16:24:25.000000000 +0000 @@ -167,7 +167,7 @@ return data @property - def size(self): + def size(self) -> int: """Total frame size.""" size = 27 # Initial header size @@ -429,7 +429,7 @@ new_data_end = offset + data_size offset_adjust += (data_size - old_page.size) - # Finally, if there's any discrepency in length, we need to + # Finally, if there's any discrepancy in length, we need to # renumber the pages for the logical stream. if len(old_pages) != len(new_pages): fileobj.seek(new_data_end, 0) diff -Nru mutagen-1.46.0/mutagen/smf.py mutagen-1.47.0/mutagen/smf.py --- mutagen-1.46.0/mutagen/smf.py 2022-10-09 17:32:53.000000000 +0000 +++ mutagen-1.47.0/mutagen/smf.py 2023-09-03 16:24:25.000000000 +0000 @@ -8,6 +8,7 @@ """Standard MIDI File (SMF)""" import struct +from typing import Tuple from mutagen import StreamInfo, MutagenError from mutagen._file import FileType @@ -18,7 +19,7 @@ pass -def _var_int(data, offset=0): +def _var_int(data: bytearray, offset: int = 0) -> Tuple[int, int]: val = 0 while 1: try: @@ -32,12 +33,12 @@ def _read_track(chunk): - """Retuns a list of midi events and tempo change events""" + """Returns a list of midi events and tempo change events""" TEMPO, MIDI = range(2) # Deviations: The running status should be reset on non midi events, but - # some files contain meta events inbetween. + # some files contain meta events in between. # TODO: Offset and time signature are not considered. tempos = [] diff -Nru mutagen-1.46.0/mutagen/_tags.py mutagen-1.47.0/mutagen/_tags.py --- mutagen-1.46.0/mutagen/_tags.py 2022-10-09 17:32:53.000000000 +0000 +++ mutagen-1.47.0/mutagen/_tags.py 2023-09-03 16:24:25.000000000 +0000 @@ -36,11 +36,11 @@ size (`int`): The amount of data following the padding """ - def __init__(self, padding, size): + def __init__(self, padding: int, size: int): self.padding = padding self.size = size - def get_default_padding(self): + def get_default_padding(self) -> int: """The default implementation which tries to select a reasonable amount of padding and which might change in future versions. diff -Nru mutagen-1.46.0/mutagen/tak.py mutagen-1.47.0/mutagen/tak.py --- mutagen-1.46.0/mutagen/tak.py 2022-10-09 17:32:53.000000000 +0000 +++ mutagen-1.47.0/mutagen/tak.py 2023-09-03 16:24:25.000000000 +0000 @@ -162,6 +162,7 @@ raise TAKHeaderError("not a TAK file") bitreader = _LSBBitReader(fileobj) + found_stream_info = False while True: type = TAKMetadata(bitreader.bits(7)) bitreader.skip(1) # Unused @@ -173,12 +174,16 @@ break elif type == TAKMetadata.STREAM_INFO: self._parse_stream_info(bitreader, size) + found_stream_info = True elif type == TAKMetadata.ENCODER_INFO: self._parse_encoder_info(bitreader, data_size) assert bitreader.is_aligned() fileobj.seek(pos + size) + if not found_stream_info: + raise TAKHeaderError("missing stream info") + if self.sample_rate > 0: self.length = self.number_of_samples / float(self.sample_rate) diff -Nru mutagen-1.46.0/mutagen/_tools/mid3iconv.py mutagen-1.47.0/mutagen/_tools/mid3iconv.py --- mutagen-1.46.0/mutagen/_tools/mid3iconv.py 2022-10-09 17:32:53.000000000 +0000 +++ mutagen-1.47.0/mutagen/_tools/mid3iconv.py 2023-09-03 16:24:25.000000000 +0000 @@ -6,7 +6,7 @@ # (at your option) any later version. """ -ID3iconv is a Java based ID3 encoding convertor, here's the Python version. +ID3iconv is a Java based ID3 encoding converter, here's the Python version. """ import sys diff -Nru mutagen-1.46.0/mutagen/_tools/mutagen_pony.py mutagen-1.47.0/mutagen/_tools/mutagen_pony.py --- mutagen-1.46.0/mutagen/_tools/mutagen_pony.py 2022-10-09 17:32:53.000000000 +0000 +++ mutagen-1.47.0/mutagen/_tools/mutagen_pony.py 2023-09-03 16:24:25.000000000 +0000 @@ -73,7 +73,7 @@ else: strings.append("\nNo errors!") - return("\n".join(strings)) + return "\n".join(strings) def check_dir(path): diff -Nru mutagen-1.46.0/mutagen/trueaudio.py mutagen-1.47.0/mutagen/trueaudio.py --- mutagen-1.46.0/mutagen/trueaudio.py 2022-10-09 17:32:53.000000000 +0000 +++ mutagen-1.47.0/mutagen/trueaudio.py 2023-09-03 16:24:25.000000000 +0000 @@ -9,7 +9,7 @@ True Audio is a lossless format designed for real-time encoding and decoding. This module is based on the documentation at -http://www.true-audio.com/TTA_Lossless_Audio_Codec\\_-_Format_Description +http://tausoft.org/wiki/True_Audio_Codec_Format True Audio files use ID3 tags. """ @@ -47,9 +47,11 @@ header = fileobj.read(18) if len(header) != 18 or not header.startswith(b"TTA"): raise TrueAudioHeaderError("TTA header not found") - self.sample_rate = cdata.int_le(header[10:14]) + self.sample_rate = cdata.uint_le(header[10:14]) samples = cdata.uint_le(header[14:18]) - self.length = float(samples) / self.sample_rate + self.length = 0.0 + if self.sample_rate != 0: + self.length = float(samples) / self.sample_rate def pprint(self): return u"True Audio, %.2f seconds, %d Hz." % ( diff -Nru mutagen-1.46.0/mutagen/_util.py mutagen-1.47.0/mutagen/_util.py --- mutagen-1.46.0/mutagen/_util.py 2022-10-09 17:32:53.000000000 +0000 +++ mutagen-1.47.0/mutagen/_util.py 2023-09-03 16:24:25.000000000 +0000 @@ -17,6 +17,7 @@ import errno import decimal from io import BytesIO +from typing import Tuple, List from collections import namedtuple from contextlib import contextmanager @@ -28,7 +29,7 @@ def endswith(text, end): - # usefull for paths which can be both, str and bytes + # useful for paths which can be both, str and bytes if isinstance(text, str): if not isinstance(end, str): end = end.decode("ascii") @@ -50,7 +51,7 @@ return (bytes([v]) for v in b) -def intround(value): +def intround(value: float) -> int: """Given a float returns a rounded int. Should give the same result on both Py2/3 """ @@ -59,7 +60,7 @@ value).to_integral_value(decimal.ROUND_HALF_EVEN)) -def is_fileobj(fileobj): +def is_fileobj(fileobj) -> bool: """Returns: bool: if an argument passed ot mutagen should be treated as a file object @@ -477,7 +478,7 @@ return args[0] else: raise - del(self[key]) + del self[key] return value def popitem(self): @@ -539,7 +540,7 @@ self.__dict[key] = value def __delitem__(self, key): - del(self.__dict[key]) + del self.__dict[key] def keys(self): return self.__dict.keys() @@ -614,7 +615,7 @@ _fill_cdata(cdata) -def get_size(fileobj): +def get_size(fileobj) -> int: """Returns the size of the file. The position when passed in will be preserved if no error occurs. @@ -634,7 +635,7 @@ fileobj.seek(old_pos, 0) -def read_full(fileobj, size): +def read_full(fileobj, size: int) -> None: """Like fileobj.read but raises IOError if not all requested data is returned. @@ -657,7 +658,7 @@ return data -def seek_end(fileobj, offset): +def seek_end(fileobj, offset: int) -> None: """Like fileobj.seek(-offset, 2), but will not try to go beyond the start Needed since file objects from BytesIO will not raise IOError and @@ -682,7 +683,7 @@ fileobj.seek(-offset, 2) -def resize_file(fobj, diff, BUFFER_SIZE=_DEFAULT_BUFFER_SIZE): +def resize_file(fobj, diff: int, BUFFER_SIZE: int = _DEFAULT_BUFFER_SIZE) -> None: """Resize a file by `diff`. New space will be filled with zeros. @@ -719,7 +720,8 @@ raise -def move_bytes(fobj, dest, src, count, BUFFER_SIZE=_DEFAULT_BUFFER_SIZE): +def move_bytes(fobj, dest: int, src: int, count: int, + BUFFER_SIZE: int = _DEFAULT_BUFFER_SIZE) -> None: """Moves data around using read()/write(). Args: @@ -762,7 +764,8 @@ fobj.flush() -def insert_bytes(fobj, size, offset, BUFFER_SIZE=_DEFAULT_BUFFER_SIZE): +def insert_bytes(fobj, size: int, offset: int, + BUFFER_SIZE: int = _DEFAULT_BUFFER_SIZE) -> None: """Insert size bytes of empty space starting at offset. fobj must be an open file object, open rb+ or @@ -790,7 +793,8 @@ move_bytes(fobj, offset + size, offset, movesize, BUFFER_SIZE) -def delete_bytes(fobj, size, offset, BUFFER_SIZE=_DEFAULT_BUFFER_SIZE): +def delete_bytes(fobj, size: int, offset: int, + BUFFER_SIZE: int = _DEFAULT_BUFFER_SIZE) -> None: """Delete size bytes of empty space starting at offset. fobj must be an open file object, open rb+ or @@ -818,7 +822,7 @@ resize_file(fobj, -size, BUFFER_SIZE) -def resize_bytes(fobj, old_size, new_size, offset): +def resize_bytes(fobj, old_size: int, new_size: int, offset: int) -> None: """Resize an area in a file adding and deleting at the end of it. Does nothing if no resizing is needed. @@ -864,7 +868,8 @@ return default -def encode_endian(text, encoding, errors="strict", le=True): +def encode_endian(text: str, encoding: str, + errors: str = "strict", le: bool = True) -> bytes: """Like text.encode(encoding) but always returns little endian/big endian BOMs instead of the system one. @@ -896,7 +901,8 @@ return text.encode(encoding, errors) -def decode_terminated(data, encoding, strict=True): +def decode_terminated(data: bytes, encoding: str, + strict: bool = True) -> Tuple[str, bytes]: """Returns the decoded data until the first NULL terminator and all data after it. @@ -936,7 +942,7 @@ # slow path decoder = codec_info.incrementaldecoder() - r = [] + r: List[str] = [] for i, b in enumerate(iterbytes(data)): c = decoder.decode(b) if c == u"\x00": @@ -962,7 +968,7 @@ self._bits = 0 self._pos = fileobj.tell() - def bits(self, count): + def bits(self, count: int) -> int: """Reads `count` bits and returns an uint, MSB read first. May raise BitReaderError if not enough data could be read or @@ -987,7 +993,7 @@ assert self._bits < 8 return value - def bytes(self, count): + def bytes(self, count: int) -> bytes: """Returns a bytearray of length `count`. Works unaligned.""" if count < 0: @@ -1002,7 +1008,7 @@ return bytes(bytearray(self.bits(8) for _ in range(count))) - def skip(self, count): + def skip(self, count: int) -> None: """Skip `count` bits. Might raise BitReaderError if there wasn't enough data to skip, @@ -1021,12 +1027,12 @@ count -= n_bytes * 8 self.bits(count) - def get_position(self): + def get_position(self) -> int: """Returns the amount of bits read or skipped so far""" return (self._fileobj.tell() - self._pos) * 8 - self._bits - def align(self): + def align(self) -> int: """Align to the next byte, returns the amount of bits skipped""" bits = self._bits @@ -1034,7 +1040,7 @@ self._bits = 0 return bits - def is_aligned(self): + def is_aligned(self) -> bool: """If we are currently aligned to bytes and nothing is buffered""" return self._bits == 0 diff -Nru mutagen-1.46.0/mutagen/_vorbis.py mutagen-1.47.0/mutagen/_vorbis.py --- mutagen-1.46.0/mutagen/_vorbis.py 2022-10-09 17:32:53.000000000 +0000 +++ mutagen-1.47.0/mutagen/_vorbis.py 2023-09-03 16:24:25.000000000 +0000 @@ -22,7 +22,7 @@ from mutagen._util import DictMixin, cdata, MutagenError, reraise -def is_valid_key(key): +def is_valid_key(key: str) -> bool: """Return true if a string is a valid Vorbis comment key. Valid Vorbis comment keys are printable ASCII between 0x20 (space) @@ -158,7 +158,7 @@ return True - def clear(self): + def clear(self) -> None: """Clear all keys from the comment.""" for i in list(self): @@ -196,7 +196,7 @@ f.write(b"\x01") return f.getvalue() - def pprint(self): + def pprint(self) -> str: def _decode(value): if not isinstance(value, str): @@ -289,7 +289,7 @@ if not isinstance(values, list): values = [values] try: - del(self[key]) + del self[key] except KeyError: pass diff -Nru mutagen-1.46.0/mutagen/wave.py mutagen-1.47.0/mutagen/wave.py --- mutagen-1.46.0/mutagen/wave.py 2022-10-09 17:32:53.000000000 +0000 +++ mutagen-1.47.0/mutagen/wave.py 2023-09-03 16:24:25.000000000 +0000 @@ -85,7 +85,7 @@ # RIFF: http://soundfile.sapp.org/doc/WaveFormat/ # Python struct.unpack: # https://docs.python.org/2/library/struct.html#byte-order-size-and-alignment - info = struct.unpack('