Source: python-aiojobs
Version: 1.1.0-2
Severity: serious
Justification: FTBFS
Tags: trixie sid ftbfs
User: [email protected]
Usertags: ftbfs-20240115 ftbfs-trixie
Hi,
During a rebuild of all packages in sid, your package failed to build
on amd64.
Relevant part (hopefully):
> make[1]: Entering directory '/<<PKGBUILDDIR>>'
> pytest tests
> ============================= test session starts
> ==============================
> platform linux -- Python 3.11.7, pytest-7.4.4, pluggy-1.3.0
> rootdir: /<<PKGBUILDDIR>>
> configfile: setup.cfg
> plugins: cov-4.1.0, asyncio-0.20.3, aiohttp-1.0.5
> asyncio: mode=Mode.AUTO
> collected 47 items
>
> tests/test_aiohttp.py F.FFException ignored in: <coroutine object
> Scheduler._wait_failed at 0x7f26d3a204a0>
> Traceback (most recent call last):
> File "/<<PKGBUILDDIR>>/aiojobs/_scheduler.py", line 156, in _wait_failed
> task = await self._failed_tasks.get()
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> File "/usr/lib/python3.11/asyncio/queues.py", line 160, in get
> getter.cancel() # Just in case getter is not done yet.
> ^^^^^^^^^^^^^^^
> File "/usr/lib/python3.11/asyncio/base_events.py", line 761, in call_soon
> self._check_closed()
> File "/usr/lib/python3.11/asyncio/base_events.py", line 519, in
> _check_closed
> raise RuntimeError('Event loop is closed')
> RuntimeError: Event loop is closed
> Exception ignored in: <coroutine object Scheduler._wait_failed at
> 0x7f26d396c3c0>
> Traceback (most recent call last):
> File "/<<PKGBUILDDIR>>/aiojobs/_scheduler.py", line 156, in _wait_failed
> task = await self._failed_tasks.get()
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> File "/usr/lib/python3.11/asyncio/queues.py", line 160, in get
> getter.cancel() # Just in case getter is not done yet.
> ^^^^^^^^^^^^^^^
> File "/usr/lib/python3.11/asyncio/base_events.py", line 761, in call_soon
> self._check_closed()
> File "/usr/lib/python3.11/asyncio/base_events.py", line 519, in
> _check_closed
> raise RuntimeError('Event loop is closed')
> RuntimeError: Event loop is closed
> Exception ignored in: <coroutine object Scheduler._wait_failed at
> 0x7f26d396d380>
> Traceback (most recent call last):
> File "/<<PKGBUILDDIR>>/aiojobs/_scheduler.py", line 156, in _wait_failed
> task = await self._failed_tasks.get()
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> File "/usr/lib/python3.11/asyncio/queues.py", line 160, in get
> getter.cancel() # Just in case getter is not done yet.
> ^^^^^^^^^^^^^^^
> File "/usr/lib/python3.11/asyncio/base_events.py", line 761, in call_soon
> self._check_closed()
> File "/usr/lib/python3.11/asyncio/base_events.py", line 519, in
> _check_closed
> raise RuntimeError('Event loop is closed')
> RuntimeError: Event loop is closed
> FF. [ 14%]
> tests/test_job.py ................ [
> 48%]
> tests/test_scheduler.py ........................
> [100%]/usr/lib/python3.11/tokenize.py:529: RuntimeWarning: coroutine
> 'Scheduler._wait_failed' was never awaited
> pseudomatch = _compile(PseudoToken).match(line, pos)
> RuntimeWarning: Enable tracemalloc to get the object allocation traceback
>
>
> =================================== FAILURES
> ===================================
> _________________________________ test_plugin
> __________________________________
>
> aiohttp_client = <function aiohttp_client.<locals>.go at 0x7f26d38779c0>
>
> async def test_plugin(aiohttp_client: _Client) -> None:
> job = None
>
> async def coro() -> None:
> await asyncio.sleep(10)
>
> async def handler(request: web.Request) -> web.Response:
> nonlocal job
>
> job = await spawn(request, coro())
> assert not job.closed
> return web.Response()
>
> app = web.Application()
> app.router.add_get("/", handler)
> aiojobs_setup(app)
>
> > client = await aiohttp_client(app)
>
> tests/test_aiohttp.py:40:
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> _
> /usr/lib/python3/dist-packages/pytest_aiohttp/plugin.py:165: in go
> await client.start_server()
> /usr/lib/python3/dist-packages/aiohttp/test_utils.py:287: in start_server
> await self._server.start_server(loop=self._loop)
> /usr/lib/python3/dist-packages/aiohttp/test_utils.py:121: in start_server
> await self.runner.setup()
> /usr/lib/python3/dist-packages/aiohttp/web_runner.py:295: in setup
> self._server = await self._make_server()
> /usr/lib/python3/dist-packages/aiohttp/web_runner.py:400: in _make_server
> await self._app.startup()
> /usr/lib/python3/dist-packages/aiohttp/web_app.py:456: in startup
> await self.on_startup.send(self)
> /usr/lib/python3/dist-packages/aiosignal/__init__.py:36: in send
> await receiver(*args, **kwargs) # type: ignore
> /usr/lib/python3/dist-packages/aiohttp/web_app.py:578: in _on_startup
> await it.__anext__()
> aiojobs/aiohttp.py:65: in cleanup_context
> app["AIOJOBS_SCHEDULER"] = scheduler = Scheduler(**kwargs)
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> _
>
> self = <Application 0x7f26d379e210>, key = 'AIOJOBS_SCHEDULER'
> value = <Scheduler jobs=0>
>
> def __setitem__(self, key: Union[str, AppKey[_T]], value: Any) -> None:
> self._check_frozen()
> if not isinstance(key, AppKey):
> > warnings.warn(
> "It is recommended to use web.AppKey instances for keys.\n"
> + "https://docs.aiohttp.org/en/stable/web_advanced.html"
> + "#application-s-config",
> category=NotAppKeyWarning,
> stacklevel=2,
> )
> E aiohttp.web_exceptions.NotAppKeyWarning: It is recommended to use
> web.AppKey instances for keys.
> E
> https://docs.aiohttp.org/en/stable/web_advanced.html#application-s-config
>
> /usr/lib/python3/dist-packages/aiohttp/web_app.py:215: NotAppKeyWarning
> _________________________________ test_atomic
> __________________________________
>
> aiohttp_client = <function aiohttp_client.<locals>.go at 0x7f26d39ec680>
>
> async def test_atomic(aiohttp_client: _Client) -> None:
> @atomic
> async def handler(request: web.Request) -> web.Response:
> await asyncio.sleep(0)
> return web.Response()
>
> app = web.Application()
> app.router.add_get("/", handler)
> aiojobs_setup(app)
>
> > client = await aiohttp_client(app)
>
> tests/test_aiohttp.py:74:
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> _
> /usr/lib/python3/dist-packages/pytest_aiohttp/plugin.py:165: in go
> await client.start_server()
> /usr/lib/python3/dist-packages/aiohttp/test_utils.py:287: in start_server
> await self._server.start_server(loop=self._loop)
> /usr/lib/python3/dist-packages/aiohttp/test_utils.py:121: in start_server
> await self.runner.setup()
> /usr/lib/python3/dist-packages/aiohttp/web_runner.py:295: in setup
> self._server = await self._make_server()
> /usr/lib/python3/dist-packages/aiohttp/web_runner.py:400: in _make_server
> await self._app.startup()
> /usr/lib/python3/dist-packages/aiohttp/web_app.py:456: in startup
> await self.on_startup.send(self)
> /usr/lib/python3/dist-packages/aiosignal/__init__.py:36: in send
> await receiver(*args, **kwargs) # type: ignore
> /usr/lib/python3/dist-packages/aiohttp/web_app.py:578: in _on_startup
> await it.__anext__()
> aiojobs/aiohttp.py:65: in cleanup_context
> app["AIOJOBS_SCHEDULER"] = scheduler = Scheduler(**kwargs)
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> _
>
> self = <Application 0x7f26d3a08b90>, key = 'AIOJOBS_SCHEDULER'
> value = <Scheduler jobs=0>
>
> def __setitem__(self, key: Union[str, AppKey[_T]], value: Any) -> None:
> self._check_frozen()
> if not isinstance(key, AppKey):
> > warnings.warn(
> "It is recommended to use web.AppKey instances for keys.\n"
> + "https://docs.aiohttp.org/en/stable/web_advanced.html"
> + "#application-s-config",
> category=NotAppKeyWarning,
> stacklevel=2,
> )
> E aiohttp.web_exceptions.NotAppKeyWarning: It is recommended to use
> web.AppKey instances for keys.
> E
> https://docs.aiohttp.org/en/stable/web_advanced.html#application-s-config
>
> /usr/lib/python3/dist-packages/aiohttp/web_app.py:215: NotAppKeyWarning
> ____________________________ test_atomic_from_view
> _____________________________
>
> aiohttp_client = <function aiohttp_client.<locals>.go at 0x7f26d39eefc0>
>
> async def test_atomic_from_view(aiohttp_client: _Client) -> None:
> app = web.Application()
>
> class MyView(web.View):
> @atomic
> async def get(self) -> web.Response:
> return web.Response(text=self.request.method)
>
> app.router.add_route("*", "/", MyView)
> aiojobs_setup(app)
>
> > client = await aiohttp_client(app)
>
> tests/test_aiohttp.py:96:
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> _
> /usr/lib/python3/dist-packages/pytest_aiohttp/plugin.py:165: in go
> await client.start_server()
> /usr/lib/python3/dist-packages/aiohttp/test_utils.py:287: in start_server
> await self._server.start_server(loop=self._loop)
> /usr/lib/python3/dist-packages/aiohttp/test_utils.py:121: in start_server
> await self.runner.setup()
> /usr/lib/python3/dist-packages/aiohttp/web_runner.py:295: in setup
> self._server = await self._make_server()
> /usr/lib/python3/dist-packages/aiohttp/web_runner.py:400: in _make_server
> await self._app.startup()
> /usr/lib/python3/dist-packages/aiohttp/web_app.py:456: in startup
> await self.on_startup.send(self)
> /usr/lib/python3/dist-packages/aiosignal/__init__.py:36: in send
> await receiver(*args, **kwargs) # type: ignore
> /usr/lib/python3/dist-packages/aiohttp/web_app.py:578: in _on_startup
> await it.__anext__()
> aiojobs/aiohttp.py:65: in cleanup_context
> app["AIOJOBS_SCHEDULER"] = scheduler = Scheduler(**kwargs)
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> _
>
> self = <Application 0x7f26d385b7d0>, key = 'AIOJOBS_SCHEDULER'
> value = <Scheduler jobs=0>
>
> def __setitem__(self, key: Union[str, AppKey[_T]], value: Any) -> None:
> self._check_frozen()
> if not isinstance(key, AppKey):
> > warnings.warn(
> "It is recommended to use web.AppKey instances for keys.\n"
> + "https://docs.aiohttp.org/en/stable/web_advanced.html"
> + "#application-s-config",
> category=NotAppKeyWarning,
> stacklevel=2,
> )
> E aiohttp.web_exceptions.NotAppKeyWarning: It is recommended to use
> web.AppKey instances for keys.
> E
> https://docs.aiohttp.org/en/stable/web_advanced.html#application-s-config
>
> /usr/lib/python3/dist-packages/aiohttp/web_app.py:215: NotAppKeyWarning
> ___________________________ test_nested_application
> ____________________________
>
> aiohttp_client = <function aiohttp_client.<locals>.go at 0x7f26d39ef4c0>
>
> async def test_nested_application(aiohttp_client: _Client) -> None:
> app = web.Application()
> aiojobs_setup(app)
>
> app2 = web.Application()
>
> class MyView(web.View):
> async def get(self) -> web.Response:
> assert get_scheduler_from_request(self.request) ==
> get_scheduler_from_app(
> app
> )
> return web.Response()
>
> app2.router.add_route("*", "/", MyView)
> app.add_subapp("/sub/", app2)
>
> > client = await aiohttp_client(app)
>
> tests/test_aiohttp.py:124:
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> _
> /usr/lib/python3/dist-packages/pytest_aiohttp/plugin.py:165: in go
> await client.start_server()
> /usr/lib/python3/dist-packages/aiohttp/test_utils.py:287: in start_server
> await self._server.start_server(loop=self._loop)
> /usr/lib/python3/dist-packages/aiohttp/test_utils.py:121: in start_server
> await self.runner.setup()
> /usr/lib/python3/dist-packages/aiohttp/web_runner.py:295: in setup
> self._server = await self._make_server()
> /usr/lib/python3/dist-packages/aiohttp/web_runner.py:400: in _make_server
> await self._app.startup()
> /usr/lib/python3/dist-packages/aiohttp/web_app.py:456: in startup
> await self.on_startup.send(self)
> /usr/lib/python3/dist-packages/aiosignal/__init__.py:36: in send
> await receiver(*args, **kwargs) # type: ignore
> /usr/lib/python3/dist-packages/aiohttp/web_app.py:578: in _on_startup
> await it.__anext__()
> aiojobs/aiohttp.py:65: in cleanup_context
> app["AIOJOBS_SCHEDULER"] = scheduler = Scheduler(**kwargs)
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> _
>
> self = <Application 0x7f26d37d2a50>, key = 'AIOJOBS_SCHEDULER'
> value = <Scheduler jobs=0>
>
> def __setitem__(self, key: Union[str, AppKey[_T]], value: Any) -> None:
> self._check_frozen()
> if not isinstance(key, AppKey):
> > warnings.warn(
> "It is recommended to use web.AppKey instances for keys.\n"
> + "https://docs.aiohttp.org/en/stable/web_advanced.html"
> + "#application-s-config",
> category=NotAppKeyWarning,
> stacklevel=2,
> )
> E aiohttp.web_exceptions.NotAppKeyWarning: It is recommended to use
> web.AppKey instances for keys.
> E
> https://docs.aiohttp.org/en/stable/web_advanced.html#application-s-config
>
> /usr/lib/python3/dist-packages/aiohttp/web_app.py:215: NotAppKeyWarning
> __________________ test_nested_application_separate_scheduler
> __________________
>
> aiohttp_client = <function aiohttp_client.<locals>.go at 0x7f26d39eec00>
>
> async def test_nested_application_separate_scheduler(aiohttp_client:
> _Client) -> None:
> app = web.Application()
> aiojobs_setup(app)
>
> app2 = web.Application()
> aiojobs_setup(app2)
>
> class MyView(web.View):
> async def get(self) -> web.Response:
> assert get_scheduler_from_request(self.request) !=
> get_scheduler_from_app(
> app
> )
> assert get_scheduler_from_request(self.request) ==
> get_scheduler_from_app(
> app2
> )
> return web.Response()
>
> app2.router.add_route("*", "/", MyView)
> app.add_subapp("/sub/", app2)
>
> > client = await aiohttp_client(app)
>
> tests/test_aiohttp.py:149:
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> _
> /usr/lib/python3/dist-packages/pytest_aiohttp/plugin.py:165: in go
> await client.start_server()
> /usr/lib/python3/dist-packages/aiohttp/test_utils.py:287: in start_server
> await self._server.start_server(loop=self._loop)
> /usr/lib/python3/dist-packages/aiohttp/test_utils.py:121: in start_server
> await self.runner.setup()
> /usr/lib/python3/dist-packages/aiohttp/web_runner.py:295: in setup
> self._server = await self._make_server()
> /usr/lib/python3/dist-packages/aiohttp/web_runner.py:400: in _make_server
> await self._app.startup()
> /usr/lib/python3/dist-packages/aiohttp/web_app.py:456: in startup
> await self.on_startup.send(self)
> /usr/lib/python3/dist-packages/aiosignal/__init__.py:36: in send
> await receiver(*args, **kwargs) # type: ignore
> /usr/lib/python3/dist-packages/aiohttp/web_app.py:578: in _on_startup
> await it.__anext__()
> aiojobs/aiohttp.py:65: in cleanup_context
> app["AIOJOBS_SCHEDULER"] = scheduler = Scheduler(**kwargs)
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> _
>
> self = <Application 0x7f26d394c4d0>, key = 'AIOJOBS_SCHEDULER'
> value = <Scheduler jobs=0>
>
> def __setitem__(self, key: Union[str, AppKey[_T]], value: Any) -> None:
> self._check_frozen()
> if not isinstance(key, AppKey):
> > warnings.warn(
> "It is recommended to use web.AppKey instances for keys.\n"
> + "https://docs.aiohttp.org/en/stable/web_advanced.html"
> + "#application-s-config",
> category=NotAppKeyWarning,
> stacklevel=2,
> )
> E aiohttp.web_exceptions.NotAppKeyWarning: It is recommended to use
> web.AppKey instances for keys.
> E
> https://docs.aiohttp.org/en/stable/web_advanced.html#application-s-config
>
> /usr/lib/python3/dist-packages/aiohttp/web_app.py:215: NotAppKeyWarning
>
> ---------- coverage: platform linux, python 3.11.7-final-0 -----------
> Name Stmts Miss Cover
> ---------------------------------------------
> aiojobs/__init__.py 11 4 64%
> aiojobs/_job.py 113 3 97%
> aiojobs/_scheduler.py 106 1 99%
> aiojobs/aiohttp.py 34 10 71%
> tests/__init__.py 0 0 100%
> tests/conftest.py 19 0 100%
> tests/test_aiohttp.py 105 35 67%
> tests/test_job.py 193 17 91%
> tests/test_scheduler.py 292 9 97%
> ---------------------------------------------
> TOTAL 873 79 91%
>
> =========================== short test summary info
> ============================
> FAILED tests/test_aiohttp.py::test_plugin -
> aiohttp.web_exceptions.NotAppKeyW...
> FAILED tests/test_aiohttp.py::test_atomic -
> aiohttp.web_exceptions.NotAppKeyW...
> FAILED tests/test_aiohttp.py::test_atomic_from_view -
> aiohttp.web_exceptions....
> FAILED tests/test_aiohttp.py::test_nested_application -
> aiohttp.web_exception...
> FAILED tests/test_aiohttp.py::test_nested_application_separate_scheduler -
> ai...
> ========================= 5 failed, 42 passed in 2.36s
> =========================
> Unclosed client session
> client_session: <aiohttp.client.ClientSession object at 0x7f26d37d0090>
> Task was destroyed but it is pending!
> task: <Task pending name='Task-24' coro=<Scheduler._wait_failed() running at
> /<<PKGBUILDDIR>>/aiojobs/_scheduler.py:156> wait_for=<Future pending
> cb=[Task.task_wakeup()]>>
> Exception ignored in: <coroutine object Scheduler._wait_failed at
> 0x7f26d396eb20>
> Traceback (most recent call last):
> File "/<<PKGBUILDDIR>>/aiojobs/_scheduler.py", line 156, in _wait_failed
> task = await self._failed_tasks.get()
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> File "/usr/lib/python3.11/asyncio/queues.py", line 160, in get
> getter.cancel() # Just in case getter is not done yet.
> ^^^^^^^^^^^^^^^
> File "/usr/lib/python3.11/asyncio/base_events.py", line 761, in call_soon
> self._check_closed()
> File "/usr/lib/python3.11/asyncio/base_events.py", line 519, in
> _check_closed
> raise RuntimeError('Event loop is closed')
> RuntimeError: Event loop is closed
> Unclosed client session
> client_session: <aiohttp.client.ClientSession object at 0x7f26d394d310>
> Task was destroyed but it is pending!
> task: <Task pending name='Task-28' coro=<Scheduler._wait_failed() running at
> /<<PKGBUILDDIR>>/aiojobs/_scheduler.py:156> wait_for=<Future pending
> cb=[Task.task_wakeup()]>>
> Exception ignored in: <coroutine object Scheduler._wait_failed at
> 0x7f26d3a203c0>
> Traceback (most recent call last):
> File "/<<PKGBUILDDIR>>/aiojobs/_scheduler.py", line 156, in _wait_failed
> task = await self._failed_tasks.get()
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> File "/usr/lib/python3.11/asyncio/queues.py", line 160, in get
> getter.cancel() # Just in case getter is not done yet.
> ^^^^^^^^^^^^^^^
> File "/usr/lib/python3.11/asyncio/base_events.py", line 761, in call_soon
> self._check_closed()
> File "/usr/lib/python3.11/asyncio/base_events.py", line 519, in
> _check_closed
> raise RuntimeError('Event loop is closed')
> RuntimeError: Event loop is closed
> make[1]: *** [debian/rules:7: override_dh_auto_test] Error 1
The full build log is available from:
http://qa-logs.debian.net/2024/01/15/python-aiojobs_1.1.0-2_unstable.log
All bugs filed during this archive rebuild are listed at:
https://bugs.debian.org/cgi-bin/pkgreport.cgi?tag=ftbfs-20240115;[email protected]
or:
https://udd.debian.org/bugs/?release=na&merged=ign&fnewerval=7&flastmodval=7&fusertag=only&fusertagtag=ftbfs-20240115&[email protected]&allbugs=1&cseverity=1&ctags=1&caffected=1#results
A list of current common problems and possible solutions is available at
http://wiki.debian.org/qa.debian.org/FTBFS . You're welcome to contribute!
If you reassign this bug to another package, please mark it as 'affects'-ing
this package. See https://www.debian.org/Bugs/server-control#affects
If you fail to reproduce this, please provide a build log and diff it with mine
so that we can identify if something relevant changed in the meantime.