Path: csiph.com!pasdenom.info!weretis.net!feeder8.news.weretis.net!news.szaf.org!news.samoylyk.net!gothmog.csi.it!bofh.it!news.nic.it!robomod From: Pieter Lenaerts Newsgroups: linux.debian.bugs.dist,linux.debian.maint.python Subject: Bug#1119062: Review of the beets RFS Date: Sun, 07 Dec 2025 07:50:01 +0100 Message-ID: References: X-Original-To: =?UTF-8?Q?Louis-Philippe_V=C3=A9ronneau?= , 1119062@bugs.debian.org X-Mailbox-Line: From debian-bugs-dist-request@lists.debian.org Sun Dec 7 06:45:10 2025 Old-Return-Path: X-Spam-Flag: NO X-Spam-Score: -1.488 Reply-To: Pieter Lenaerts , 1119062@bugs.debian.org Resent-To: debian-bugs-dist@lists.debian.org Resent-Cc: package-sponsorship-requests@lists.debian.org X-Debian-Pr-Message: followup 1119062 X-Debian-Pr-Package: sponsorship-requests X-Debian-Pr-Keywords: moreinfo MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Content-Language: nl-BE Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Debian-Message: from BTS X-Mailing-List: archive/latest/1940564 List-ID: List-URL: Approved: robomod@news.nic.it Lines: 115 Organization: linux.* mail to news gateway Sender: robomod@news.nic.it X-Original-Cc: "debian-python@lists.debian.org" X-Original-Date: Sun, 7 Dec 2025 07:43:24 +0100 X-Original-Message-ID: <8671af2a-033b-466e-ad88-a2dcbf3315c3@disroot.org> X-Original-References: Xref: csiph.com linux.debian.bugs.dist:1273019 linux.debian.maint.python:17259 Op 6/12/2025 om 20:42 schreef Louis-Philippe Véronneau: > Hello! > > I had a look at your RFS for beets. I don't have any comments on the > changes you did, but sadly, the package FTBFS with Python 3.14. > > I get the following error: > > ================================================================== > ______________ TestTranslation.test_translate[already translated] > > self = 0x7f92ef0d69e0> > new_lyrics = 'Some lyrics', old_lyrics = 'Some lyrics / Some translation' > expected = 'Some lyrics / Some translation' > >     @pytest.mark.parametrize( >         "new_lyrics, old_lyrics, expected", >         [ >             pytest.param( >                 """ >                 [Refrain: Doja Cat] >                 Hard for me to let you go (Let you go, let you go) >                 My body wouldn't let me hide it (Hide it) >                 No matter what, I wouldn't fold (Wouldn't fold, > wouldn't fold) >                 Ridin' through the thunder, lightnin'""", >                 "", >                 """ >                 [Refrain: Doja Cat] / [Refrain : Doja Cat] >                 Hard for me to let you go (Let you go, let you go) / > Difficile pour moi de te laisser partir (Te laisser partir, te laisser > partir) >                 My body wouldn't let me hide it (Hide it) / Mon corps > ne me laissait pas le cacher (Cachez-le) >                 No matter what, I wouldn't fold (Wouldn't fold, > wouldn't fold) / Quoi qu’il arrive, je ne plierais pas (Ne plierait > pas, ne plierais pas) >                 Ridin' through the thunder, lightnin' / Chevauchant à > travers le tonnerre, la foudre""",  # noqa: E501 >                 id="plain", >             ), >             pytest.param( >                 """ >                 [00:00.00] Some synced lyrics >                 [00:00:50] >                 [00:01.00] Some more synced lyrics >                     Source: https://lrclib.net/api/123""", >                 "", >                 """ >                 [00:00.00] Some synced lyrics / Quelques paroles > synchronisées >                 [00:00:50] >                 [00:01.00] Some more synced lyrics / Quelques paroles > plus synchronisées >                     Source: https://lrclib.net/api/123""",  # noqa: E501 >                 id="synced", >             ), >             pytest.param( >                 "Quelques paroles", >                 "", >                 "Quelques paroles", >                 id="already in the target language", >             ), >             pytest.param( >                 "Some lyrics", >                 "Some lyrics / Some translation", >                 "Some lyrics / Some translation", >                 id="already translated", >             ), >         ], >     ) >     def test_translate(self, new_lyrics, old_lyrics, expected): >         plugin = lyrics.LyricsPlugin() >         bing = lyrics.Translator(plugin._log, "123", "FR", ["EN"]) >>       assert bing.translate( >             textwrap.dedent(new_lyrics), old_lyrics >         ) == textwrap.dedent(expected) > > test/plugins/test_lyrics.py:631: > _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > _ _ _ _ _ > > self = Translator(_log=, > api_key='123', to_language='FR', from_languages=['EN']) > new_lyrics = 'Some lyrics', old_lyrics = 'Some lyrics / Some translation' > >     def translate(self, new_lyrics: str, old_lyrics: str) -> str: >         """Translate the given lyrics to the target language. >             Check old lyrics for existing translations and return them > if their >         original text matches the new lyrics. This is to avoid > translating >         the same lyrics multiple times. >             If the lyrics are already in the target language or not in > any of >         of the source languages (if configured), they are returned as is. >             The footer with the source URL is preserved, if present. >         """ >         if ( >             " / " in old_lyrics >>           and self.remove_translations(old_lyrics) == new_lyrics >                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >         ): > E       TypeError: 'str' object cannot be interpreted as an integer > > beetsplug/lyrics.py:832: TypeError > ================================================================== > > As such, I've removed beets from the list for now. Feel free to add it > again once the issue is fixed! Thanks. I started patching for python 3.14. I'm adding this to the open RFS bug for reference.