Source: python-cytoolz Version: 0.11.0-2 Severity: serious Tags: ftbfs https://buildd.debian.org/status/logs.php?pkg=python-cytoolz&ver=0.11.0-2%2Bb2
... =================================== FAILURES =================================== ______________________________ test_random_sample ______________________________ def test_random_sample(): alist = list(range(100)) assert list(random_sample(prob=1, seq=alist, random_state=2016)) == alist mk_rsample = lambda rs=1: list(random_sample(prob=0.1, seq=alist, random_state=rs)) rsample1 = mk_rsample() assert rsample1 == mk_rsample() rsample2 = mk_rsample(1984) randobj = Random(1984) assert rsample2 == mk_rsample(randobj) assert rsample1 != rsample2 > assert mk_rsample(object) == mk_rsample(object) cytoolz/tests/test_itertoolz.py:545: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cytoolz/tests/test_itertoolz.py:533: in <lambda> mk_rsample = lambda rs=1: list(random_sample(prob=0.1, cytoolz/itertoolz.pyx:1794: in cytoolz.itertoolz.random_sample.__cinit__ random_state = Random(random_state) /usr/lib/python3.11/random.py:125: in __init__ self.seed(x) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <random.Random object at 0x1400680>, a = <class 'object'>, version = 2 def seed(self, a=None, version=2): """Initialize internal state from a seed. The only supported seed types are None, int, float, str, bytes, and bytearray. None or no argument seeds from current time or from an operating system specific randomness source if available. If *a* is an int, all bits are used. For version 2 (the default), all of the bits are used if *a* is a str, bytes, or bytearray. For version 1 (provided for reproducing random sequences from older versions of Python), the algorithm for str and bytes generates a narrower range of seeds. """ if version == 1 and isinstance(a, (str, bytes)): a = a.decode('latin-1') if isinstance(a, bytes) else a x = ord(a[0]) << 7 if a else 0 for c in map(ord, a): x = ((1000003 * x) ^ c) & 0xFFFFFFFFFFFFFFFF x ^= len(a) a = -2 if x == -1 else x elif version == 2 and isinstance(a, (str, bytes, bytearray)): if isinstance(a, str): a = a.encode() a = int.from_bytes(a + _sha512(a).digest()) elif not isinstance(a, (type(None), int, float, str, bytes, bytearray)): > raise TypeError('The only supported seed types are: None,\n' 'int, float, str, bytes, and bytearray.') E TypeError: The only supported seed types are: None, E int, float, str, bytes, and bytearray. /usr/lib/python3.11/random.py:160: TypeError =============================== warnings summary =============================== cytoolz/compatibility.py:2 /<<PKGBUILDDIR>>/.pybuild/cpython3_3.11_cytoolz/build/cytoolz/compatibility.py:2: DeprecationWarning: The toolz.compatibility module is no longer needed in Python 3 and has been deprecated. Please import these utilities directly from the standard library. This module will be removed in a future release. warnings.warn("The toolz.compatibility module is no longer " .pybuild/cpython3_3.11_cytoolz/build/cytoolz/tests/test_tlz.py::test_tlz /usr/lib/python3.11/importlib/__init__.py:126: DeprecationWarning: The toolz.compatibility module is no longer needed in Python 3 and has been deprecated. Please import these utilities directly from the standard library. This module will be removed in a future release. return _bootstrap._gcd_import(name[level:], package, level) -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info ============================ FAILED cytoolz/tests/test_itertoolz.py::test_random_sample - TypeError: The o... ================== 1 failed, 186 passed, 2 warnings in 1.79s =================== E: pybuild pybuild:379: test: plugin distutils failed with: exit code=1: cd /<<PKGBUILDDIR>>/.pybuild/cpython3_3.11_cytoolz/build; python3.11 -m pytest ...