[Python-checkins] cpython (3.5): asyncio: Fix BytesWarning (use typed=True in lru_cache for _ipaddr_info)

yury.selivanov python-checkins at python.org
Sat May 21 16:50:39 EDT 2016


https://hg.python.org/cpython/rev/bdfb15aa3ac5
changeset:   101465:bdfb15aa3ac5
branch:      3.5
parent:      101463:55852de7d032
user:        Yury Selivanov <yselivanov at sprymix.com>
date:        Sat May 21 16:50:16 2016 -0400
summary:
  asyncio: Fix BytesWarning (use typed=True in lru_cache for _ipaddr_info)

files:
  Lib/asyncio/base_events.py |  2 +-
  1 files changed, 1 insertions(+), 1 deletions(-)


diff --git a/Lib/asyncio/base_events.py b/Lib/asyncio/base_events.py
--- a/Lib/asyncio/base_events.py
+++ b/Lib/asyncio/base_events.py
@@ -86,7 +86,7 @@
     _SOCKET_TYPE_MASK |= socket.SOCK_CLOEXEC
 
 
- at functools.lru_cache(maxsize=1024)
+ at 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

-- 
Repository URL: https://hg.python.org/cpython


More information about the Python-checkins mailing list