mirror of https://github.com/python/cpython
asyncio: Fix BytesWarning (use typed=True in lru_cache for _ipaddr_info)
This commit is contained in:
parent
0eb39e7886
commit
f0200e06f0
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue