guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

01/01: gnu: Beets: Fix compatibility with Python 3.7.


From: guix-commits
Subject: 01/01: gnu: Beets: Fix compatibility with Python 3.7.
Date: Mon, 3 Dec 2018 17:31:47 -0500 (EST)

lfam pushed a commit to branch master
in repository guix.

commit c05c1910dbd630304e06020d27d4b72bb0502088
Author: Leo Famulari <address@hidden>
Date:   Mon Dec 3 17:29:58 2018 -0500

    gnu: Beets: Fix compatibility with Python 3.7.
    
    * gnu/packages/patches/beets-python-3.7-fix.patch: New file.
    * gnu/local.mk (dist_patch_DATA): Add it.
    *  gnu/packages/music.scm (beets)[source]: Use it.
---
 gnu/local.mk                                    |  1 +
 gnu/packages/music.scm                          |  1 +
 gnu/packages/patches/beets-python-3.7-fix.patch | 57 +++++++++++++++++++++++++
 3 files changed, 59 insertions(+)

diff --git a/gnu/local.mk b/gnu/local.mk
index 847c928..53a3547 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -600,6 +600,7 @@ dist_patch_DATA =                                           
\
   %D%/packages/patches/bash-completion-directories.patch       \
   %D%/packages/patches/bastet-change-source-of-unordered_set.patch     \
   %D%/packages/patches/bazaar-CVE-2017-14176.patch             \
+  %D%/packages/patches/beets-python-3.7-fix.patch              \
   %D%/packages/patches/beignet-correct-file-names.patch                \
   %D%/packages/patches/binutils-loongson-workaround.patch      \
   %D%/packages/patches/blast+-fix-makefile.patch               \
diff --git a/gnu/packages/music.scm b/gnu/packages/music.scm
index faf5aab..cc6d228 100644
--- a/gnu/packages/music.scm
+++ b/gnu/packages/music.scm
@@ -2692,6 +2692,7 @@ Songs can be searched by artist, name or even by a part 
of the song text.")
     (source (origin
               (method url-fetch)
               (uri (pypi-uri "beets" version))
+              (patches (search-patches "beets-python-3.7-fix.patch"))
               (sha256
                (base32
                 "0l2vfrknwcsm6bn83m7476qrz45qwgxcb5k0h7kn96kr70irn1v2"))))
diff --git a/gnu/packages/patches/beets-python-3.7-fix.patch 
b/gnu/packages/patches/beets-python-3.7-fix.patch
new file mode 100644
index 0000000..43707cd
--- /dev/null
+++ b/gnu/packages/patches/beets-python-3.7-fix.patch
@@ -0,0 +1,57 @@
+Fix compatibility issue with Python 3.7:
+
+https://github.com/beetbox/beets/issues/2978
+
+Patch copied from upstream source repository:
+
+https://github.com/beetbox/beets/commit/15d44f02a391764da1ce1f239caef819f08beed8
+
+From 15d44f02a391764da1ce1f239caef819f08beed8 Mon Sep 17 00:00:00 2001
+From: Adrian Sampson <address@hidden>
+Date: Sun, 22 Jul 2018 12:34:19 -0400
+Subject: [PATCH] Fix Python 3.7 compatibility (#2978)
+
+---
+ beets/autotag/hooks.py | 8 +++++++-
+ docs/changelog.rst     | 2 ++
+ 2 files changed, 9 insertions(+), 1 deletion(-)
+
+diff --git a/beets/autotag/hooks.py b/beets/autotag/hooks.py
+index 3615a9333..1c62a54c5 100644
+--- a/beets/autotag/hooks.py
++++ b/beets/autotag/hooks.py
+@@ -31,6 +31,12 @@
+ 
+ log = logging.getLogger('beets')
+ 
++# The name of the type for patterns in re changed in Python 3.7.
++try:
++    Pattern = re._pattern_type
++except AttributeError:
++    Pattern = re.Pattern
++
+ 
+ # Classes used to represent candidate options.
+ 
+@@ -433,7 +439,7 @@ def _eq(self, value1, value2):
+         be a compiled regular expression, in which case it will be
+         matched against `value2`.
+         """
+-        if isinstance(value1, re._pattern_type):
++        if isinstance(value1, Pattern):
+             return bool(value1.match(value2))
+         return value1 == value2
+ 
+#diff --git a/docs/changelog.rst b/docs/changelog.rst
+#index be6de2904..d487f31f5 100644
+#--- a/docs/changelog.rst
+#+++ b/docs/changelog.rst
+#@@ -19,6 +19,8 @@ New features:
+# 
+# Fixes:
+# 
+#+* Fix compatibility Python 3.7 and its change to a name in the ``re`` module.
+#+  :bug:`2978`
+# * R128 normalization tags are now properly deleted from files when the values
+#   are missing.
+#   Thanks to :user:`autrimpo`.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]