diff --git a/tests/test_tcp.py b/tests/test_tcp.py index 59c1ae4..2010693 100644 --- a/tests/test_tcp.py +++ b/tests/test_tcp.py @@ -45,7 +45,7 @@ class _TestTCP: try: srv = await asyncio.start_server( handle_client, - '127.0.0.1', 0, + ('127.0.0.1', 'localhost'), 0, family=socket.AF_INET, loop=self.loop) diff --git a/uvloop/loop.pyx b/uvloop/loop.pyx index fa03673..eb1f763 100644 --- a/uvloop/loop.pyx +++ b/uvloop/loop.pyx @@ -779,7 +779,7 @@ cdef class Loop: return self._getaddrinfo(host, port, family, type, proto, flags, 1) @aio_coroutine - async def create_server(self, protocol_factory, str host, int port, + async def create_server(self, protocol_factory, host, int port, *, int family=uv.AF_UNSPEC, int flags=uv.AI_PASSIVE,