Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.maint.python > #17256 > unrolled thread

Review of the beets RFS

Started byLouis-Philippe Véronneau <pollo@debian.org>
First post2025-12-06 20:50 +0100
Last post2025-12-21 19:00 +0100
Articles 4 — 3 participants

Back to article view | Back to linux.debian.maint.python


Contents

  Review of the beets RFS Louis-Philippe Véronneau <pollo@debian.org> - 2025-12-06 20:50 +0100
    Bug#1119062: Review of the beets RFS Pieter Lenaerts <plenae@disroot.org> - 2025-12-07 07:50 +0100
      Bug#1119062: RFS: beets/2.5.1-1 [ITA] -- music tagger and library organizer Nicholas D Steeves <sten@debian.org> - 2025-12-20 22:50 +0100
        Bug#1119062: RFS: beets/2.5.1-1 [ITA] -- music tagger and library organizer Pieter Lenaerts <plenae@disroot.org> - 2025-12-21 19:00 +0100

#17256 — Review of the beets RFS

FromLouis-Philippe Véronneau <pollo@debian.org>
Date2025-12-06 20:50 +0100
SubjectReview of the beets RFS
Message-ID<LZ6s1-RuU-7@gated-at.bofh.it>
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 = <test.plugins.test_lyrics.TestTranslation object at 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=<BeetsLogger beets.lyrics (DEBUG)>, 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!

-- 
   ⢀⣴⠾⠻⢶⣦⠀
   ⣾⠁⢠⠒⠀⣿⡁  Louis-Philippe Véronneau
   ⢿⡄⠘⠷⠚⠋   pollo@debian.org / veronneau.org
   ⠈⠳⣄

[toc] | [next] | [standalone]


#17259 — Bug#1119062: Review of the beets RFS

FromPieter Lenaerts <plenae@disroot.org>
Date2025-12-07 07:50 +0100
SubjectBug#1119062: Review of the beets RFS
Message-ID<LZgKJ-Yow-3@gated-at.bofh.it>
In reply to#17256
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 = <test.plugins.test_lyrics.TestTranslation object at 
> 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=<BeetsLogger beets.lyrics (DEBUG)>, 
> 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.

[toc] | [prev] | [next] | [standalone]


#17278 — Bug#1119062: RFS: beets/2.5.1-1 [ITA] -- music tagger and library organizer

FromNicholas D Steeves <sten@debian.org>
Date2025-12-20 22:50 +0100
SubjectBug#1119062: RFS: beets/2.5.1-1 [ITA] -- music tagger and library organizer
Message-ID<M4cQa-4pQK-5@gated-at.bofh.it>
In reply to#17259

[Multipart message — attachments visible in raw view] — view raw

Pieter Lenaerts <plenae@disroot.org> writes:

> 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 = <test.plugins.test_lyrics.TestTranslation object at
>> 0x7f92ef0d69e0>
[snip]
>> 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.

Thank you for working on this Pieter!  Would you please fix your fork's
history so that your work can be merged?  Ie the following six commits
are missing from your copy and it results in non-fastforwardable
history:

https://salsa.debian.org/python-team/packages/beets/-/compare/debian%2Fmaster...debian%2Fmaster?from_project_id=102563

A "pull --rebase" (from the Debian Python Team remote) and 3-way merge
is almost certainly what is required to fix this, and this will also
resolve some of the outstanding issues with the version of the package
being discussed at this RFS bug :)

I didn't check, but I suspect the rebase range will rewrite your import
of a new upstream version in your fork, if that's the case, don't worry
about it for now.  A method we can use to fix it when we're ready to
merge your work and upload is:

  1. You'll import the new upstream version directly to the DPT copy.
  2. You (or someone else) will cherry-pick the range of commits that
  affect exclusively debian/*, and these will be applied to the DPT copy
  which has the new upstream version.
  [3. Optionally rebase --committer-date-is-author-date the
  cherry-picked ranged, leaving the gbp-created upstream tag untouched.]

Regarding the Python 3.14 compat fixes, this is orthogonal to a
sponsorship request, and I recommend filing a bug against src:beets.

Best,
Nicholas

[toc] | [prev] | [next] | [standalone]


#17283 — Bug#1119062: RFS: beets/2.5.1-1 [ITA] -- music tagger and library organizer

FromPieter Lenaerts <plenae@disroot.org>
Date2025-12-21 19:00 +0100
SubjectBug#1119062: RFS: beets/2.5.1-1 [ITA] -- music tagger and library organizer
Message-ID<M4vSO-4D3V-1@gated-at.bofh.it>
In reply to#17278
Thanks for your help. I tried to clean up the dependency mess that I made.

Changes are in https://salsa.debian.org/python-team/packages/beets/

Important: I haven't been able to make tests for lyrics translation and 
BPD  work. I guess the plugins will not work either. I've disabled them 
in patches debian/patches/skip-bpd-tests.patch and 
debian/patches/skip-lyrics-test.patch.

Any advice on how to proceed with that would be nice. The main 
functionalities work. It's just those two plugins.

Op 20/12/2025 om 22:38 schreef Nicholas D Steeves:
> Would you please fix your fork's history so that your work can be merged?

I started using a pull request from my fork to the main package in 
https://salsa.debian.org/python-team/packages/beets. Someone pointed out 
that pull requests can't work that way, since that was messing up the 
compulsory branches like pristine-tar.

I started contributing directly into 
https://salsa.debian.org/python-team/packages/beets as of then.

We should disregard my own fork. Should I delete it?

> Regarding the Python 3.14 compat fixes, this is orthogonal to a
> sponsorship request, and I recommend filing a bug against src:beets.

There is a very basic patch in included now at 
https://salsa.debian.org/python-team/packages/beets/-/blob/debian/master/debian/patches/python314.patch?ref_type=heads

[toc] | [prev] | [standalone]


Back to top | Article view | linux.debian.maint.python


csiph-web