Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package python-python-mpd2 for openSUSE:Factory checked in at 2023-12-15 21:48:32 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-python-mpd2 (Old) and /work/SRC/openSUSE:Factory/.python-python-mpd2.new.25432 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-python-mpd2" Fri Dec 15 21:48:32 2023 rev:5 rq:1133207 version:3.1.0 Changes: -------- --- /work/SRC/openSUSE:Factory/python-python-mpd2/python-python-mpd2.changes 2022-04-11 23:50:56.149912059 +0200 +++ /work/SRC/openSUSE:Factory/.python-python-mpd2.new.25432/python-python-mpd2.changes 2023-12-15 21:48:46.385436101 +0100 @@ -1,0 +2,12 @@ +Thu Dec 14 21:35:04 UTC 2023 - Dirk Müller <dmuel...@suse.com> + +- update to 3.1.0: + * fixed multiple use of "group" in list command + * fix unmount command not working + * added binarylimit command + * Implement abstract socket support + * missing import / wrong variable + * also test python3.12 + * asyncio: fix race condition in command queue + +------------------------------------------------------------------- Old: ---- python-mpd2-3.0.5.tar.gz New: ---- python-mpd2-3.1.0.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-python-mpd2.spec ++++++ --- /var/tmp/diff_new_pack.JmHeeI/_old 2023-12-15 21:48:46.809451704 +0100 +++ /var/tmp/diff_new_pack.JmHeeI/_new 2023-12-15 21:48:46.813451850 +0100 @@ -1,7 +1,7 @@ # # spec file for package python-python-mpd2 # -# Copyright (c) 2022 SUSE LLC +# Copyright (c) 2023 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -16,10 +16,9 @@ # -%define skip_python2 1 -%{?!python_module:%define python_module() python-%{**} python3-%{**}} +%{?sle15_python_module_pythons} Name: python-python-mpd2 -Version: 3.0.5 +Version: 3.1.0 Release: 0 Summary: A Python MPD client library License: LGPL-3.0-only ++++++ python-mpd2-3.0.5.tar.gz -> python-mpd2-3.1.0.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python-mpd2-3.0.5/PKG-INFO new/python-mpd2-3.1.0/PKG-INFO --- old/python-mpd2-3.0.5/PKG-INFO 2022-01-17 18:41:12.224058400 +0100 +++ new/python-mpd2-3.1.0/PKG-INFO 2023-04-28 21:48:52.978772600 +0200 @@ -1,13 +1,12 @@ Metadata-Version: 2.1 Name: python-mpd2 -Version: 3.0.5 +Version: 3.1.0 Summary: A Python MPD client library Home-page: https://github.com/Mic92/python-mpd2 Author: Joerg Thalheim Author-email: jo...@thalheim.io License: GNU Lesser General Public License v3 (LGPLv3) Keywords: mpd -Platform: UNKNOWN Classifier: Development Status :: 5 - Production/Stable Classifier: Intended Audience :: Developers Classifier: License :: OSI Approved :: GNU Library or Lesser General Public License (LGPL) @@ -153,5 +152,3 @@ .. _python-mpd: https://pypi.python.org/pypi/python-mpd/ - - diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python-mpd2-3.0.5/doc/changes.rst new/python-mpd2-3.1.0/doc/changes.rst --- old/python-mpd2-3.0.5/doc/changes.rst 2022-01-17 18:35:45.000000000 +0100 +++ new/python-mpd2-3.1.0/doc/changes.rst 2023-02-18 06:38:28.000000000 +0100 @@ -1,6 +1,17 @@ python-mpd2 Changes List ======================== +Changes in v3.1.0 +----------------- + +* fixed multiple use of "group" in list command by @SoongNoonien in https://github.com/Mic92/python-mpd2/pull/187 +* fix unmount command not working by @burrocargado in https://github.com/Mic92/python-mpd2/pull/188 +* added binarylimit command by @SoongNoonien in https://github.com/Mic92/python-mpd2/pull/191 +* Implement abstract socket support by @aurieh in https://github.com/Mic92/python-mpd2/pull/193 +* missing import / wrong variable by @mk-81 in https://github.com/Mic92/python-mpd2/pull/196 +* also test python3.12 by @Mic92 in https://github.com/Mic92/python-mpd2/pull/200 +* asyncio: fix race condition in command queue by @yakshaver2000 in https://github.com/Mic92/python-mpd2/pull/199 + Changes in v3.0.5 ----------------- diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python-mpd2-3.0.5/mpd/asyncio.py new/python-mpd2-3.1.0/mpd/asyncio.py --- old/python-mpd2-3.0.5/mpd/asyncio.py 2021-10-29 21:32:26.000000000 +0200 +++ new/python-mpd2-3.1.0/mpd/asyncio.py 2023-02-18 06:38:24.000000000 +0100 @@ -26,7 +26,7 @@ from mpd.base import HELLO_PREFIX, ERROR_PREFIX, SUCCESS from mpd.base import MPDClientBase from mpd.base import MPDClient as SyncMPDClient -from mpd.base import ProtocolError, ConnectionError, CommandError +from mpd.base import ProtocolError, ConnectionError, CommandError, CommandListError from mpd.base import mpd_command_provider @@ -202,7 +202,9 @@ async def connect(self, host, port=6600, loop=None): if loop is not None: warnings.warn("loop passed into MPDClient.connect is ignored, this will become an error", DeprecationWarning) - if "/" in host: + if host.startswith("@"): + host = "\0" + host[1:] + if host.startswith("\0") or "/" in host: r, w = await asyncio.open_unix_connection(host) else: r, w = await asyncio.open_connection(host, port) @@ -278,6 +280,13 @@ # in this case is intended, and is just what asyncio.Queue # suggests for "get with timeout". + if not self.__command_queue.empty(): + # A __command_queue.put() has happened after the + # asyncio.wait_for() timeout but before execution of + # this coroutine resumed. Looping around again will + # fetch the new entry from the queue. + continue + if self.__idle_failed: # We could try for a more elaborate path where we now # await the command queue indefinitely, but as we're diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python-mpd2-3.0.5/mpd/base.py new/python-mpd2-3.1.0/mpd/base.py --- old/python-mpd2-3.0.5/mpd/base.py 2022-01-17 18:36:19.000000000 +0100 +++ new/python-mpd2-3.1.0/mpd/base.py 2023-02-18 06:38:28.000000000 +0100 @@ -26,7 +26,7 @@ from enum import Enum -VERSION = (3, 0, 5) +VERSION = (3, 1, 0) HELLO_PREFIX = "OK MPD " ERROR_PREFIX = "ACK " ERROR_PATTERN = re.compile(r"\[(?P<errno>\d+)@(?P<offset>\d+)\]\s+{(?P<command>\w+)}\s+(?P<msg>.*)") @@ -239,12 +239,20 @@ obj = {} for key, value in self._parse_pairs(lines): key = key.lower() - if lookup_delimiter and not delimiters: - delimiters = [key] + if lookup_delimiter and key not in delimiters: + delimiters = delimiters + [key] if obj: if key in delimiters: - yield obj - obj = {} + if lookup_delimiter: + if key in obj: + yield obj + obj = obj.copy() + while delimiters[-1] != key: + obj.pop(delimiters[-1], None) + delimiters.pop() + else: + yield obj + obj = {} elif key in obj: if not isinstance(obj[key], list): obj[key] = [obj[key], value] @@ -322,6 +330,7 @@ @mpd_commands( "add", "addtagid", + "binarylimit", "clear", "clearerror", "cleartagid", @@ -379,7 +388,7 @@ "swap", "swapid", "toggleoutput", - "umount", + "unmount", "unsubscribe", "volume", ) @@ -624,7 +633,7 @@ self.disconnect() raise ConnectionError( "Connection lost while reading binary data: " - "expected %d bytes, got %d" % (chunk_size, len(data)) + "expected %d bytes, got %d" % (chunk_size, len(value)) ) if self._rbfile.read(1) != b"\n": @@ -779,7 +788,9 @@ DeprecationWarning, ) self.timeout = timeout - if host.startswith("/"): + if host.startswith("@"): + host = "\0" + host[1:] + if host.startswith(("/", "\0")): self._sock = self._connect_unix(host) else: if port is None: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python-mpd2-3.0.5/mpd/tests.py new/python-mpd2-3.1.0/mpd/tests.py --- old/python-mpd2-3.0.5/mpd/tests.py 2021-10-29 21:32:26.000000000 +0200 +++ new/python-mpd2-3.1.0/mpd/tests.py 2023-02-18 06:38:24.000000000 +0100 @@ -262,6 +262,31 @@ self.assertIsNone(self.client.moveoutput("My ALSA Device")) self.assertMPDReceived('moveoutput "My ALSA Device"\n') + def test_list_group(self): + self.MPDWillReturn( + "AlbumArtist: Kraftwerk\n", + "Date: 1970\n", + "Album: Tone Float (Unofficial)\n", + "Date: 1974\n", + "Album: Autobahn\n", + "Album: Autobahn (2009 Der Katalog)\n", + "OK\n" + ) + grouped_list = self.client.list( + "album", "albumartist", "Kraftwerk", "group", "date", "group", "albumartist" + ) + self.assertMPDReceived( + 'list "album" "albumartist" "Kraftwerk" "group" "date" "group" "albumartist"\n' + ) + self.assertEqual( + [ + {'albumartist': 'Kraftwerk', 'date': '1970', 'album': 'Tone Float (Unofficial)'}, + {'albumartist': 'Kraftwerk', 'date': '1974', 'album': 'Autobahn'}, + {'albumartist': 'Kraftwerk', 'date': '1974', 'album': 'Autobahn (2009 Der Katalog)'} + ], + grouped_list + ) + def test_client_to_client(self): # client to client is at this time in beta! @@ -1551,6 +1576,18 @@ self.init_client() self._await(self._test_idle()) + async def _test_idle_timeout(self): + self.mockserver.expect_exchange([b'currentsong\n'], [b"OK\n"]) + self.mockserver.expect_exchange([b'currentsong\n'], [b"OK\n"]) + await self.client.currentsong() + # pausing for exactly this duration triggers a special case in mpd.asyncio.MPDClient.__run + await asyncio.sleep(self.client.IMMEDIATE_COMMAND_TIMEOUT) + await self.client.currentsong() + self.client.disconnect() + + def test_idle_timeout(self): + self.init_client() + self._await(self._test_idle_timeout()) if __name__ == "__main__": unittest.main() diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python-mpd2-3.0.5/python_mpd2.egg-info/PKG-INFO new/python-mpd2-3.1.0/python_mpd2.egg-info/PKG-INFO --- old/python-mpd2-3.0.5/python_mpd2.egg-info/PKG-INFO 2022-01-17 18:41:12.000000000 +0100 +++ new/python-mpd2-3.1.0/python_mpd2.egg-info/PKG-INFO 2023-04-28 21:48:52.000000000 +0200 @@ -1,13 +1,12 @@ Metadata-Version: 2.1 Name: python-mpd2 -Version: 3.0.5 +Version: 3.1.0 Summary: A Python MPD client library Home-page: https://github.com/Mic92/python-mpd2 Author: Joerg Thalheim Author-email: jo...@thalheim.io License: GNU Lesser General Public License v3 (LGPLv3) Keywords: mpd -Platform: UNKNOWN Classifier: Development Status :: 5 - Production/Stable Classifier: Intended Audience :: Developers Classifier: License :: OSI Approved :: GNU Library or Lesser General Public License (LGPL) @@ -153,5 +152,3 @@ .. _python-mpd: https://pypi.python.org/pypi/python-mpd/ - - diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python-mpd2-3.0.5/python_mpd2.egg-info/SOURCES.txt new/python-mpd2-3.1.0/python_mpd2.egg-info/SOURCES.txt --- old/python-mpd2-3.0.5/python_mpd2.egg-info/SOURCES.txt 2022-01-17 18:41:12.000000000 +0100 +++ new/python-mpd2-3.1.0/python_mpd2.egg-info/SOURCES.txt 2023-04-28 21:48:52.000000000 +0200 @@ -3,7 +3,6 @@ LICENSE.txt MANIFEST.in README.rst -requirements_frozen.txt setup.py doc/changes.rst doc/index.rst