Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package python-sounddevice for openSUSE:Factory checked in at 2021-04-19 21:05:50 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-sounddevice (Old) and /work/SRC/openSUSE:Factory/.python-sounddevice.new.12324 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-sounddevice" Mon Apr 19 21:05:50 2021 rev:10 rq:886510 version:0.4.1 Changes: -------- --- /work/SRC/openSUSE:Factory/python-sounddevice/python-sounddevice.changes 2020-07-30 10:03:40.871364510 +0200 +++ /work/SRC/openSUSE:Factory/.python-sounddevice.new.12324/python-sounddevice.changes 2021-04-19 21:06:08.768042576 +0200 @@ -1,0 +2,7 @@ +Mon Apr 19 01:40:25 UTC 2021 - Steve Kowalik <steven.kowa...@suse.com> + +- Update to 0.4.1: + * CallbackFlags attributes are now writable +- Don't build for Python 3.6, NumPy isn't available + +------------------------------------------------------------------- Old: ---- sounddevice-0.4.0.tar.gz New: ---- sounddevice-0.4.1.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-sounddevice.spec ++++++ --- /var/tmp/diff_new_pack.kK8pxF/_old 2021-04-19 21:06:09.308043384 +0200 +++ /var/tmp/diff_new_pack.kK8pxF/_new 2021-04-19 21:06:09.308043384 +0200 @@ -1,7 +1,7 @@ # # spec file for package python-sounddevice # -# Copyright (c) 2020 SUSE LLC +# Copyright (c) 2021 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -18,8 +18,9 @@ %{?!python_module:%define python_module() python-%{**} python3-%{**}} %define skip_python2 1 +%define skip_python36 1 Name: python-sounddevice -Version: 0.4.0 +Version: 0.4.1 Release: 0 Summary: Module to play and record sound with Python License: MIT ++++++ sounddevice-0.4.0.tar.gz -> sounddevice-0.4.1.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sounddevice-0.4.0/CONTRIBUTING.rst new/sounddevice-0.4.1/CONTRIBUTING.rst --- old/sounddevice-0.4.0/CONTRIBUTING.rst 2020-07-15 17:23:35.000000000 +0200 +++ new/sounddevice-0.4.1/CONTRIBUTING.rst 2020-09-23 12:45:04.000000000 +0200 @@ -92,7 +92,7 @@ git clone --recursive https://github.com/spatialaudio/python-sounddevice.git cd python-sounddevice - python3 -m pip install -e . --user + python3 -m pip install -e . .. _PyPI: https://pypi.org/project/sounddevice/ .. _Github: https://github.com/spatialaudio/python-sounddevice/ @@ -118,7 +118,7 @@ pages using Sphinx_. You can install it and a few other necessary packages with:: - python3 -m pip install -r doc/requirements.txt --user + python3 -m pip install -r doc/requirements.txt To (re-)build the HTML files, use:: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sounddevice-0.4.0/NEWS.rst new/sounddevice-0.4.1/NEWS.rst --- old/sounddevice-0.4.0/NEWS.rst 2020-07-18 15:53:31.000000000 +0200 +++ new/sounddevice-0.4.1/NEWS.rst 2020-09-26 19:14:45.000000000 +0200 @@ -1,3 +1,6 @@ +0.4.1 (2020-09-26): + * `CallbackFlags` attributes are now writable + 0.4.0 (2020-07-18): * Drop support for Python 2.x * Fix memory issues in `play()`, `rec()` and `playrec()` diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sounddevice-0.4.0/PKG-INFO new/sounddevice-0.4.1/PKG-INFO --- old/sounddevice-0.4.0/PKG-INFO 2020-07-18 15:54:17.558579400 +0200 +++ new/sounddevice-0.4.1/PKG-INFO 2020-09-26 19:17:25.373517000 +0200 @@ -1,6 +1,6 @@ Metadata-Version: 2.1 Name: sounddevice -Version: 0.4.0 +Version: 0.4.1 Summary: Play and Record Sound with Python Home-page: http://python-sounddevice.readthedocs.io/ Author: Matthias Geier diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sounddevice-0.4.0/doc/CONTRIBUTING.rst new/sounddevice-0.4.1/doc/CONTRIBUTING.rst --- old/sounddevice-0.4.0/doc/CONTRIBUTING.rst 2020-07-15 17:23:35.000000000 +0200 +++ new/sounddevice-0.4.1/doc/CONTRIBUTING.rst 2020-09-23 12:45:04.000000000 +0200 @@ -92,7 +92,7 @@ git clone --recursive https://github.com/spatialaudio/python-sounddevice.git cd python-sounddevice - python3 -m pip install -e . --user + python3 -m pip install -e . .. _PyPI: https://pypi.org/project/sounddevice/ .. _Github: https://github.com/spatialaudio/python-sounddevice/ @@ -118,7 +118,7 @@ pages using Sphinx_. You can install it and a few other necessary packages with:: - python3 -m pip install -r doc/requirements.txt --user + python3 -m pip install -r doc/requirements.txt To (re-)build the HTML files, use:: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sounddevice-0.4.0/doc/installation.rst new/sounddevice-0.4.1/doc/installation.rst --- old/sounddevice-0.4.0/doc/installation.rst 2020-07-15 17:23:35.000000000 +0200 +++ new/sounddevice-0.4.1/doc/installation.rst 2020-09-23 12:45:04.000000000 +0200 @@ -52,10 +52,10 @@ To install the latest release from PyPI, use:: - python3 -m pip install sounddevice --user + python3 -m pip install sounddevice -If you want to install it system-wide for all users (assuming you have the -necessary rights), you can just drop the ``--user`` option. +Depending on your Python installation, +you may have to use ``python`` instead of ``python3``. If you have installed the module already, you can use the ``--upgrade`` flag to get the newest release. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sounddevice-0.4.0/examples/play_long_file.py new/sounddevice-0.4.1/examples/play_long_file.py --- old/sounddevice-0.4.0/examples/play_long_file.py 2020-07-15 17:23:35.000000000 +0200 +++ new/sounddevice-0.4.1/examples/play_long_file.py 2020-08-04 20:57:56.000000000 +0200 @@ -72,9 +72,9 @@ assert not status try: data = q.get_nowait() - except queue.Empty: + except queue.Empty as e: print('Buffer is empty: increase buffersize?', file=sys.stderr) - raise sd.CallbackAbort + raise sd.CallbackAbort from e if len(data) < len(outdata): outdata[:len(data)] = data outdata[len(data):] = b'\x00' * (len(outdata) - len(data)) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sounddevice-0.4.0/examples/play_stream.py new/sounddevice-0.4.1/examples/play_stream.py --- old/sounddevice-0.4.0/examples/play_stream.py 2020-07-15 17:23:35.000000000 +0200 +++ new/sounddevice-0.4.1/examples/play_stream.py 2020-08-04 20:57:56.000000000 +0200 @@ -84,9 +84,9 @@ assert not status try: data = q.get_nowait() - except queue.Empty: + except queue.Empty as e: print('Buffer is empty: increase buffersize?', file=sys.stderr) - raise sd.CallbackAbort + raise sd.CallbackAbort from e assert len(data) == len(outdata) outdata[:] = data diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sounddevice-0.4.0/sounddevice.egg-info/PKG-INFO new/sounddevice-0.4.1/sounddevice.egg-info/PKG-INFO --- old/sounddevice-0.4.0/sounddevice.egg-info/PKG-INFO 2020-07-18 15:54:17.000000000 +0200 +++ new/sounddevice-0.4.1/sounddevice.egg-info/PKG-INFO 2020-09-26 19:17:25.000000000 +0200 @@ -1,6 +1,6 @@ Metadata-Version: 2.1 Name: sounddevice -Version: 0.4.0 +Version: 0.4.1 Summary: Play and Record Sound with Python Home-page: http://python-sounddevice.readthedocs.io/ Author: Matthias Geier diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sounddevice-0.4.0/sounddevice.py new/sounddevice-0.4.1/sounddevice.py --- old/sounddevice-0.4.0/sounddevice.py 2020-07-18 15:51:44.000000000 +0200 +++ new/sounddevice-0.4.1/sounddevice.py 2020-09-26 19:15:40.000000000 +0200 @@ -48,7 +48,7 @@ https://python-sounddevice.readthedocs.io/ """ -__version__ = '0.4.0' +__version__ = '0.4.1' import atexit as _atexit import os as _os @@ -94,11 +94,6 @@ _initialized = 0 _last_callback = None -try: - _basestring = basestring -except NameError: - _basestring = str, bytes - def play(data, samplerate=None, mapping=None, blocking=False, loop=False, **kwargs): @@ -1844,6 +1839,19 @@ >>> errors.input_overflow True + The values may also be set and cleared by the user: + + >>> import sounddevice as sd + >>> cf = sd.CallbackFlags() + >>> cf + <sounddevice.CallbackFlags: no flags set> + >>> cf.input_underflow = True + >>> cf + <sounddevice.CallbackFlags: input underflow> + >>> cf.input_underflow = False + >>> cf + <sounddevice.CallbackFlags: no flags set> + """ __slots__ = '_flags' @@ -1886,6 +1894,10 @@ """ return self._hasflag(_lib.paInputUnderflow) + @input_underflow.setter + def input_underflow(self, value): + self._updateflag(_lib.paInputUnderflow, value) + @property def input_overflow(self): """Input overflow. @@ -1903,6 +1915,10 @@ """ return self._hasflag(_lib.paInputOverflow) + @input_overflow.setter + def input_overflow(self, value): + self._updateflag(_lib.paInputOverflow, value) + @property def output_underflow(self): """Output underflow. @@ -1916,6 +1932,10 @@ """ return self._hasflag(_lib.paOutputUnderflow) + @output_underflow.setter + def output_underflow(self, value): + self._updateflag(_lib.paOutputUnderflow, value) + @property def output_overflow(self): """Output overflow. @@ -1930,6 +1950,10 @@ """ return self._hasflag(_lib.paOutputOverflow) + @output_overflow.setter + def output_overflow(self, value): + self._updateflag(_lib.paOutputOverflow, value) + @property def priming_output(self): """Priming output. @@ -1949,6 +1973,13 @@ """Check a given flag.""" return bool(self._flags & flag) + def _updateflag(self, flag, value): + """Set/clear a given flag.""" + if value: + self._flags |= flag + else: + self._flags &= ~flag + class _InputOutputPair(object): """Parameter pairs for device, channels, dtype and latency.""" @@ -2341,9 +2372,9 @@ try: self._flags = conversion_dict[conversion_quality.lower()] - except (KeyError, AttributeError): + except (KeyError, AttributeError) as e: raise ValueError('conversion_quality must be one of ' + - repr(list(conversion_dict))) + repr(list(conversion_dict))) from e if change_device_parameters: self._flags |= _lib.paMacCoreChangeDeviceParameters if fail_if_conversion_required: @@ -2421,9 +2452,9 @@ try: import numpy assert numpy # avoid "imported but unused" message (W0611) - except ImportError: + except ImportError as e: raise ImportError( - 'NumPy must be installed for play()/rec()/playrec()') + 'NumPy must be installed for play()/rec()/playrec()') from e self.loop = loop self.event = threading.Event() self.status = CallbackFlags() @@ -2627,8 +2658,8 @@ pass # NumPy not available or invalid dtype (e.g. 'int24') or ... try: sampleformat = _sampleformats[dtype] - except KeyError: - raise ValueError('Invalid ' + kind + ' sample format') + except KeyError as e: + raise ValueError('Invalid ' + kind + ' sample format') from e samplesize = _check(_lib.Pa_GetSampleSize(sampleformat)) if latency in ('low', 'high'): latency = info['default_' + latency + '_' + kind + '_latency'] @@ -2672,15 +2703,15 @@ for input and output but also a pair of two separate values. """ - if isinstance(value, _basestring): + if isinstance(value, (str, bytes)): # iterable, but not meant for splitting return value, value try: invalue, outvalue = value except TypeError: invalue = outvalue = value - except ValueError: - raise ValueError('Only single values and pairs are allowed') + except ValueError as e: + raise ValueError('Only single values and pairs are allowed') from e return invalue, outvalue