Hello community,

here is the log from the commit of package python-audioread for 
openSUSE:Factory checked in at 2019-02-26 22:20:06
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-audioread (Old)
 and      /work/SRC/openSUSE:Factory/.python-audioread.new.28833 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-audioread"

Tue Feb 26 22:20:06 2019 rev:5 rq:678953 version:2.1.6

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-audioread/python-audioread.changes        
2018-12-12 17:26:41.835012987 +0100
+++ 
/work/SRC/openSUSE:Factory/.python-audioread.new.28833/python-audioread.changes 
    2019-02-26 22:21:30.814085055 +0100
@@ -1,0 +2,7 @@
+Mon Feb 25 15:06:33 UTC 2019 - Antonio Larrosa <[email protected]>
+
+- Add 0001-maddec-Ensure-that-the-audio-blocks-are-of-type-bytes.patch
+  to ensure audio blocks are always of type bytes (and not sometimes
+  bytearray when using maddec).
+
+-------------------------------------------------------------------

New:
----
  0001-maddec-Ensure-that-the-audio-blocks-are-of-type-bytes.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ python-audioread.spec ++++++
--- /var/tmp/diff_new_pack.zl1tVf/_old  2019-02-26 22:21:31.322084874 +0100
+++ /var/tmp/diff_new_pack.zl1tVf/_new  2019-02-26 22:21:31.322084874 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package python-audioread
 #
-# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -26,6 +26,8 @@
 Url:            https://github.com/sampsyo/audioread
 Source0:        
https://files.pythonhosted.org/packages/source/a/audioread/audioread-%{version}.tar.gz
 Source10:       
https://raw.githubusercontent.com/beetbox/audioread/master/LICENSE
+# PATCH-FIX-UPSTREAM
+Patch0:         
0001-maddec-Ensure-that-the-audio-blocks-are-of-type-bytes.patch
 BuildRequires:  %{python_module base}
 BuildRequires:  fdupes
 BuildRequires:  python-rpm-macros
@@ -49,6 +51,7 @@
 
 %prep
 %setup -q -n audioread-%{version}
+%patch0 -p1
 cp %{SOURCE10} .
 
 %build

++++++ 0001-maddec-Ensure-that-the-audio-blocks-are-of-type-bytes.patch ++++++
>From 0abbf93a0b245ba28566bd0ca47da9dfa8d266d1 Mon Sep 17 00:00:00 2001
From: Sam Thursfield <[email protected]>
Date: Wed, 26 Dec 2018 00:28:04 +0000
Subject: [PATCH] maddec: Ensure that the audio blocks are of type bytes()

The audio blocks should be bytes() to be consistent with the other
decoders.

This is required for the pyacoustid and chromaprint libraries, and fixes
the following backtrace in Beets when using the 'chroma' plugin:

    Traceback (most recent call last):
      File "/usr/bin/beet", line 11, in <module>
        load_entry_point('beets==1.4.6', 'console_scripts', 'beet')()
      File "/usr/lib/python3.6/site-packages/beets/ui/__init__.py", line 1256, 
in main
        _raw_main(args)
      File "/usr/lib/python3.6/site-packages/beets/ui/__init__.py", line 1243, 
in _raw_main
        subcommand.func(lib, suboptions, subargs)
      File "/usr/lib/python3.6/site-packages/beets/ui/commands.py", line 937, 
in import_func
        import_files(lib, paths, query)
      File "/usr/lib/python3.6/site-packages/beets/ui/commands.py", line 914, 
in import_files
        session.run()
      File "/usr/lib/python3.6/site-packages/beets/importer.py", line 327, in 
run
        pl.run_parallel(QUEUE_SIZE)
      File "/usr/lib/python3.6/site-packages/beets/util/pipeline.py", line 445, 
in run_parallel
        six.reraise(exc_info[0], exc_info[1], exc_info[2])
      File "/usr/lib/python3.6/site-packages/six.py", line 693, in reraise
        raise value
      File "/usr/lib/python3.6/site-packages/beets/util/pipeline.py", line 312, 
in run
        out = self.coro.send(msg)
      File "/usr/lib/python3.6/site-packages/beets/util/pipeline.py", line 194, 
in coro
        func(*(args + (task,)))
      File "/usr/lib/python3.6/site-packages/beets/importer.py", line 1339, in 
lookup_candidates
        plugins.send('import_task_start', session=session, task=task)
      File "/usr/lib/python3.6/site-packages/beets/plugins.py", line 452, in 
send
        result = handler(**arguments)
      File "/usr/lib/python3.6/site-packages/beets/plugins.py", line 124, in 
wrapper
        return func(*args, **kwargs)
      File "/usr/lib/python3.6/site-packages/beetsplug/chroma.py", line 143, in 
fingerprint_task
        return fingerprint_task(self._log, task, session)
      File "/usr/lib/python3.6/site-packages/beetsplug/chroma.py", line 212, in 
fingerprint_task
        acoustid_match(log, item.path)
      File "/usr/lib/python3.6/site-packages/beetsplug/chroma.py", line 65, in 
acoustid_match
        duration, fp = acoustid.fingerprint_file(util.syspath(path))
      File "/usr/lib/python3.6/site-packages/acoustid.py", line 321, in 
fingerprint_file
        return _fingerprint_file_audioread(path, maxlength)
      File "/usr/lib/python3.6/site-packages/acoustid.py", line 264, in 
_fingerprint_file_audioread
        fp = fingerprint(f.samplerate, f.channels, iter(f), maxlength)
      File "/usr/lib/python3.6/site-packages/acoustid.py", line 206, in 
fingerprint
        fper.feed(block)
      File "/usr/lib/python3.6/site-packages/chromaprint.py", line 126, in feed
        self._ctx, data, len(data) // 2
    ctypes.ArgumentError: argument 2: <class 'TypeError'>: wrong type
---
 audioread/maddec.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/audioread/maddec.py b/audioread/maddec.py
index 8dd7aaa..3a2a694 100644
--- a/audioread/maddec.py
+++ b/audioread/maddec.py
@@ -43,7 +43,7 @@ def read_blocks(self, block_size=4096):
             out = self.mf.read(block_size)
             if not out:
                 break
-            yield out
+            yield bytes(out)
 
     @property
     def samplerate(self):

Reply via email to