asyncio: Fix BytesWarning (use typed=True in lru_cache for _ipaddr_info)

This commit is contained in:
Yury Selivanov 2016-05-21 16:50:16 -04:00
parent 0eb39e7886
commit f0200e06f0
1 changed files with 1 additions and 1 deletions

View File

@ -86,7 +86,7 @@ if hasattr(socket, 'SOCK_CLOEXEC'):
_SOCKET_TYPE_MASK |= socket.SOCK_CLOEXEC
@functools.lru_cache(maxsize=1024)
@functools.lru_cache(maxsize=1024, typed=True)
def _ipaddr_info(host, port, family, type, proto):
# Try to skip getaddrinfo if "host" is already an IP. Since getaddrinfo
# blocks on an exclusive lock on some platforms, users might handle name