]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
asyncio: Fix BytesWarning (use typed=True in lru_cache for _ipaddr_info)
authorYury Selivanov <yselivanov@sprymix.com>
Sat, 21 May 2016 20:50:16 +0000 (16:50 -0400)
committerYury Selivanov <yselivanov@sprymix.com>
Sat, 21 May 2016 20:50:16 +0000 (16:50 -0400)
Lib/asyncio/base_events.py

index e5e9394835f7e0007804b2b7c9b9a5965fff27bb..ac1089ace498e63baec260b2c9a981e89ed85cb3 100644 (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