From: Yury Selivanov Date: Sat, 21 May 2016 20:50:16 +0000 (-0400) Subject: asyncio: Fix BytesWarning (use typed=True in lru_cache for _ipaddr_info) X-Git-Tag: v3.5.2rc1~127 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=f0200e06f0e45714fbe84c46d7b88943c6d1a58b;p=thirdparty%2FPython%2Fcpython.git asyncio: Fix BytesWarning (use typed=True in lru_cache for _ipaddr_info) --- diff --git a/Lib/asyncio/base_events.py b/Lib/asyncio/base_events.py index e5e9394835f7..ac1089ace498 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