Bug#1024079: uvloop FTBFS on IPV6-only buildds

2023-11-16 Thread Dale Richards
As promised, please find attached the updated patch. This patch allows the 
package to build and test successfully on hosts that are IPv4-only, IPv6-only 
or dual-stack.

Best regards,
Dale Richards

ipv6-fix-tests.patch
Description: Binary data


Bug#1024079: uvloop FTBFS on IPV6-only buildds

2023-11-15 Thread Dale Richards
On Monday, 13 November 2023 at 09:13, d...@dalerichards.net 
 wrote:

> The attached patch should make the test agnostic to IP version.

My apologies - in my haste to post I accidentally attached the wrong version of 
the patch, which does not actually work. Please disregard.

In further testing, I've also found that the "correct" version of the patch is 
also imperfect, so I'm working on a more complete patch that will allow uvloop 
to build on IPv6-only hosts. I'll post it as soon as it's ready.

Best regards,
Dale Richards



Bug#1024079: uvloop FTBFS on IPV6-only buildds

2023-11-13 Thread dale
It looks like the test_aiohttp.py test is using hardcoded IPv4 addresses,
causing the test to fail on hosts where no IPv4 interfaces are available.
The attached patch should make the test agnostic to IP version.

Best regards,
Dale Richards




aiohttp-test-IPv6-fix.patch
Description: Binary data


publickey - dale@dalerichards.net - 51198588.asc
Description: application/pgp-keys


signature.asc
Description: OpenPGP digital signature


Bug#1024079: uvloop FTBFS on IPV6-only buildds

2022-11-14 Thread Adrian Bunk
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