From 3c4bc4266d9cf7772beea15d45370b71eadea860 Mon Sep 17 00:00:00 2001 From: "NODA, Kai" Date: Thu, 15 Feb 2018 00:09:38 +0800 Subject: [PATCH] improve asyncio.AbstractEventLoop.getaddrinfo() (#1867) The signature should match that of socket.getaddrinfo() --- stdlib/3.4/asyncio/events.pyi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stdlib/3.4/asyncio/events.pyi b/stdlib/3.4/asyncio/events.pyi index 6a444ab2a..23b030696 100644 --- a/stdlib/3.4/asyncio/events.pyi +++ b/stdlib/3.4/asyncio/events.pyi @@ -96,7 +96,7 @@ class AbstractEventLoop(metaclass=ABCMeta): @coroutine # TODO the "Tuple[Any, ...]" should be "Union[Tuple[str, int], Tuple[str, int, int, int]]" but that triggers # https://github.com/python/mypy/issues/2509 - def getaddrinfo(self, host: str, port: int, *, + def getaddrinfo(self, host: Optional[str], port: Union[str, int, None], *, family: int = ..., type: int = ..., proto: int = ..., flags: int = ...) -> Generator[Any, None, List[Tuple[int, int, int, str, Tuple[Any, ...]]]]: ... @abstractmethod @coroutine