mirror of
https://github.com/python/cpython.git
synced 2025-07-24 11:44:31 +00:00
asyncio: Fix BytesWarning (use typed=True in lru_cache for _ipaddr_info)
This commit is contained in:
parent
0eb39e7886
commit
f0200e06f0
1 changed files with 1 additions and 1 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue