Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package python-alsa for openSUSE:Factory checked in at 2021-12-07 00:00:15 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-alsa (Old) and /work/SRC/openSUSE:Factory/.python-alsa.new.31177 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-alsa" Tue Dec 7 00:00:15 2021 rev:4 rq:936047 version:1.2.6 Changes: -------- --- /work/SRC/openSUSE:Factory/python-alsa/python-alsa.changes 2021-12-02 22:31:17.610434153 +0100 +++ /work/SRC/openSUSE:Factory/.python-alsa.new.31177/python-alsa.changes 2021-12-07 00:01:57.904016334 +0100 @@ -1,0 +2,11 @@ +Mon Dec 6 15:17:53 CET 2021 - ti...@suse.de + +- Update to version 1.2.6: + including all previous fixes. See URL below for details: + https://alsa-project.org/wiki/Changes_v1.2.5.1_v1.2.6#alsa-python +- Add *.sig file for the tarball +- Drop obsoleted patches + 0001-alsaseq-fix-constant-objects-in-Python-3.patch + 0002-Fix-PyTuple_SET_ITEM-usage-no-return-value.patch + +------------------------------------------------------------------- Old: ---- 0001-alsaseq-fix-constant-objects-in-Python-3.patch 0002-Fix-PyTuple_SET_ITEM-usage-no-return-value.patch pyalsa-1.1.6.tar.bz2 New: ---- pyalsa-1.2.6.tar.bz2 pyalsa-1.2.6.tar.bz2.sig ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-alsa.spec ++++++ --- /var/tmp/diff_new_pack.kOD8Pa/_old 2021-12-07 00:01:58.596013887 +0100 +++ /var/tmp/diff_new_pack.kOD8Pa/_new 2021-12-07 00:01:58.600013872 +0100 @@ -18,17 +18,16 @@ %{?!python_module:%define python_module() python-%{**} python3-%{**}} Name: python-alsa -Version: 1.1.6 +Version: 1.2.6 Release: 0 Summary: Python ALSA binding License: LGPL-2.1-or-later AND GPL-2.0-only Group: Development/Libraries/Python URL: https://www.alsa-project.org Source: %{url}/files/pub/pyalsa/pyalsa-%{version}.tar.bz2 -Source1: COPYING -Source2: COPYING.LIB -Patch1: 0001-alsaseq-fix-constant-objects-in-Python-3.patch -Patch2: 0002-Fix-PyTuple_SET_ITEM-usage-no-return-value.patch +Source1: %{url}/files/pub/pyalsa/pyalsa-%{version}.tar.bz2.sig +Source2: COPYING +Source3: COPYING.LIB BuildRequires: %{python_module devel} BuildRequires: %{python_module setuptools} BuildRequires: alsa-devel @@ -42,9 +41,7 @@ %prep %setup -q -n pyalsa-%{version} -%patch1 -p1 -%patch2 -p1 -cp %{SOURCE1} %{SOURCE2} . +cp %{SOURCE2} %{SOURCE3} . %build export CFLAGS="%{optflags} -fno-strict-aliasing" ++++++ pyalsa-1.1.6.tar.bz2 -> pyalsa-1.2.6.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pyalsa-1.1.6/MANIFEST.in new/pyalsa-1.2.6/MANIFEST.in --- old/pyalsa-1.1.6/MANIFEST.in 1970-01-01 01:00:00.000000000 +0100 +++ new/pyalsa-1.2.6/MANIFEST.in 2021-12-06 11:12:31.000000000 +0100 @@ -0,0 +1,3 @@ +include pyalsa/*.h +include test/*.py +include utils/*.py diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pyalsa-1.1.6/PKG-INFO new/pyalsa-1.2.6/PKG-INFO --- old/pyalsa-1.1.6/PKG-INFO 2018-04-03 18:47:19.000000000 +0200 +++ new/pyalsa-1.2.6/PKG-INFO 2021-12-06 12:47:04.973220000 +0100 @@ -1,6 +1,6 @@ Metadata-Version: 1.1 Name: pyalsa -Version: 1.1.6 +Version: 1.2.6 Summary: Python binding for the ALSA library. Home-page: http://www.alsa-project.org Author: The ALSA Team diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pyalsa-1.1.6/pyalsa/alsahcontrol.c new/pyalsa-1.2.6/pyalsa/alsahcontrol.c --- old/pyalsa-1.1.6/pyalsa/alsahcontrol.c 2018-04-03 18:45:38.000000000 +0200 +++ new/pyalsa-1.2.6/pyalsa/alsahcontrol.c 2021-12-06 11:12:31.000000000 +0100 @@ -1543,8 +1543,8 @@ t = PyTuple_New(2); if (t) { - if (PyTuple_SET_ITEM(t, 0, (PyObject *)pyhelem)) - Py_INCREF(pyhelem); + PyTuple_SET_ITEM(t, 0, (PyObject *)pyhelem); + Py_INCREF(pyhelem); PyTuple_SET_ITEM(t, 1, PyInt_FromLong(mask)); r = PyObject_CallObject(o, t); Py_DECREF(t); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pyalsa-1.1.6/pyalsa/alsamixer.c new/pyalsa-1.2.6/pyalsa/alsamixer.c --- old/pyalsa-1.1.6/pyalsa/alsamixer.c 2018-04-03 18:45:38.000000000 +0200 +++ new/pyalsa-1.2.6/pyalsa/alsamixer.c 2021-12-06 11:12:31.000000000 +0100 @@ -1348,8 +1348,8 @@ t = PyTuple_New(2); if (t) { - if (PyTuple_SET_ITEM(t, 0, (PyObject *)pyelem)) - Py_INCREF(pyelem); + PyTuple_SET_ITEM(t, 0, (PyObject *)pyelem); + Py_INCREF(pyelem); PyTuple_SET_ITEM(t, 1, PyInt_FromLong(mask)); r = PyObject_CallObject(o, t); Py_DECREF(t); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pyalsa-1.1.6/pyalsa/alsaseq.c new/pyalsa-1.2.6/pyalsa/alsaseq.c --- old/pyalsa-1.1.6/pyalsa/alsaseq.c 2018-04-03 18:45:38.000000000 +0200 +++ new/pyalsa-1.2.6/pyalsa/alsaseq.c 2021-12-06 11:12:31.000000000 +0100 @@ -51,9 +51,6 @@ /* the C variable of a constant dict */ #define TDICT(subtype) _dictPYALSASEQ_CONST_##subtype -/* the C enumeration of a constant dict */ -#define TTYPE(subtype) PYALSASEQ_CONST_##subtype - /* defines constant dict by type */ #define TCONSTDICT(subtype) \ static PyObject * TDICT(subtype); @@ -71,7 +68,7 @@ /* creates a typed constant and add it to the module and dictionary */ #define TCONSTADD(module, subtype, name) { \ PyObject *tmp = \ - Constant_create(#name, SND_##name, TTYPE(subtype)); \ + Constant_create(#name, SND_##name); \ if (tmp == NULL) { \ return MOD_ERROR_VAL; \ } \ @@ -109,46 +106,6 @@ } \ } - -/* num protocol support for binary Constant operations */ -#define NUMPROTOCOL2(name, oper) \ - static PyObject * \ - Constant_##name (PyObject *v, PyObject *w) { \ - int type = 0; \ - long val1, val2, val; \ - if (get_long1(v, &val1) || get_long1(w, &val2)) { \ - Py_INCREF(Py_NotImplemented); \ - return Py_NotImplemented; \ - } \ - val = val1 oper val2; \ - /* always asume left will be the type */ \ - if (PyObject_TypeCheck(v, &ConstantType)) { \ - type = ((ConstantObject *) v)->type; \ - } else if (PyObject_TypeCheck(w, &ConstantType)) { \ - type = ((ConstantObject *) w)->type; \ - } \ - PyObject *self = Constant_create(#oper, val, type); \ - return self; \ - } - -/* num protocol support for unary Constant operations */ -#define NUMPROTOCOL1(name, oper) \ - static PyObject * \ - Constant_##name (PyObject *v) { \ - int type = 0; \ - long val1, val; \ - if (get_long1(v, &val1)) { \ - Py_INCREF(Py_NotImplemented); \ - return Py_NotImplemented; \ - } \ - val = oper val1; \ - if (PyObject_TypeCheck(v, &ConstantType)) { \ - type = ((ConstantObject *) v)->type; \ - } \ - PyObject *self = Constant_create(#oper, val, type); \ - return self; \ - } - /* sets the object into the dict */ #define SETDICTOBJ(name, object) \ PyDict_SetItemString(dict, name, object) @@ -328,21 +285,6 @@ // alsaseq.Constant implementation ////////////////////////////////////////////////////////////////////////////// -/* alsaseq.Constant->type enumeration */ -enum { - PYALSASEQ_CONST_STREAMS, - PYALSASEQ_CONST_MODE, - PYALSASEQ_CONST_QUEUE, - PYALSASEQ_CONST_CLIENT_TYPE, - PYALSASEQ_CONST_PORT_CAP, - PYALSASEQ_CONST_PORT_TYPE, - PYALSASEQ_CONST_EVENT_TYPE, - PYALSASEQ_CONST_EVENT_TIMESTAMP, - PYALSASEQ_CONST_EVENT_TIMEMODE, - PYALSASEQ_CONST_ADDR_CLIENT, - PYALSASEQ_CONST_ADDR_PORT, -}; - // constants dictionaries TCONSTDICT(STREAMS); @@ -390,34 +332,66 @@ "Python number protocol." ); -/** alsaseq.Constant object structure type */ +/** alsaseq.Constant additional fields */ +/* This follows the variable length portion of the Long type */ typedef struct { - PyObject_HEAD - ; - - /* value of constant */ - unsigned long int value; /* name of constant */ const char *name; - /* type of constant */ - int type; +} ConstantExtraFields; + +/** alsaseq.Constant object structure type */ +typedef struct { +#if PY_MAJOR_VERSION < 3 + PyIntObject base; +#else + /* NOTE: this only works if the value fits in one digit */ + PyLongObject base; +#endif + /* This field is actually offset by the base type's variable size portion */ + ConstantExtraFields extra; } ConstantObject; +#if PY_MAJOR_VERSION < 3 +/* PyInt is fixed size in Python 2 */ +# define CONST_VALUE(x) PyInt_AsLong((PyObject *)x) +# define CONST_EXTRA(x) (&(x->extra)) +#else +/* PyLong is variable size in Python 3 */ +# define CONST_VALUE(x) PyLong_AsLong((PyObject *)x) +# define CONST_EXTRA(x) \ + ((ConstantExtraFields *)( \ + ((intptr_t)(&x->extra)) \ + + abs(Py_SIZE(&x->base)) * Py_TYPE(x)->tp_itemsize \ + )) +#endif + /** alsaseq.Constant type (initialized later...) */ static PyTypeObject ConstantType; /** alsaseq.Constant internal create */ static PyObject * -Constant_create(const char *name, long value, int type) { - ConstantObject *self = PyObject_New(ConstantObject, &ConstantType); +Constant_create(const char *name, long value) { +#if PY_MAJOR_VERSION < 3 + PyObject *val = PyInt_FromLong(value); +#else + PyObject *val = PyLong_FromLong(value); +#endif + + PyObject *args = PyTuple_Pack(1, val); + Py_DECREF(val); + +#if PY_MAJOR_VERSION < 3 + ConstantObject *self = (ConstantObject *)PyInt_Type.tp_new(&ConstantType, args, NULL); +#else + ConstantObject *self = (ConstantObject *)PyLong_Type.tp_new(&ConstantType, args, NULL); +#endif + Py_DECREF(args); if (self == NULL) { return NULL; } - self->value = value; - self->name = name; - self->type = type; + CONST_EXTRA(self)->name = name; return (PyObject *)self; } @@ -426,35 +400,17 @@ static PyObject * Constant_repr(ConstantObject *self) { return PyUnicode_FromFormat("%s(0x%x)", - self->name, - (unsigned int)self->value); + CONST_EXTRA(self)->name, + (unsigned int)CONST_VALUE(self)); } /** alsaseq.Constant tp_str */ static PyObject * Constant_str(ConstantObject *self) { return PyUnicode_FromFormat("%s", - self->name); + CONST_EXTRA(self)->name); } -/** alsaseq.Constant Number protocol support (note: not all ops supported) */ -NUMPROTOCOL2(Add, +) -NUMPROTOCOL2(Subtract, -) -NUMPROTOCOL2(Xor, ^) -NUMPROTOCOL2(Or, |) -NUMPROTOCOL2(And, &) -NUMPROTOCOL1(Invert, ~) - -/** alsaseq.Constant number protocol methods */ -static PyNumberMethods Constant_as_number = { - nb_add: (binaryfunc)Constant_Add, - nb_subtract: (binaryfunc)Constant_Subtract, - nb_xor: (binaryfunc)Constant_Xor, - nb_or: (binaryfunc)Constant_Or, - nb_and: (binaryfunc)Constant_And, - nb_invert: (unaryfunc)Constant_Invert -}; - /** alsaseq.Constant type */ static PyTypeObject ConstantType = { PyVarObject_HEAD_INIT(NULL, 0) @@ -464,7 +420,7 @@ #else tp_base: &PyLong_Type, #endif - tp_basicsize: sizeof(ConstantObject), + tp_basicsize: sizeof(ConstantObject) + sizeof(ConstantExtraFields), tp_flags: #if PY_MAJOR_VERSION < 3 Py_TPFLAGS_HAVE_GETCHARBUFFER @@ -474,7 +430,6 @@ 0, #endif tp_doc: Constant__doc__, - tp_as_number: &Constant_as_number, tp_free: PyObject_Del, tp_str: (reprfunc)Constant_str, tp_repr: (reprfunc)Constant_repr @@ -1730,7 +1685,7 @@ unsigned int ntime = 0; Py_DECREF(key); if (constObject != NULL) { - typestr = constObject->name; + typestr = constObject->extra.name; } if (snd_seq_ev_is_real(self->event)) { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pyalsa-1.1.6/pyalsa.egg-info/PKG-INFO new/pyalsa-1.2.6/pyalsa.egg-info/PKG-INFO --- old/pyalsa-1.1.6/pyalsa.egg-info/PKG-INFO 1970-01-01 01:00:00.000000000 +0100 +++ new/pyalsa-1.2.6/pyalsa.egg-info/PKG-INFO 2021-12-06 12:47:04.000000000 +0100 @@ -0,0 +1,11 @@ +Metadata-Version: 1.1 +Name: pyalsa +Version: 1.2.6 +Summary: Python binding for the ALSA library. +Home-page: http://www.alsa-project.org +Author: The ALSA Team +Author-email: alsa-de...@alsa-project.org +License: LGPLv2+ +Download-URL: ftp://ftp.alsa-project.org/pub/pyalsa/ +Description: UNKNOWN +Platform: UNKNOWN diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pyalsa-1.1.6/pyalsa.egg-info/SOURCES.txt new/pyalsa-1.2.6/pyalsa.egg-info/SOURCES.txt --- old/pyalsa-1.1.6/pyalsa.egg-info/SOURCES.txt 1970-01-01 01:00:00.000000000 +0100 +++ new/pyalsa-1.2.6/pyalsa.egg-info/SOURCES.txt 2021-12-06 12:47:04.000000000 +0100 @@ -0,0 +1,27 @@ +MANIFEST.in +setup.py +pyalsa/__init__.py +pyalsa/alsacard.c +pyalsa/alsacontrol.c +pyalsa/alsahcontrol.c +pyalsa/alsamixer.c +pyalsa/alsaseq.c +pyalsa/common.h +pyalsa.egg-info/PKG-INFO +pyalsa.egg-info/SOURCES.txt +pyalsa.egg-info/dependency_links.txt +pyalsa.egg-info/top_level.txt +test/alsamemdebug.py +test/cardtest1.py +test/ctltest1.py +test/hctltest1.py +test/hctltest2.py +test/mixertest1.py +test/mixertest2.py +test/seqtest1.py +test/seqtest2.py +test/seqtest3.py +utils/aconnect.py +utils/aplaymidi.py +utils/aseqdump.py +utils/remove-user-ctl.py \ No newline at end of file diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pyalsa-1.1.6/pyalsa.egg-info/dependency_links.txt new/pyalsa-1.2.6/pyalsa.egg-info/dependency_links.txt --- old/pyalsa-1.1.6/pyalsa.egg-info/dependency_links.txt 1970-01-01 01:00:00.000000000 +0100 +++ new/pyalsa-1.2.6/pyalsa.egg-info/dependency_links.txt 2021-12-06 12:47:04.000000000 +0100 @@ -0,0 +1 @@ + diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pyalsa-1.1.6/pyalsa.egg-info/top_level.txt new/pyalsa-1.2.6/pyalsa.egg-info/top_level.txt --- old/pyalsa-1.1.6/pyalsa.egg-info/top_level.txt 1970-01-01 01:00:00.000000000 +0100 +++ new/pyalsa-1.2.6/pyalsa.egg-info/top_level.txt 2021-12-06 12:47:04.000000000 +0100 @@ -0,0 +1 @@ +pyalsa diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pyalsa-1.1.6/setup.cfg new/pyalsa-1.2.6/setup.cfg --- old/pyalsa-1.1.6/setup.cfg 1970-01-01 01:00:00.000000000 +0100 +++ new/pyalsa-1.2.6/setup.cfg 2021-12-06 12:47:04.973220000 +0100 @@ -0,0 +1,4 @@ +[egg_info] +tag_build = +tag_date = 0 + diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pyalsa-1.1.6/setup.py new/pyalsa-1.2.6/setup.py --- old/pyalsa-1.1.6/setup.py 2018-04-03 18:45:38.000000000 +0200 +++ new/pyalsa-1.2.6/setup.py 2021-12-06 11:12:31.000000000 +0100 @@ -9,7 +9,7 @@ except ImportError: from distutils.core import setup, Extension -VERSION='1.1.6' +VERSION='1.2.6' if os.path.exists("version"): fp = open("version", "r")