FTBFS 2.0.1+dfsg1-2 DeprecationWarning: There is no current event loop

Bug #1950335 reported by Athos Ribeiro
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
python-werkzeug (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

python-werkzeug fails to build from source for Python 3.10 as per https://launchpadlibrarian.net/567964431/buildlog_ubuntu-jammy-amd64.python-werkzeug_2.0.1+dfsg1-2_BUILDING.txt.gz

=================================== FAILURES ===================================
___________________________ test_local_stack_asyncio ___________________________

    @pytest.mark.skipif(
        sys.version_info < (3, 7),
        reason="Locals are not task local in Python 3.6",
    )
    def test_local_stack_asyncio():
        ls = local.LocalStack()
        ls.push(1)

        async def task():
            ls.push(1)
            assert len(ls._local.stack) == 2

> loop = asyncio.get_event_loop()
E DeprecationWarning: There is no current event loop

tests/test_local.py:121: DeprecationWarning
_______________________________ test_proxy_await _______________________________

    def test_proxy_await():
        async def get():
            return 1

        _, p = _make_proxy(get())

        async def main():
            return await p

> out = asyncio.get_event_loop().run_until_complete(main())
E DeprecationWarning: There is no current event loop

tests/test_local.py:574: DeprecationWarning
_______________________________ test_proxy_aiter _______________________________

    def test_proxy_aiter():
        class Example:
            value = 3

            def __aiter__(self):
                return self

            async def __anext__(self):
                if self.value:
                    self.value -= 1
                    return self.value

                raise StopAsyncIteration

        _, p = _make_proxy(Example())

        async def main():
            out = []

            async for v in p:
                out.append(v)

            return out

> out = asyncio.get_event_loop().run_until_complete(main())
E DeprecationWarning: There is no current event loop

tests/test_local.py:602: DeprecationWarning
_______________________ test_proxy_async_context_manager _______________________

    def test_proxy_async_context_manager():
        class Example:
            value = 2

            async def __aenter__(self):
                self.value += 1
                return self

            async def __aexit__(self, exc_type, exc_val, exc_tb):
                self.value -= 1

        _, p = _make_proxy(Example())

        async def main():
            async with p:
                assert p.value == 3

            assert p.value == 2
            return True

> assert asyncio.get_event_loop().run_until_complete(main())
E DeprecationWarning: There is no current event loop

tests/test_local.py:626: DeprecationWarning
=========================== short test summary info ============================
FAILED tests/test_local.py::test_local_stack_asyncio - DeprecationWarning: Th...
FAILED tests/test_local.py::test_proxy_await - DeprecationWarning: There is n...
FAILED tests/test_local.py::test_proxy_aiter - DeprecationWarning: There is n...
FAILED tests/test_local.py::test_proxy_async_context_manager - DeprecationWar...
=========== 4 failed, 757 passed, 1 skipped, 39 deselected in 6.44s ============

Tags: ftbfs
Revision history for this message
Athos Ribeiro (athos-ribeiro) wrote :
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package python-werkzeug - 2.0.2+dfsg1-1

---------------
python-werkzeug (2.0.2+dfsg1-1) unstable; urgency=medium

  * Team upload.
  * Update to new upstream release 2.0.2
  * Remove upstreamed Python 3.10 patch
  * Get all tests working again

 -- Scott Talbert <email address hidden> Thu, 11 Nov 2021 20:52:03 -0500

Changed in python-werkzeug (Ubuntu):
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.