[bug#77979] gnu: beets: Update to 2.2.0.

Message ID b189b9cc1dd80fefcc86031776af591bfe30feb3.1745295961.git.wongandj@icloud.com
State New
Headers
Series [bug#77979] gnu: beets: Update to 2.2.0. |

Commit Message

Andrew Wong April 22, 2025, 4:26 a.m. UTC
* gnu/packages/music.scm (beets): Update to 2.2.0.
[source]: Add `beets-future-proof-bucket-test.patch` patch.
[native-inputs]: Add `python-poetry-core`, `python-pytest-flask`.
[inputs]: Add `python-platformdirs`.
* gnu/packages/patches/beets-future-proof-bucket-test.patch: New file.

Change-Id: I57e58d8fd7117a93f2b17e1a155871e963d2a881
---
 gnu/packages/music.scm                        | 15 ++++---
 .../beets-future-proof-bucket-test.patch      | 39 +++++++++++++++++++
 2 files changed, 49 insertions(+), 5 deletions(-)
 create mode 100644 gnu/packages/patches/beets-future-proof-bucket-test.patch


base-commit: f7c41ab31f5023023385500f6eb9083d23dd1ccb
  

Comments

Ian Eure April 25, 2025, 12:18 a.m. UTC | #1
Hi Andrew,

Andrew Wong <wongandj@icloud.com> writes:

> * gnu/packages/music.scm (beets): Update to 2.2.0.
> [source]: Add `beets-future-proof-bucket-test.patch` patch.
> [native-inputs]: Add `python-poetry-core`, 
> `python-pytest-flask`.
> [inputs]: Add `python-platformdirs`.
> * gnu/packages/patches/beets-future-proof-bucket-test.patch: New 
> file.
>
> Change-Id: I57e58d8fd7117a93f2b17e1a155871e963d2a881
> ---
>  gnu/packages/music.scm                        | 15 ++++---
>  .../beets-future-proof-bucket-test.patch      | 39 
>  +++++++++++++++++++
>  2 files changed, 49 insertions(+), 5 deletions(-)
>  create mode 100644 
>  gnu/packages/patches/beets-future-proof-bucket-test.patch
>
> diff --git a/gnu/packages/music.scm b/gnu/packages/music.scm
> index 0759c3d3c1..c80b457657 100644
> --- a/gnu/packages/music.scm
> +++ b/gnu/packages/music.scm
> @@ -4280,13 +4280,15 @@ (define-public instantmusic
>  (define-public beets
>    (package
>      (name "beets")
> -    (version "2.0.0")
> +    (version "2.2.0")
>      (source (origin
>                (method url-fetch)
>                (uri (pypi-uri "beets" version))
>                (sha256
>                 (base32
> - 
> "1kzqn6f3iw30lav9cwf653w2ns1n09yrys54dqxf6a9ppjsp449v"))))
> + 
> "05f7sjl6hwarn4d3r5hlsn7gfsx1dlqiy0kl6dg5fi08adzjf2nc"))
> +              ;; Fix myopic test. See 
> <https://github.com/beetbox/beets/pull/5566>
> +              (patches (search-patches 
> "beets-future-proof-bucket-test.patch"))))

The referenced PR is merged, would you please update to use a 
git-version instead of shipping a patch?


> @@ -5116,13 +5121,13 @@ (define-public seq24
>  (define-public python-discogs-client
>    (package
>      (name "python-discogs-client")
> -    (version "2.3.12")
> +    (version "2.8")

Changes to other packages need to be in a separate patch.

Everything else looks good.

Thanks,
  -- Ian
  
Andrew Wong April 26, 2025, 2:52 a.m. UTC | #2
Hi Ian,

On 4/24/25 8:18p, Ian Eure wrote:
> The referenced PR is merged, would you please update to use a 
> git-version instead of shipping a patch?

Updating to a git-version would require changing the source to git, is 
that okay? Would we switch back to pypi after the next release? Also, 
although the patch passes all the CI tests in its git repo, there about 
46 commits between between it and the last release, including the 
removal of python 3.8 support. Is using git-version still the right way 
to go then?

> Changes to other packages need to be in a separate patch.

Will do.
  
Ian Eure April 26, 2025, 3:47 a.m. UTC | #3
Andrew Wong <wongandj@icloud.com> writes:

> Hi Ian,
>
> On 4/24/25 8:18p, Ian Eure wrote:
>> The referenced PR is merged, would you please update to use a
>> git-version instead of shipping a patch?
>
> Updating to a git-version would require changing the source to 
> git,
> is that okay? Would we switch back to pypi after the next 
> release?

Ah, you’re right.  Let’s keep it how you have it.

> Also, although the patch passes all the CI tests in its git 
> repo,
> there about 46 commits between between it and the last release,
> including the removal of python 3.8 support. Is using 
> git-version
> still the right way to go then?
>
>> Changes to other packages need to be in a separate patch.
>
> Will do.

Please make sure to send them as v2, with `git format-patch -v2' 
or `git send-email -v2'.  Will be happy to review/push when those 
land!

Thanks,
  -- Ian
  

Patch

diff --git a/gnu/packages/music.scm b/gnu/packages/music.scm
index 0759c3d3c1..c80b457657 100644
--- a/gnu/packages/music.scm
+++ b/gnu/packages/music.scm
@@ -4280,13 +4280,15 @@  (define-public instantmusic
 (define-public beets
   (package
     (name "beets")
-    (version "2.0.0")
+    (version "2.2.0")
     (source (origin
               (method url-fetch)
               (uri (pypi-uri "beets" version))
               (sha256
                (base32
-                "1kzqn6f3iw30lav9cwf653w2ns1n09yrys54dqxf6a9ppjsp449v"))))
+                "05f7sjl6hwarn4d3r5hlsn7gfsx1dlqiy0kl6dg5fi08adzjf2nc"))
+              ;; Fix myopic test. See <https://github.com/beetbox/beets/pull/5566>
+              (patches (search-patches "beets-future-proof-bucket-test.patch"))))
     (build-system pyproject-build-system)
     (arguments
      (list
@@ -4309,9 +4311,11 @@  (define-public beets
      (list gobject-introspection
            python-flask
            python-mock
+           python-poetry-core
            python-py7zr
            python-pytest
            python-pytest-cov
+           python-pytest-flask
            python-setuptools
            python-responses
            python-wheel))
@@ -4325,6 +4329,7 @@  (define-public beets
            python-mediafile
            python-munkres
            python-musicbrainzngs
+           python-platformdirs
            python-pyyaml
            python-typing-extensions
            python-unidecode
@@ -5116,13 +5121,13 @@  (define-public seq24
 (define-public python-discogs-client
   (package
     (name "python-discogs-client")
-    (version "2.3.12")
+    (version "2.8")
     (source (origin
               (method url-fetch)
-              (uri (pypi-uri "python3-discogs-client" version))
+              (uri (pypi-uri "python3_discogs_client" version))
               (sha256
                (base32
-                "1zmib0i9jicv9fyphgkcrk418qmpv3l4p38ibl31sh237ki5xqw9"))))
+                "0fxk8q8z5v5l961d9z2ywq49i2fz50h074p81zv6w6j9zzs7fb0g"))))
     (build-system python-build-system)
     (propagated-inputs
      (list python-dateutil python-oauthlib python-requests))
diff --git a/gnu/packages/patches/beets-future-proof-bucket-test.patch b/gnu/packages/patches/beets-future-proof-bucket-test.patch
new file mode 100644
index 0000000000..48a640d802
--- /dev/null
+++ b/gnu/packages/patches/beets-future-proof-bucket-test.patch
@@ -0,0 +1,39 @@ 
+From bcc79a5b09225050ce7c88f63dfa56f49f8782a8 Mon Sep 17 00:00:00 2001
+From: Stefano Rivera <stefano@rivera.za.net>
+Date: Fri, 27 Dec 2024 16:27:30 -0400
+Subject: [PATCH] Future proof
+ BucketPluginTest.test_year_single_year_last_folder
+
+2025 won't be in the future, forever.
+
+Fixes: https://bugs.debian.org/1091495
+---
+ test/plugins/test_bucket.py | 5 ++++-
+ 1 file changed, 4 insertions(+), 1 deletion(-)
+
+diff --git a/test/plugins/test_bucket.py b/test/plugins/test_bucket.py
+index b075bc4f2..e3611912a 100644
+--- a/test/plugins/test_bucket.py
++++ b/test/plugins/test_bucket.py
+@@ -14,6 +14,8 @@
+ 
+ """Tests for the 'bucket' plugin."""
+ 
++from datetime import datetime
++
+ import pytest
+ 
+ from beets import config, ui
+@@ -51,7 +53,8 @@ class BucketPluginTest(BeetsTestCase):
+         year."""
+         self._setup_config(bucket_year=["1950", "1970"])
+         assert self.plugin._tmpl_bucket("2014") == "1970"
+-        assert self.plugin._tmpl_bucket("2025") == "2025"
++        next_year = datetime.now().year + 1
++        assert self.plugin._tmpl_bucket(str(next_year)) == str(next_year)
+ 
+     def test_year_two_years(self):
+         """Buckets can be named with the 'from-to' syntax."""
+-- 
+2.49.0
+