On 2017-09-24 18:42, Aurelien Jarno wrote: > > ValueError: The truth value of an array with more than one element is > > ambiguous. Use a.any() or a.all() > > QPainter::end: Painter ended with 2 saved states > > debian/rules:40: recipe for target 'override_dh_auto_test' failed > > make[1]: *** [override_dh_auto_test] Error 1 > > This failure is due to the recent upload of numpy 1.13.
I have just done another NMU to fix this issue, using a patch from upstream. Please find the diff attached. -- Aurelien Jarno GPG: 4096R/1DDD8C9B aurel...@aurel32.net http://www.aurel32.net
diff -Nru veusz-1.21.1/debian/changelog veusz-1.21.1/debian/changelog --- veusz-1.21.1/debian/changelog 2017-09-24 14:36:11.000000000 +0200 +++ veusz-1.21.1/debian/changelog 2017-09-24 23:20:35.000000000 +0200 @@ -1,3 +1,10 @@ +veusz (1.21.1-1.3) unstable; urgency=medium + + * Non-maintainer upload. + * Backport a patch from upstream to add compatiblity with numpy 1.13. + + -- Aurelien Jarno <aure...@debian.org> Sun, 24 Sep 2017 23:20:35 +0200 + veusz (1.21.1-1.2) unstable; urgency=medium * Non-maintainer upload. diff -Nru veusz-1.21.1/debian/patches/01-numpy-1.13.diff veusz-1.21.1/debian/patches/01-numpy-1.13.diff --- veusz-1.21.1/debian/patches/01-numpy-1.13.diff 1970-01-01 01:00:00.000000000 +0100 +++ veusz-1.21.1/debian/patches/01-numpy-1.13.diff 2017-09-24 23:18:17.000000000 +0200 @@ -0,0 +1,88 @@ +commit 70447b7bc2dbd067b526569aa673f8f37407dc00 +Author: Jeremy Sanders <jer...@jeremysanders.net> +Date: Sat Sep 17 15:25:48 2016 +0200 + + Avoid None in list of numpy arrays + +diff --git a/veusz/utils/utilfuncs.py b/veusz/utils/utilfuncs.py +index 836816d6..ffe429f8 100644 +--- a/veusz/utils/utilfuncs.py ++++ b/veusz/utils/utilfuncs.py +@@ -591,3 +591,7 @@ def unescapeHDFDataName(name): + name = name.replace('`SL', '/') + name = name.replace('`BT', '`') + return name ++ ++def allNotNone(*items): ++ """Are all the items not None.""" ++ return not any((x is None for x in items)) +diff --git a/veusz/widgets/axis.py b/veusz/widgets/axis.py +index 5ef52b4c..eac54dd9 100644 +--- a/veusz/widgets/axis.py ++++ b/veusz/widgets/axis.py +@@ -750,7 +750,7 @@ class Axis(widget.Widget): + for plotter in plotters: + # get label and label coordinates from plotter (if any) + labels, coords = plotter.getAxisLabels(dir) +- if None not in (labels, coords): ++ if labels is not None and coords is not None: + # convert coordinates to plotter coordinates + pcoords = self._graphToPlotter(coords) + for coord, pcoord, lab in czip(coords, pcoords, labels): +diff --git a/veusz/widgets/point.py b/veusz/widgets/point.py +index 2763845b..59152c68 100644 +--- a/veusz/widgets/point.py ++++ b/veusz/widgets/point.py +@@ -75,14 +75,14 @@ + def _errorBarsBox(style, xmin, xmax, ymin, ymax, xplotter, yplotter, + s, painter, clip): + """Draw box around error region.""" +- if None not in (xmin, xmax, ymin, ymax): ++ if utils.allNotNone(xmin, xmax, ymin, ymax): + painter.setBrush( qt4.QBrush() ) + utils.plotBoxesToPainter(painter, xmin, ymin, xmax, ymax, clip) + + def _errorBarsBoxFilled(style, xmin, xmax, ymin, ymax, xplotter, yplotter, + s, painter, clip): + """Draw box filled region inside error bars.""" +- if None not in (xmin, xmax, ymin, ymax): ++ if utils.allNotNone(xmin, xmax, ymin, ymax): + # filled region below + if not s.FillBelow.hideerror: + path = qt4.QPainterPath() +@@ -102,7 +102,7 @@ + def _errorBarsDiamond(style, xmin, xmax, ymin, ymax, xplotter, yplotter, + s, painter, clip): + """Draw diamond around error region.""" +- if None not in (xmin, xmax, ymin, ymax): ++ if utils.allNotNone(xmin, xmax, ymin, ymax): + + # expand clip by pen width (urgh) + pw = painter.pen().widthF()*2 +@@ -119,7 +119,7 @@ + def _errorBarsDiamondFilled(style, xmin, xmax, ymin, ymax, xplotter, yplotter, + s, painter, clip): + """Draw diamond filled region inside error bars.""" +- if None not in (xmin, xmax, ymin, ymax): ++ if utils.allNotNone(xmin, xmax, ymin, ymax): + if not s.FillBelow.hideerror: + path = qt4.QPainterPath() + utils.addNumpyPolygonToPath(path, clip, +@@ -137,7 +137,7 @@ + def _errorBarsCurve(style, xmin, xmax, ymin, ymax, xplotter, yplotter, + s, painter, clip): + """Draw curve around error region.""" +- if None not in (xmin, xmax, ymin, ymax): ++ if utils.allNotNone(xmin, xmax, ymin, ymax): + # non-filling brush + painter.setBrush( qt4.QBrush() ) + +@@ -160,7 +160,7 @@ + s, painter, clip): + """Fill area around error region.""" + +- if None not in (xmin, xmax, ymin, ymax): ++ if utils.allNotNone(xmin, xmax, ymin, ymax): + for xp, yp, xmn, ymn, xmx, ymx in czip( + xplotter, yplotter, xmin, ymin, xmax, ymax): + diff -Nru veusz-1.21.1/debian/patches/series veusz-1.21.1/debian/patches/series --- veusz-1.21.1/debian/patches/series 2014-09-01 04:42:27.000000000 +0200 +++ veusz-1.21.1/debian/patches/series 2017-09-24 23:19:03.000000000 +0200 @@ -1 +1 @@ - +01-numpy-1.13.diff