From f0200e06f0e45714fbe84c46d7b88943c6d1a58b Mon Sep 17 00:00:00 2001 From: Yury Selivanov Date: Sat, 21 May 2016 16:50:16 -0400 Subject: asyncio: Fix BytesWarning (use typed=True in lru_cache for _ipaddr_info) --- Lib/asyncio/base_events.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Lib/asyncio/base_events.py b/Lib/asyncio/base_events.py index e5e9394..ac1089a 100644 --- a/Lib/asyncio/base_events.py +++ b/Lib/asyncio/base_events.py @@ -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 -- cgit v0.12