Source: uvloop
Version: 0.17.0+ds1-2
Severity: serious
Tags: ftbfs
https://buildd.debian.org/status/fetch.php?pkg=uvloop=amd64=0.17.0%2Bds1-2%2Bb1=1668432580=0
...
=== FAILURES ===
_ Test_UV_AioHTTP.test_aiohttp_basic_1 _
self =
req =
timeout = ClientTimeout(total=300, connect=None, sock_read=None,
sock_connect=None)
client_error =
args = (functools.partial(,
loop=), '::1', 38749)
kwargs = {'family': , 'flags':
, 'local_addr': None, 'proto':
6, ...}
async def _wrap_create_connection(
self,
*args: Any,
req: "ClientRequest",
timeout: "ClientTimeout",
client_error: Type[Exception] = ClientConnectorError,
**kwargs: Any,
) -> Tuple[asyncio.Transport, ResponseHandler]:
try:
async with ceil_timeout(timeout.sock_connect):
> return await self._loop.create_connection(*args, **kwargs) #
> type: ignore[return-value] # noqa
/usr/lib/python3/dist-packages/aiohttp/connector.py:980:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> raise exceptions[0]
uvloop/loop.pyx:2039:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> await waiter
E ConnectionRefusedError: [Errno 111] Connection refused
uvloop/loop.pyx:2016: ConnectionRefusedError
The above exception was the direct cause of the following exception:
self =
def test_aiohttp_basic_1(self):
PAYLOAD = 'It Works!' * 1
async def on_request(request):
return aiohttp.web.Response(text=PAYLOAD)
asyncio.set_event_loop(self.loop)
app = aiohttp.web.Application()
app.router.add_get('/', on_request)
runner = aiohttp.web.AppRunner(app)
self.loop.run_until_complete(runner.setup())
site = aiohttp.web.TCPSite(runner, '0.0.0.0', '0')
self.loop.run_until_complete(site.start())
port = site._server.sockets[0].getsockname()[1]
async def test():
# Make sure we're using the correct event loop.
self.assertIs(asyncio.get_event_loop(), self.loop)
for addr in (('localhost', port),
('127.0.0.1', port)):
async with aiohttp.ClientSession() as client:
async with client.get('http://{}:{}'.format(*addr)) as r:
self.assertEqual(r.status, 200)
result = await r.text()
self.assertEqual(result, PAYLOAD)
> self.loop.run_until_complete(test())
tests/test_aiohttp.py:47:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
...
=== short test summary info
FAILED tests/test_aiohttp.py::Test_UV_AioHTTP::test_aiohttp_basic_1 - aiohttp...
FAILED tests/test_aiohttp.py::Test_AIO_AioHTTP::test_aiohttp_basic_1 - aiohtt...
2 failed, 339 passed, 5 skipped, 97 warnings in 58.92s
E: pybuild pybuild:379: test: plugin distutils failed with: exit code=1: cd
/<>/.pybuild/cpython3_3.10_uvloop/build; python3.10 -m pytest -s
tests --ignore=tests/test_pipes.py --ignore=tests/test_sourcecode.py
--ignore=tests/test_sockets.py --ignore=tests/test_tcp.py
--ignore=tests/test_libuv_api.py