[Debian-med-packaging] Bug#1030885: python-cogent: FTBFS (some tests require more than one CPU)
Santiago Vila
sanvila at debian.org
Wed Feb 8 18:40:13 GMT 2023
Package: src:python-cogent
Version: 2020.12.21a+dfsg-4
Severity: important
Tags: ftbfs patch
Dear maintainer:
During a rebuild of all packages in bookworm, your package failed to build:
--------------------------------------------------------------------------------
[...]
debian/rules binary-indep
dh binary-indep --with python3 --buildsystem=pybuild
dh_update_autotools_config -i -O--buildsystem=pybuild
dh_autoreconf -i -O--buildsystem=pybuild
dh_auto_configure -i -O--buildsystem=pybuild
debian/rules override_dh_auto_build
make[1]: Entering directory '/<<PKGBUILDDIR>>'
dh_auto_build
I: pybuild plugin_flit:75: Installing package /<<PKGBUILDDIR>>/src/cogent3 -> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.10_cogent3/build/cogent3
I: pybuild plugin_flit:88: Writing dist-info /<<PKGBUILDDIR>>/.pybuild/cpython3_3.10_cogent3/build/
set -x; cd doc; PYTHONPATH=/<<PKGBUILDDIR>> http_proxy='127.0.0.1:9' /usr/bin/make html
+ cd doc
+ PYTHONPATH=/<<PKGBUILDDIR>> http_proxy=127.0.0.1:9 /usr/bin/make html
make[2]: Entering directory '/<<PKGBUILDDIR>>/doc'
[...]
=================================== FAILURES ===================================
______________________ TestBootstrap.test_bstrap_parallel ______________________
self = <test_evo.TestBootstrap testMethod=test_bstrap_parallel>
def test_bstrap_parallel(self):
"""exercising bootstrap with parallel"""
aln = load_aligned_seqs(join(data_dir, "brca1.fasta"), moltype="dna")
aln = aln.take_seqs(aln.names[:3])
aln = aln.omit_gap_pos(allowed_gap_frac=0)
opt_args = dict(max_evaluations=20, limit_action="ignore")
m1 = evo_app.model("F81", opt_args=opt_args)
m2 = evo_app.model("HKY85", opt_args=opt_args)
hyp = evo_app.hypothesis(m1, m2)
strapper = evo_app.bootstrap(hyp, num_reps=2, parallel=True)
result = strapper(aln)
> self.assertIsInstance(result, evo_app.bootstrap_result)
E AssertionError: NotCompleted(type=ERROR, origin=bootstrap, source="/<<PKGBUILDDIR>>/.pybuild/cpython3_3.10_cogent3/build/tests/data/brca1.fasta", message="Traceback (most recent call last):
E File "/<<PKGBUILDDIR>>/.pybuild/cpython3_3.10_cogent3/build/cogent3/app/composable.py", line 312, in _trapped_call
E val = func(val, *args, **kwargs)
E File "/<<PKGBUILDDIR>>/.pybuild/cpython3_3.10_cogent3/build/cogent3/app/evo.py", line 461, in run
E sym_results = [r for r in map_fun(self._fit_sim, range(self._num_reps)) if r]
E File "/<<PKGBUILDDIR>>/.pybuild/cpython3_3.10_cogent3/build/cogent3/app/evo.py", line 461, in <listcomp>
E sym_results = [r for r in map_fun(self._fit_sim, range(self._num_reps)) if r]
E File "/<<PKGBUILDDIR>>/.pybuild/cpython3_3.10_cogent3/build/cogent3/util/parallel.py", line 169, in imap
E chunksize = get_default_chunksize(s, max_workers)
E File "/<<PKGBUILDDIR>>/.pybuild/cpython3_3.10_cogent3/build/cogent3/util/parallel.py", line 90, in get_default_chunksize
E chunksize, remainder = divmod(len(s), max_workers * 4)
E ZeroDivisionError: integer division or modulo by zero
E ") is not an instance of <class 'cogent3.app.result.bootstrap_result'>
/<<PKGBUILDDIR>>/.pybuild/cpython3_3.10_cogent3/build/tests/test_app/test_evo.py:858: AssertionError
________________________ TestIo.test_write_db_parallel _________________________
self = <test_io.TestIo testMethod=test_write_db_parallel>
def test_write_db_parallel(self):
"""writing with overwrite in parallel should reset db"""
with TemporaryDirectory(dir=".") as dirname:
outdir = join(dirname, "delme.tinydb")
dstore = io_app.get_data_store(self.basedir, suffix="fasta")
members = dstore.filtered(
callback=lambda x: "brca1.fasta" not in x.split("/")
)
reader = io_app.load_unaligned()
aligner = align_app.align_to_ref()
writer = write_db(outdir, create=True, if_exists="overwrite")
process = reader + aligner + writer
> r = process.apply_to(
members, show_progress=False, parallel=True, cleanup=True
)
/<<PKGBUILDDIR>>/.pybuild/cpython3_3.10_cogent3/build/tests/test_app/test_io.py:523:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/<<PKGBUILDDIR>>/.pybuild/cpython3_3.10_cogent3/build/cogent3/util/progress_display.py:197: in f
result = slow_function(*args, **kw)
/<<PKGBUILDDIR>>/.pybuild/cpython3_3.10_cogent3/build/cogent3/app/composable.py:487: in apply_to
for result in ui.series(to_do, count=len(inputs)):
/<<PKGBUILDDIR>>/.pybuild/cpython3_3.10_cogent3/build/cogent3/util/progress_display.py:123: in series
for (i, item) in enumerate(items):
/<<PKGBUILDDIR>>/.pybuild/cpython3_3.10_cogent3/build/cogent3/util/parallel.py:240: in as_completed
yield from _as_completed_mproc(f, s, max_workers)
/<<PKGBUILDDIR>>/.pybuild/cpython3_3.10_cogent3/build/cogent3/util/parallel.py:225: in _as_completed_mproc
with concurrentfutures.ProcessPoolExecutor(max_workers=max_workers) as executor:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <concurrent.futures.process.ProcessPoolExecutor object at 0x7fd8f1b1c4f0>
max_workers = 0, mp_context = None, initializer = None, initargs = ()
def __init__(self, max_workers=None, mp_context=None,
initializer=None, initargs=()):
"""Initializes a new ProcessPoolExecutor instance.
Args:
max_workers: The maximum number of processes that can be used to
execute the given calls. If None or not given then as many
worker processes will be created as the machine has processors.
mp_context: A multiprocessing context to launch the workers. This
object should provide SimpleQueue, Queue and Process.
initializer: A callable used to initialize worker processes.
initargs: A tuple of arguments to pass to the initializer.
"""
_check_system_limits()
if max_workers is None:
self._max_workers = os.cpu_count() or 1
if sys.platform == 'win32':
self._max_workers = min(_MAX_WINDOWS_WORKERS,
self._max_workers)
else:
if max_workers <= 0:
> raise ValueError("max_workers must be greater than 0")
E ValueError: max_workers must be greater than 0
/usr/lib/python3.10/concurrent/futures/process.py:606: ValueError
------------------------------ Captured log call -------------------------------
INFO root:__init__.py:254 system_details : system=#1 SMP Debian 5.10.140-1 (2022-09-02)
INFO root:__init__.py:255 python : 3.10.7
INFO root:__init__.py:256 user : buildd
INFO root:__init__.py:257 command_string : /usr/lib/python3/dist-packages/pytest/__main__.py -k not test_pickleable_member_roundtrip and not test_pickleable_roundtrip
INFO root:__init__.py:190 composable function : load_unaligned(type='sequences', moltype=None, format='fasta') +
align_to_ref(type='sequences', ref_seq='longest', score_matrix=None,
insertion_penalty=20, extension_penalty=2, moltype='dna') +
write_db(type='output', data_path='./tmpgraqp_7b/delme.tinydb',
name_callback=None, create=True, if_exists='overwrite', suffix='json')
INFO root:__init__.py:190 version : cogent3.app==2022.8.24a1
INFO root:__init__.py:190 version : cogent3==2022.8.24a1
_____________________ ParallelTests.test_create_processes ______________________
self = <tests.test_util.test_parallel.ParallelTests testMethod=test_create_processes>
def test_create_processes(self):
"""Procressor pool should create multiple distingue processes"""
max_worker_count = multiprocessing.cpu_count() - 1
index = list(range(max_worker_count))
> result = parallel.map(get_process_value, index, max_workers=None, use_mpi=False)
/<<PKGBUILDDIR>>/.pybuild/cpython3_3.10_cogent3/build/tests/test_util/test_parallel.py:42:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/<<PKGBUILDDIR>>/.pybuild/cpython3_3.10_cogent3/build/cogent3/util/parallel.py:179: in map
return list(imap(f, s, max_workers, use_mpi, if_serial, chunksize))
/<<PKGBUILDDIR>>/.pybuild/cpython3_3.10_cogent3/build/cogent3/util/parallel.py:169: in imap
chunksize = get_default_chunksize(s, max_workers)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
s = [], max_workers = 0
def get_default_chunksize(s, max_workers):
> chunksize, remainder = divmod(len(s), max_workers * 4)
E ZeroDivisionError: integer division or modulo by zero
/<<PKGBUILDDIR>>/.pybuild/cpython3_3.10_cogent3/build/cogent3/util/parallel.py:90: ZeroDivisionError
_____________________ ParallelTests.test_is_master_process _____________________
self = <tests.test_util.test_parallel.ParallelTests testMethod=test_is_master_process>
@skipIf(sys.version_info[1] < 7, "method exclusive to Python 3.7 and above")
def test_is_master_process(self):
"""
is_master_process() should return False
for all child processes
"""
index = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
master_processes = 0
> for result in parallel.imap(
check_is_master_process, index, max_workers=None, use_mpi=False
):
/<<PKGBUILDDIR>>/.pybuild/cpython3_3.10_cogent3/build/tests/test_util/test_parallel.py:67:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/<<PKGBUILDDIR>>/.pybuild/cpython3_3.10_cogent3/build/cogent3/util/parallel.py:169: in imap
chunksize = get_default_chunksize(s, max_workers)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
s = [1, 2, 3, 4, 5, 6, ...], max_workers = 0
def get_default_chunksize(s, max_workers):
> chunksize, remainder = divmod(len(s), max_workers * 4)
E ZeroDivisionError: integer division or modulo by zero
/<<PKGBUILDDIR>>/.pybuild/cpython3_3.10_cogent3/build/cogent3/util/parallel.py:90: ZeroDivisionError
______________________ ParallelTests.test_random_seeding _______________________
self = <tests.test_util.test_parallel.ParallelTests testMethod=test_random_seeding>
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...)
# thus they cannot be used for reproducibility
index1 = [2, 3, 4, 5, 6, 7, 8, 9, 10]
index2 = [2, 2, 2, 2, 2, 2, 2, 2, 2]
> result1 = parallel.map(get_ranint, index1, max_workers=1, use_mpi=False)
/<<PKGBUILDDIR>>/.pybuild/cpython3_3.10_cogent3/build/tests/test_util/test_parallel.py:54:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/<<PKGBUILDDIR>>/.pybuild/cpython3_3.10_cogent3/build/cogent3/util/parallel.py:179: in map
return list(imap(f, s, max_workers, use_mpi, if_serial, chunksize))
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
f = <function get_ranint at 0x7fd8f37fedd0>, s = [2, 3, 4, 5, 6, 7, ...]
max_workers = 1, use_mpi = False, if_serial = 'raise', chunksize = None
def imap(f, s, max_workers=None, use_mpi=False, if_serial="raise", chunksize=None):
"""
Parameters
----------
f : callable
function that operates on values in s
s : iterable
series of inputs to f
max_workers : int or None
maximum number of workers. Defaults to 1-maximum available.
use_mpi : bool
use MPI for parallel execution.
if_serial : str
action to take if conditions will result in serial execution. Valid
values are 'raise', 'ignore', 'warn'. Defaults to 'raise'.
chunksize : int or None
Size of data chunks executed by worker processes. Defaults to None
where stable chunksize is determined by get_default_chunksize()
Returns
-------
imap and as_completed are generators yielding result of f(s[i]), map returns the result
series. imap and map return results in the same order as s, as_completed returns results
in the order completed (which can differ from the order in s).
Notes
-----
To use MPI, you must have openmpi (use conda or your preferred package manager)
and mpi4py (use pip or conda) installed. In addition, your initial script must
have a ``if __name__ == '__main__':`` block. You then invoke your program using
$ mpiexec -n <number CPUs> python3 -m mpi4py.futures <initial script>
"""
if_serial = if_serial.lower()
assert if_serial in ("ignore", "raise", "warn"), f"invalid choice '{if_serial}'"
# If max_workers is not defined, get number of all processes available
# minus 1 to leave for master process
if use_mpi:
if not USING_MPI:
raise RuntimeError("Cannot use MPI")
if COMM.Get_attr(MPI.UNIVERSE_SIZE) == 1:
err_msg = (
"Execution in serial. For parallel MPI execution, use:\n"
" $ mpiexec -n <number CPUs> python3 -m mpi4py.futures <executable script>"
)
if if_serial == "raise":
raise RuntimeError(err_msg)
elif if_serial == "warn":
warnings.warn(err_msg, UserWarning)
max_workers = max_workers or 1
if max_workers > COMM.Get_attr(MPI.UNIVERSE_SIZE):
warnings.warn(
"max_workers too large, reducing to UNIVERSE_SIZE-1", UserWarning
)
max_workers = min(max_workers, COMM.Get_attr(MPI.UNIVERSE_SIZE) - 1)
if not chunksize:
chunksize = get_default_chunksize(s, max_workers)
with MPIfutures.MPIPoolExecutor(max_workers=max_workers) as executor:
yield from executor.map(f, s, chunksize=chunksize)
else:
if not max_workers:
max_workers = multiprocessing.cpu_count() - 1
> assert max_workers < multiprocessing.cpu_count()
E AssertionError
/<<PKGBUILDDIR>>/.pybuild/cpython3_3.10_cogent3/build/cogent3/util/parallel.py:166: AssertionError
=============================== warnings summary ===============================
cogent3/evolve/coevolution.py:50
cogent3/evolve/coevolution.py:50
/<<PKGBUILDDIR>>/.pybuild/cpython3_3.10_cogent3/build/cogent3/evolve/coevolution.py:50: DeprecationWarning: `np.float` is a deprecated alias for the builtin `float`. To silence this warning, use `float` by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use `np.float64` here.
Deprecated in NumPy 1.20; for more details and guidance: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations
from numpy import (
.pybuild/cpython3_3.10_cogent3/build/tests/test_app/test_data_store.py::TinyDBDataStoreTests::test_db_creation
/<<PKGBUILDDIR>>/.pybuild/cpython3_3.10_cogent3/build/cogent3/app/data_store.py:970: UserWarning: 'tmpp1m3d9ii/data.tinydb' is locked to 1030889, current pid is 1030889.
warn(f"'{self.source}' is locked to {locked_id}, current pid is {pid}.")
.pybuild/cpython3_3.10_cogent3/build/tests/test_app/test_data_store.py::TinyDBDataStoreTests::test_db_creation2
/usr/lib/python3/dist-packages/_pytest/unraisableexception.py:78: PytestUnraisableExceptionWarning: Exception ignored in: <function ReadOnlyTinyDbDataStore.__del__ at 0x7fd8fbb331c0>
Traceback (most recent call last):
File "/<<PKGBUILDDIR>>/.pybuild/cpython3_3.10_cogent3/build/cogent3/app/data_store.py", line 703, in __del__
self.close()
File "/<<PKGBUILDDIR>>/.pybuild/cpython3_3.10_cogent3/build/cogent3/app/data_store.py", line 717, in close
self.unlock()
File "/<<PKGBUILDDIR>>/.pybuild/cpython3_3.10_cogent3/build/cogent3/app/data_store.py", line 743, in unlock
got = self.db.get(query)
File "/<<PKGBUILDDIR>>/.pybuild/cpython3_3.10_cogent3/build/cogent3/app/data_store.py", line 690, in db
self._db = TinyDB(self.source, storage=storage)
File "/usr/lib/python3/dist-packages/tinydb/database.py", line 159, in __init__
self._storage = storage(*args, **kwargs)
File "/usr/lib/python3/dist-packages/tinydb/middlewares.py", line 63, in __call__
self.storage = self._storage_cls(*args, **kwargs)
File "/usr/lib/python3/dist-packages/tinydb/storages.py", line 99, in __init__
touch(path, create_dirs=create_dirs) # Create file if not exists
File "/usr/lib/python3/dist-packages/tinydb/storages.py", line 34, in touch
with open(fname, 'a'):
FileNotFoundError: [Errno 2] No such file or directory: 'tmpchg_ffcc/subdir/data.tinydb'
warnings.warn(pytest.PytestUnraisableExceptionWarning(msg))
.pybuild/cpython3_3.10_cogent3/build/tests/test_app/test_evo.py::TestHypothesisResult::test_alt_hyp_fail_error
/<<PKGBUILDDIR>>/.pybuild/cpython3_3.10_cogent3/build/cogent3/core/sequence.py:1124: UserWarning: Dropped remainder "GA" from end of sequence
warnings.warn(
.pybuild/cpython3_3.10_cogent3/build/tests/test_app/test_io.py::TestIo::test_load_tabular_distance_matrix
/usr/lib/python3/dist-packages/_pytest/unraisableexception.py:78: PytestUnraisableExceptionWarning: Exception ignored in: <function ReadOnlyTinyDbDataStore.__del__ at 0x7fd8fbb331c0>
Traceback (most recent call last):
File "/<<PKGBUILDDIR>>/.pybuild/cpython3_3.10_cogent3/build/cogent3/app/data_store.py", line 703, in __del__
self.close()
File "/<<PKGBUILDDIR>>/.pybuild/cpython3_3.10_cogent3/build/cogent3/app/data_store.py", line 717, in close
self.unlock()
File "/<<PKGBUILDDIR>>/.pybuild/cpython3_3.10_cogent3/build/cogent3/app/data_store.py", line 743, in unlock
got = self.db.get(query)
File "/<<PKGBUILDDIR>>/.pybuild/cpython3_3.10_cogent3/build/cogent3/app/data_store.py", line 690, in db
self._db = TinyDB(self.source, storage=storage)
File "/usr/lib/python3/dist-packages/tinydb/database.py", line 159, in __init__
self._storage = storage(*args, **kwargs)
File "/usr/lib/python3/dist-packages/tinydb/middlewares.py", line 63, in __call__
self.storage = self._storage_cls(*args, **kwargs)
File "/usr/lib/python3/dist-packages/tinydb/storages.py", line 99, in __init__
touch(path, create_dirs=create_dirs) # Create file if not exists
File "/usr/lib/python3/dist-packages/tinydb/storages.py", line 34, in touch
with open(fname, 'a'):
FileNotFoundError: [Errno 2] No such file or directory: '/<<PKGBUILDDIR>>/.pybuild/cpython3_3.10_cogent3/build/tests/tmp_l1onl16/delme.tinydb'
warnings.warn(pytest.PytestUnraisableExceptionWarning(msg))
.pybuild/cpython3_3.10_cogent3/build/tests/test_core/test_alignment.py::AlignmentTests::test_add_seqs_info
/usr/lib/python3/dist-packages/_pytest/unraisableexception.py:78: PytestUnraisableExceptionWarning: Exception ignored in: <function ReadOnlyTinyDbDataStore.__del__ at 0x7fd8fbb331c0>
Traceback (most recent call last):
File "/<<PKGBUILDDIR>>/.pybuild/cpython3_3.10_cogent3/build/cogent3/core/sequence.py", line 824, in __init__
info = InfoClass(info)
File "/<<PKGBUILDDIR>>/.pybuild/cpython3_3.10_cogent3/build/cogent3/core/info.py", line 152, in __init__
temp = dict(*args, **kwargs)
TypeError: 'NoneType' object is not iterable
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/<<PKGBUILDDIR>>/.pybuild/cpython3_3.10_cogent3/build/cogent3/app/data_store.py", line 703, in __del__
self.close()
File "/<<PKGBUILDDIR>>/.pybuild/cpython3_3.10_cogent3/build/cogent3/app/data_store.py", line 717, in close
self.unlock()
File "/<<PKGBUILDDIR>>/.pybuild/cpython3_3.10_cogent3/build/cogent3/app/data_store.py", line 743, in unlock
got = self.db.get(query)
File "/<<PKGBUILDDIR>>/.pybuild/cpython3_3.10_cogent3/build/cogent3/app/data_store.py", line 690, in db
self._db = TinyDB(self.source, storage=storage)
File "/usr/lib/python3/dist-packages/tinydb/database.py", line 159, in __init__
self._storage = storage(*args, **kwargs)
File "/usr/lib/python3/dist-packages/tinydb/middlewares.py", line 63, in __call__
self.storage = self._storage_cls(*args, **kwargs)
File "/usr/lib/python3/dist-packages/tinydb/storages.py", line 99, in __init__
touch(path, create_dirs=create_dirs) # Create file if not exists
File "/usr/lib/python3/dist-packages/tinydb/storages.py", line 34, in touch
with open(fname, 'a'):
FileNotFoundError: [Errno 2] No such file or directory: 'tmpgraqp_7b/delme.tinydb'
warnings.warn(pytest.PytestUnraisableExceptionWarning(msg))
.pybuild/cpython3_3.10_cogent3/build/tests/test_core/test_alignment.py::AlignmentTests::test_init_aln
/usr/lib/python3/dist-packages/numpy/lib/type_check.py:340: VisibleDeprecationWarning: Creating an ndarray from nested sequences exceeding the maximum number of dimensions of 32 is deprecated. If you mean to do this, you must specify 'dtype=object' when creating the ndarray.
type_ = asarray(x).dtype.type
.pybuild/cpython3_3.10_cogent3/build/tests/test_core/test_alignment.py::AlignmentTests::test_init_aln
/usr/lib/python3/dist-packages/numpy/testing/_private/utils.py:380: VisibleDeprecationWarning: Creating an ndarray from nested sequences exceeding the maximum number of dimensions of 32 is deprecated. If you mean to do this, you must specify 'dtype=object' when creating the ndarray.
isdesnat = isnat(desired)
.pybuild/cpython3_3.10_cogent3/build/tests/test_core/test_alignment.py::AlignmentTests::test_init_aln
/usr/lib/python3/dist-packages/numpy/testing/_private/utils.py:110: VisibleDeprecationWarning: Creating an ndarray from nested sequences exceeding the maximum number of dimensions of 32 is deprecated. If you mean to do this, you must specify 'dtype=object' when creating the ndarray.
st = isnan(x)
.pybuild/cpython3_3.10_cogent3/build/tests/test_core/test_core_standalone.py::TestConstructorFunctions::test_load_seq
/<<PKGBUILDDIR>>/.pybuild/cpython3_3.10_cogent3/build/cogent3/core/info.py:208: UserWarning: Keys overwritten by other sequence: source
warn("Keys overwritten by other sequence: " + "".join(overwrites))
.pybuild/cpython3_3.10_cogent3/build/tests/test_evolve/test_likelihood_function.py::LikelihoodFunctionTests::test_get_param_rules_multilocus
.pybuild/cpython3_3.10_cogent3/build/tests/test_util/test_deserialise.py::TestDeserialising::test_deserialise_likelihood_function_multilocus
/<<PKGBUILDDIR>>/.pybuild/cpython3_3.10_cogent3/build/cogent3/evolve/parameter_controller.py:414: UserWarning:
Used mean of 12 mprobs values
.pybuild/cpython3_3.10_cogent3/build/tests/test_evolve/test_likelihood_function.py::LikelihoodFunctionTests::test_make_discrete_markov
/<<PKGBUILDDIR>>/.pybuild/cpython3_3.10_cogent3/build/tests/test_evolve/test_likelihood_function.py:795: UserWarning:
Ignoring tree edge lengths
.pybuild/cpython3_3.10_cogent3/build/tests/test_evolve/test_likelihood_function.py::LikelihoodFunctionTests::test_set_param_rule_adjust_bounds
/<<PKGBUILDDIR>>/.pybuild/cpython3_3.10_cogent3/build/cogent3/evolve/parameter_controller.py:414: UserWarning:
Used mean of 7 beta values
.pybuild/cpython3_3.10_cogent3/build/tests/test_evolve/test_ns_substitution_model.py::NonStatMarkov::test_general_vs_constructed_general
/<<PKGBUILDDIR>>/.pybuild/cpython3_3.10_cogent3/build/cogent3/maths/optimisers.py:189: UserWarning:
Unused arg for local alignment: results
.pybuild/cpython3_3.10_cogent3/build/tests/test_maths/test_stats/test_test.py::StatTests::test_t_two_sample_switch
/usr/lib/python3/dist-packages/numpy/core/_methods.py:262: RuntimeWarning:
Degrees of freedom <= 0 for slice
.pybuild/cpython3_3.10_cogent3/build/tests/test_util/test_misc.py::UtilsTests::test_get_setting_from_environ
/<<PKGBUILDDIR>>/.pybuild/cpython3_3.10_cogent3/build/cogent3/util/misc.py:1008: UserWarning:
could not cast name=blah to type <class 'float'>, skipping
-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
=========================== short test summary info ============================
SKIPPED [1] tests/test_app/test_app_mpi.py:24: Not using MPI
SKIPPED [2] tests/test_app/test_data_store.py:114: broken on linux
SKIPPED [1] tests/test_app/test_data_store.py:189: broken on linux
SKIPPED [4] tests/test_util/test_io.py:320: Do not test in Debian since offline
SKIPPED [1] tests/test_util/test_io.py:361: Do not test in Debian since offline
SKIPPED [1] tests/test_util/test_io.py:378: Do not test in Debian since offline
SKIPPED [1] tests/test_util/test_io.py:388: Do not test in Debian since offline
FAILED tests/test_app/test_evo.py::TestBootstrap::test_bstrap_parallel - Asse...
FAILED tests/test_app/test_io.py::TestIo::test_write_db_parallel - ValueError...
FAILED tests/test_util/test_parallel.py::ParallelTests::test_create_processes
FAILED tests/test_util/test_parallel.py::ParallelTests::test_is_master_process
FAILED tests/test_util/test_parallel.py::ParallelTests::test_random_seeding
= 5 failed, 2692 passed, 11 skipped, 5 deselected, 18 warnings in 127.56s (0:02:07) =
E: pybuild pybuild:379: test: plugin flit failed with: exit code=1: cd /<<PKGBUILDDIR>>/.pybuild/cpython3_3.10_cogent3/build; python3.10 -m pytest -k 'not test_pickleable_member_roundtrip and not test_pickleable_roundtrip'
dh_auto_test: error: pybuild --test -i python{version} -p 3.10 returned exit code 13
make: *** [debian/rules:22: binary-indep] Error 25
dpkg-buildpackage: error: debian/rules binary-indep subprocess returned exit status 2
--------------------------------------------------------------------------------
The above is just how the build ends and I believe it's also the most relevant part.
Note 1: This build log was obtained before the package started to fail with new python3.11.
Note 2: I'm using the bullseye version in Version field because I still have some hope
of making Debian bullseye buildable from source for everybody (before it becomes LTS).
According to the tests I made, it fails 100% of the time on single-CPU systems, so
I think you should be able to reproduce it by setting GRUB_CMDLINE_LINUX="nr_cpus=1"
in /etc/default/grub, but if this is not enough, the offer below still applies.
I took the time to identify the failing tests and created the attached patch,
which worked for me at the time (not tested more recently because of the
problem with python3.11).
---------------------------------------------------------------------------------
About the archive rebuild: The build was made using virtual machines
from Hetzner, with enough memory, enough disk, and either one or two
CPUs, using a reduced chroot with only build-essential packages (plus
debhelper).
If you could not reproduce the bug please contact me privately, as I
am willing to provide ssh access to a virtual machine where the bug is
fully reproducible.
If this is really a bug in one of the build-depends, please use
reassign and affects, so that this is still visible in the BTS web
page for this package.
Thanks.
-------------- next part --------------
diff --git a/tests/test_app/test_evo.py b/tests/test_app/test_evo.py
index 03a98d2..b1d5991 100644
--- a/tests/test_app/test_evo.py
+++ b/tests/test_app/test_evo.py
@@ -1,6 +1,6 @@
from os.path import dirname, join
from tempfile import TemporaryDirectory
-from unittest import TestCase, main
+from unittest import TestCase, main, skip
from unittest.mock import MagicMock
from numpy.testing import assert_allclose, assert_raises
@@ -844,6 +844,7 @@ class TestBootstrap(TestCase):
# correct message being relayed
self.assertTrue("ValueError: '-' at" in result.message)
+ @skip("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")
diff --git a/tests/test_app/test_io.py b/tests/test_app/test_io.py
index 8ff3de6..360229c 100644
--- a/tests/test_app/test_io.py
+++ b/tests/test_app/test_io.py
@@ -6,7 +6,7 @@ import zipfile
from os.path import join
from tempfile import TemporaryDirectory
-from unittest import TestCase, main
+from unittest import TestCase, main, skip
import numpy
@@ -507,6 +507,7 @@ class TestIo(TestCase):
w = io_app.write_db(outdir, create=True, if_exists="skip")
w.data_store.close()
+ @skip("Does not work on single-cpu systems")
def test_write_db_parallel(self):
"""writing with overwrite in parallel should reset db"""
with TemporaryDirectory(dir=".") as dirname:
diff --git a/tests/test_util/test_parallel.py b/tests/test_util/test_parallel.py
index e0fa320..55d904b 100644
--- a/tests/test_util/test_parallel.py
+++ b/tests/test_util/test_parallel.py
@@ -2,7 +2,7 @@ import multiprocessing
import sys
import time
-from unittest import TestCase, main, skipIf
+from unittest import TestCase, main, skipIf, skip
import numpy
@@ -35,6 +35,7 @@ def check_is_master_process(n):
class ParallelTests(TestCase):
+ @skip("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 @@ class ParallelTests(TestCase):
self.assertEqual(sorted(list(result_values)), index)
self.assertEqual(len(set(result_processes)), max_worker_count)
+ @skip("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 @@ class ParallelTests(TestCase):
self.assertEqual(result1[0], result2[0])
self.assertNotEqual(result1, result2)
+ @skip("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):
"""
More information about the Debian-med-packaging
mailing list