[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#1058586: bullseye-pu: package python-cogent/2020.12.21a+dfsg-4+deb11u1



Package: release.debian.org
Severity: normal
Tags: bullseye
User: release.debian.org@packages.debian.org
Usertags: pu
X-Debbugs-Cc: python-cogent@packages.debian.org, sanvila@debian.org
Control: affects -1 + src:python-cogent

[ Reason ]
This upload fixes Bug #1030885: FTBFS on single-CPU systems.

[ Impact ]
Anybody trying to build the package using a single-CPU system
will see that the build will fail unexpectedly.

[ Tests ]
I've checked that the fixed package builds again on single-CPU
systems and also that it still builds ok on multi-core systems.

[ Risks ]
Low risk. No real code changes. The only change is that
some tests are skipped when we know that they would fail.

[ Checklist ]
  [X] *all* changes are documented in the d/changelog
  [X] I reviewed all changes and I approve them
  [X] attach debdiff against the package in (old)stable
  [X] the issue is verified as fixed in unstable

[ Changes ]
Skip parallel tests when the build machine has only one CPU.

[ Other info ]
The package is already uploaded.
diff -Nru python-cogent-2020.12.21a+dfsg/debian/changelog python-cogent-2020.12.21a+dfsg/debian/changelog
--- python-cogent-2020.12.21a+dfsg/debian/changelog	2021-02-09 14:42:13.000000000 +0100
+++ python-cogent-2020.12.21a+dfsg/debian/changelog	2023-12-13 12:30:00.000000000 +0100
@@ -1,3 +1,10 @@
+python-cogent (2020.12.21a+dfsg-4+deb11u1) bullseye; urgency=medium
+
+  * Team upload.
+  * Skip parallel tests on single-CPU systems. Closes: #1030885.
+
+ -- Santiago Vila <sanvila@debian.org>  Wed, 13 Dec 2023 12:30:00 +0100
+
 python-cogent (2020.12.21a+dfsg-4) unstable; urgency=high
 
   * Team upload.
diff -Nru python-cogent-2020.12.21a+dfsg/debian/patches/series python-cogent-2020.12.21a+dfsg/debian/patches/series
--- python-cogent-2020.12.21a+dfsg/debian/patches/series	2021-02-07 17:23:21.000000000 +0100
+++ python-cogent-2020.12.21a+dfsg/debian/patches/series	2023-12-13 12:30:00.000000000 +0100
@@ -1,3 +1,4 @@
 sphinx.patch
 fix_interpreter.patch
 py39_union_dict
+skip-parallel-tests-on-single-cpu-systems.patch
diff -Nru python-cogent-2020.12.21a+dfsg/debian/patches/skip-parallel-tests-on-single-cpu-systems.patch python-cogent-2020.12.21a+dfsg/debian/patches/skip-parallel-tests-on-single-cpu-systems.patch
--- python-cogent-2020.12.21a+dfsg/debian/patches/skip-parallel-tests-on-single-cpu-systems.patch	1970-01-01 01:00:00.000000000 +0100
+++ python-cogent-2020.12.21a+dfsg/debian/patches/skip-parallel-tests-on-single-cpu-systems.patch	2023-12-13 12:30:00.000000000 +0100
@@ -0,0 +1,73 @@
+Author: Santiago Vila <sanvila@debian.org>
+Last-Update: 2023-12-13
+Bug-Debian: https://bugs.debian.org/1030885
+Description: Skip parallel tests on single-cpu systems
+
+--- a/tests/test_app/test_evo.py
++++ b/tests/test_app/test_evo.py
+@@ -1,5 +1,7 @@
++import multiprocessing
++
+ from os.path import dirname, join
+-from unittest import TestCase, main
++from unittest import TestCase, main, skipIf
+ from unittest.mock import MagicMock
+ 
+ from numpy.testing import assert_allclose, assert_raises
+@@ -670,6 +672,7 @@
+         got = deserialise_object(json)
+         self.assertIsInstance(got, evo_app.bootstrap_result)
+ 
++    @skipIf(multiprocessing.cpu_count() == 1, "Does not work on single-cpu systems")
+     def test_bstrap_parallel(self):
+         """exercising bootstrap with parallel"""
+         aln = load_aligned_seqs(join(data_dir, "brca1.fasta"), moltype="dna")
+--- a/tests/test_app/test_io.py
++++ b/tests/test_app/test_io.py
+@@ -3,10 +3,11 @@
+ import pathlib
+ import shutil
+ import zipfile
++import multiprocessing
+ 
+ from os.path import basename, join
+ from tempfile import TemporaryDirectory
+-from unittest import TestCase, main
++from unittest import TestCase, main, skipIf
+ from unittest.mock import Mock, patch
+ 
+ import numpy
+@@ -532,6 +533,7 @@
+             w = io_app.write_db(outdir, create=True, if_exists="skip")
+             w.data_store.close()
+ 
++    @skipIf(multiprocessing.cpu_count() == 1, "Does not work on single-cpu systems")
+     def test_write_db_parallel(self):
+         """writing with overwrite in parallel should reset db"""
+         dstore = io_app.get_data_store(self.basedir, suffix="fasta")
+--- a/tests/test_util/test_parallel.py
++++ b/tests/test_util/test_parallel.py
+@@ -35,6 +35,7 @@
+ 
+ 
+ class ParallelTests(TestCase):
++    @skipIf(multiprocessing.cpu_count() == 1, "Does not work on single-cpu systems")
+     def test_create_processes(self):
+         """Procressor pool should create multiple distingue processes"""
+         max_worker_count = multiprocessing.cpu_count() - 1
+@@ -45,6 +46,7 @@
+         self.assertEqual(sorted(list(result_values)), index)
+         self.assertEqual(len(set(result_processes)), max_worker_count)
+ 
++    @skipIf(multiprocessing.cpu_count() == 1, "Does not work on single-cpu systems")
+     def test_random_seeding(self):
+         """Random seed should be set every function call"""
+         # On Windows process ids are not guaranteed to be sequential(1,2,3,4...)
+@@ -56,6 +58,7 @@
+         self.assertEqual(result1[0], result2[0])
+         self.assertNotEqual(result1, result2)
+ 
++    @skipIf(multiprocessing.cpu_count() == 1, "Does not work on single-cpu systems")
+     @skipIf(sys.version_info[1] < 7, "method exclusive to Python 3.7 and above")
+     def test_is_master_process(self):
+         """

Reply to: