Package: src:pyzmq
Version: 17.1.2-3
Severity: serious
Tags: sid bullseye patch
User: debian-pyt...@lists.debian.org
Usertags: python3.8

pyzmq ftbfs in unstable, needing a patch from 18.1.  Please could you also relax
some timing conditions for tests seen on non-amd64 architectures?

patches at
https://patches.ubuntu.com/p/pyzmq/pyzmq_17.1.2-3ubuntu5.patch

[..]
=================================== FAILURES ===================================
__________________ TestAsyncIOSocket.test_recv_json_cancelled __________________

self = <zmq.tests.asyncio._test_asyncio.TestAsyncIOSocket
testMethod=test_recv_json_cancelled>

    def test_recv_json_cancelled(self):
        @asyncio.coroutine
        def test():
            a, b = self.create_bound_pair(zmq.PUSH, zmq.PULL)
            f = b.recv_json()
            assert not f.done()
            f.cancel()
            # cycle eventloop to allow cancel events to fire
            yield from asyncio.sleep(0)
            obj = dict(a=5)
            yield from a.send_json(obj)
            with pytest.raises(CancelledError):
                recvd = yield from f
            assert f.done()
            # give it a chance to incorrectly consume the event
            events = yield from b.poll(timeout=5)
            assert events
            yield from asyncio.sleep(0)
            # make sure cancelled recv didn't eat up event
            f = b.recv_json()
            recvd = yield from asyncio.wait_for(f, timeout=5)
            assert recvd == obj
>       self.loop.run_until_complete(test())

zmq/tests/asyncio/_test_asyncio.py:152:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <_UnixSelectorEventLoop running=False closed=True debug=False>
future = <Task cancelled name='Task-10'
coro=<TestAsyncIOSocket.test_recv_json_cancelled.<locals>.test() done, defined
at
/<<PKGBUILDDIR>>/.pybuild/cpython3_3.8/build/zmq/tests/asyncio/_test_asyncio.py:131>>

    def run_until_complete(self, future):
        """Run until the Future is done.

        If the argument is a coroutine, it is wrapped in a Task.

        WARNING: It would be disastrous to call run_until_complete()
        with the same coroutine twice -- it would wrap it in two
        different Tasks and that can't be good.

        Return the Future's result, or raise its exception.
        """
        self._check_closed()

        new_task = not futures.isfuture(future)
        future = tasks.ensure_future(future, loop=self)
        if new_task:
            # An exception is raised if the future didn't complete, so there
            # is no need to log the "destroy pending task" message
            future._log_destroy_pending = False

        future.add_done_callback(_run_until_complete_cb)
        try:
            self.run_forever()
        except:
            if new_task and future.done() and not future.cancelled():
                # The coroutine raised a BaseException. Consume the exception
                # to not log a warning, the caller doesn't have access to the
                # local task.
                future.exception()
            raise
        finally:
            future.remove_done_callback(_run_until_complete_cb)
        if not future.done():
            raise RuntimeError('Event loop stopped before Future completed.')

>       return future.result()
E       asyncio.exceptions.CancelledError
[..]
======== 1 failed, 232 passed, 11 skipped, 88 warnings in 33.62 seconds ========
Task was destroyed but it is pending!
task: <Task pending name='Task-40' coro=<AsyncioAuthenticator.__handle_zap()
done, defined at
/<<PKGBUILDDIR>>/.pybuild/cpython3_3.8/build/zmq/auth/asyncio/__init__.py:25>
wait_for=<Future cancelled>>
E: pybuild pybuild:341: test: plugin distutils failed with: exit code=1: cd
/<<PKGBUILDDIR>>/.pybuild/cpython3_3.8/build; python3.8 -m pytest -v
--ignore=zmq/tests/test_auth.py --ignore=zmq/tests/test_security.py
dh_auto_test: pybuild --test --test-pytest -i python{version} -p "3.8 3.7"
--test-pytest returned exit code 13
make[1]: *** [debian/rules:42: override_dh_auto_test] Error 255

Reply via email to