summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefano Rivera <stefanor@debian.org>2023-02-03 21:46:19 +0100
committerStefano Rivera <stefanor@debian.org>2023-02-03 21:46:19 +0100
commit7eef7037f7a9b91d9dceec023f072b25c6e06c2d (patch)
tree29fedfc6911c1df557a44421b48e8a75a3e2fa49
parent3ac5ea21043a6e151fa947d426940e009d322a04 (diff)
parente78f73c2fef1265841aff4bb695ef8f1dcc7aad5 (diff)
Record silx (1.1.0+dfsg-5) in archive suite sid
-rw-r--r--debian/changelog15
-rw-r--r--debian/patches/0008-python3.11-fix.patch27
-rw-r--r--debian/patches/0009-Skip-testing-nanmin-on-float64-arrays-on-mips-el.patch42
-rw-r--r--debian/patches/series2
-rw-r--r--src/silx/gui/utils/testutils.py12
-rw-r--r--src/silx/math/test/test_combo.py7
6 files changed, 97 insertions, 8 deletions
diff --git a/debian/changelog b/debian/changelog
index b55b37e..ad5b735 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,18 @@
+silx (1.1.0+dfsg-5) unstable; urgency=medium
+
+ * Team upload.
+ * Patch out tests that fail on mipsel / mips64el due to a numpy bug.
+
+ -- Stefano Rivera <stefanor@debian.org> Fri, 03 Feb 2023 16:46:19 -0400
+
+silx (1.1.0+dfsg-4) unstable; urgency=medium
+
+ * Team upload.
+ * Add a patch fixing the build with Python 3.11, thanks Simon Quigley.
+ (Closes: #1025183)
+
+ -- Stefano Rivera <stefanor@debian.org> Fri, 27 Jan 2023 21:20:42 -0400
+
silx (1.1.0+dfsg-3) unstable; urgency=medium
* do not run test which use lot's of memory
diff --git a/debian/patches/0008-python3.11-fix.patch b/debian/patches/0008-python3.11-fix.patch
new file mode 100644
index 0000000..79b1b9b
--- /dev/null
+++ b/debian/patches/0008-python3.11-fix.patch
@@ -0,0 +1,27 @@
+Description: Remove special-case for Python 3.11
+Author: Simon Quigley <tsimonq2@debian.org>
+Origin: vendor
+Last-Update: 2023-01-26
+---
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+--- a/src/silx/gui/utils/testutils.py
++++ b/src/silx/gui/utils/testutils.py
+@@ -141,14 +141,10 @@ class TestCaseQt(unittest.TestCase):
+
+ def _currentTestSucceeded(self):
+ if hasattr(self, '_outcome'):
+- if hasattr(self, '_feedErrorsToResult'):
+- # For Python 3.4 -3.10
+- result = self.defaultTestResult() # these 2 methods have no side effects
+- if hasattr(self._outcome, 'errors'):
+- self._feedErrorsToResult(result, self._outcome.errors)
+- else:
+- # Python 3.11+
+- result = self._outcome.result
++ # For Python 3.4 -3.10
++ result = self.defaultTestResult() # these 2 methods have no side effects
++ if hasattr(self._outcome, 'errors'):
++ self._feedErrorsToResult(result, self._outcome.errors)
+ else:
+ # For Python < 3.4
+ result = getattr(self, '_outcomeForDoCleanups', self._resultForDoCleanups)
diff --git a/debian/patches/0009-Skip-testing-nanmin-on-float64-arrays-on-mips-el.patch b/debian/patches/0009-Skip-testing-nanmin-on-float64-arrays-on-mips-el.patch
new file mode 100644
index 0000000..27a396a
--- /dev/null
+++ b/debian/patches/0009-Skip-testing-nanmin-on-float64-arrays-on-mips-el.patch
@@ -0,0 +1,42 @@
+From: Stefano Rivera <stefanor@debian.org>
+Date: Fri, 3 Feb 2023 15:34:10 -0400
+Subject: Skip testing nanmin() on float64 arrays on mips*el
+
+This fails on mipsel and mips64el, due to a numpy bug:
+Bug-numpy: https://github.com/numpy/numpy/issues/23158
+---
+ src/silx/math/test/test_combo.py | 7 +++++++
+ 1 file changed, 7 insertions(+)
+
+diff --git a/src/silx/math/test/test_combo.py b/src/silx/math/test/test_combo.py
+index eed0625..bb3f4e4 100644
+--- a/src/silx/math/test/test_combo.py
++++ b/src/silx/math/test/test_combo.py
+@@ -27,6 +27,7 @@ __license__ = "MIT"
+ __date__ = "17/01/2018"
+
+
++import sys
+ import unittest
+
+ import numpy
+@@ -164,6 +165,9 @@ class TestMinMax(ParametricTestCase):
+ def test_nandata(self):
+ """Test min_max with NaN in data"""
+ for dtype in self.FLOATING_DTYPES:
++ if dtype == 'float64' and sys.implementation._multiarch in (
++ 'mips64el-linux-gnuabi64', 'mipsel-linux-gnu'):
++ continue
+ for data in self.NAN_TEST_DATA:
+ with self.subTest(dtype=dtype, data=data):
+ data = numpy.array(data, dtype=dtype)
+@@ -181,6 +185,9 @@ class TestMinMax(ParametricTestCase):
+ def test_infdata(self):
+ """Test min_max with inf."""
+ for dtype in self.FLOATING_DTYPES:
++ if dtype == 'float64' and sys.implementation._multiarch in (
++ 'mips64el-linux-gnuabi64', 'mipsel-linux-gnu'):
++ continue
+ for data in self.INF_TEST_DATA:
+ with self.subTest(dtype=dtype, data=data):
+ data = numpy.array(data, dtype=dtype)
diff --git a/debian/patches/series b/debian/patches/series
index 0d007fc..dccb14e 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -5,3 +5,5 @@
0005-removed-hdf5plugin-from-full-dependencies.patch
0007-python3.10-fix.patch
0007-do-not-install-scipy_spatial-COPYING.txt.patch
+0008-python3.11-fix.patch
+0009-Skip-testing-nanmin-on-float64-arrays-on-mips-el.patch
diff --git a/src/silx/gui/utils/testutils.py b/src/silx/gui/utils/testutils.py
index 1ec9b0b..81ce2c4 100644
--- a/src/silx/gui/utils/testutils.py
+++ b/src/silx/gui/utils/testutils.py
@@ -141,14 +141,10 @@ class TestCaseQt(unittest.TestCase):
def _currentTestSucceeded(self):
if hasattr(self, '_outcome'):
- if hasattr(self, '_feedErrorsToResult'):
- # For Python 3.4 -3.10
- result = self.defaultTestResult() # these 2 methods have no side effects
- if hasattr(self._outcome, 'errors'):
- self._feedErrorsToResult(result, self._outcome.errors)
- else:
- # Python 3.11+
- result = self._outcome.result
+ # For Python 3.4 -3.10
+ result = self.defaultTestResult() # these 2 methods have no side effects
+ if hasattr(self._outcome, 'errors'):
+ self._feedErrorsToResult(result, self._outcome.errors)
else:
# For Python < 3.4
result = getattr(self, '_outcomeForDoCleanups', self._resultForDoCleanups)
diff --git a/src/silx/math/test/test_combo.py b/src/silx/math/test/test_combo.py
index eed0625..bb3f4e4 100644
--- a/src/silx/math/test/test_combo.py
+++ b/src/silx/math/test/test_combo.py
@@ -27,6 +27,7 @@ __license__ = "MIT"
__date__ = "17/01/2018"
+import sys
import unittest
import numpy
@@ -164,6 +165,9 @@ class TestMinMax(ParametricTestCase):
def test_nandata(self):
"""Test min_max with NaN in data"""
for dtype in self.FLOATING_DTYPES:
+ if dtype == 'float64' and sys.implementation._multiarch in (
+ 'mips64el-linux-gnuabi64', 'mipsel-linux-gnu'):
+ continue
for data in self.NAN_TEST_DATA:
with self.subTest(dtype=dtype, data=data):
data = numpy.array(data, dtype=dtype)
@@ -181,6 +185,9 @@ class TestMinMax(ParametricTestCase):
def test_infdata(self):
"""Test min_max with inf."""
for dtype in self.FLOATING_DTYPES:
+ if dtype == 'float64' and sys.implementation._multiarch in (
+ 'mips64el-linux-gnuabi64', 'mipsel-linux-gnu'):
+ continue
for data in self.INF_TEST_DATA:
with self.subTest(dtype=dtype, data=data):
data = numpy.array(data, dtype=dtype)