diff --git a/stdlib/3/asyncio/base_events.pyi b/stdlib/3/asyncio/base_events.pyi index 2262a67f8..31023abf1 100644 --- a/stdlib/3/asyncio/base_events.pyi +++ b/stdlib/3/asyncio/base_events.pyi @@ -1,5 +1,5 @@ import selectors -from socket import socket +from socket import socket, _Address import ssl import sys from typing import Any, Awaitable, Callable, Dict, Generator, List, Optional, Sequence, Tuple, TypeVar, Union, overload @@ -123,7 +123,7 @@ class BaseEventLoop(AbstractEventLoop): @coroutine def sock_sendall(self, sock: socket, data: bytes) -> Generator[Any, None, None]: ... @coroutine - def sock_connect(self, sock: socket, address: str) -> Generator[Any, None, None]: ... + def sock_connect(self, sock: socket, address: _Address) -> Generator[Any, None, None]: ... @coroutine def sock_accept(self, sock: socket) -> Generator[Any, None, Tuple[socket, Any]]: ... # Signal handling. diff --git a/stdlib/3/asyncio/events.pyi b/stdlib/3/asyncio/events.pyi index c81d027ef..3dbd60944 100644 --- a/stdlib/3/asyncio/events.pyi +++ b/stdlib/3/asyncio/events.pyi @@ -1,5 +1,5 @@ import selectors -from socket import socket +from socket import socket, _Address import ssl import sys from typing import Any, Awaitable, Callable, Dict, Generator, List, Optional, Sequence, Tuple, TypeVar, Union, overload @@ -185,7 +185,7 @@ class AbstractEventLoop(metaclass=ABCMeta): def sock_sendall(self, sock: socket, data: bytes) -> Generator[Any, None, None]: ... @abstractmethod @coroutine - def sock_connect(self, sock: socket, address: str) -> Generator[Any, None, None]: ... + def sock_connect(self, sock: socket, address: _Address) -> Generator[Any, None, None]: ... @abstractmethod @coroutine def sock_accept(self, sock: socket) -> Generator[Any, None, Tuple[socket, Any]]: ...