[Python-modules-team] Bug#999385: python-pyalsa ftbfs with Python 3.10

Steve Langasek steve.langasek at canonical.com
Tue Nov 16 16:17:10 GMT 2021


Package: python-pyalsa
Version: 1.1.6-2
Followup-For: Bug #999385
User: ubuntu-devel at lists.ubuntu.com
Usertags: origin-ubuntu jammy ubuntu-patch
Control: tags -1 patch


Sorry, the previous patch was incomplete.  Here is a complete patch
(build-tested).

-- 
Steve Langasek                   Give me a lever long enough and a Free OS
Debian Developer                   to set it on, and I can move the world.
Ubuntu Developer                                   https://www.debian.org/
slangasek at ubuntu.com                                     vorlon at debian.org
-------------- next part --------------
diff -Nru python-pyalsa-1.1.6/debian/patches/python-3.10.patch python-pyalsa-1.1.6/debian/patches/python-3.10.patch
--- python-pyalsa-1.1.6/debian/patches/python-3.10.patch	1969-12-31 16:00:00.000000000 -0800
+++ python-pyalsa-1.1.6/debian/patches/python-3.10.patch	2021-11-15 23:21:28.000000000 -0800
@@ -0,0 +1,36 @@
+Description: Fix build failure with python 3.10.
+ PyTuple_SET_ITEM returns void; don't try to check its return value
+Author: Steve Langasek <steve.langasek at ubuntu.com>
+Bug-Debian: https://bugs.debian.org/999385
+Last-Update: 2021-11-15
+
+Index: python-pyalsa-1.1.6/pyalsa/alsahcontrol.c
+===================================================================
+--- python-pyalsa-1.1.6.orig/pyalsa/alsahcontrol.c
++++ python-pyalsa-1.1.6/pyalsa/alsahcontrol.c
+@@ -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);
+Index: python-pyalsa-1.1.6/pyalsa/alsamixer.c
+===================================================================
+--- python-pyalsa-1.1.6.orig/pyalsa/alsamixer.c
++++ python-pyalsa-1.1.6/pyalsa/alsamixer.c
+@@ -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 -Nru python-pyalsa-1.1.6/debian/patches/series python-pyalsa-1.1.6/debian/patches/series
--- python-pyalsa-1.1.6/debian/patches/series	1969-12-31 16:00:00.000000000 -0800
+++ python-pyalsa-1.1.6/debian/patches/series	2021-11-15 23:16:57.000000000 -0800
@@ -0,0 +1 @@
+python-3.10.patch


More information about the Python-modules-team mailing list