You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Function signature is completely wrong. instead of two arguments (name and port) you have to use one argument -- tuple. For ipv4 it would be 2-element tuple (ip and port). For IPv6 it would be 4-element tuple, where the last element is a scope-id. It is essential for Link-local IPv6.
See Python's native socket.getnameinfo().
In [16]: socket.getnameinfo(('fe80::841e:8fff:fea4:4f19', 456, 0, 3), socket.NI_NUMERICHOST|socket.NI_NUMERICSERV)
Out[16]: ('fe80::841e:8fff:fea4:4f19%wlp2s0', '456')
note wlp2s0. It is interface number 3 on my PC.
The text was updated successfully, but these errors were encountered:
Looks like the bug is two fold: the documentation is wrong, because we do take a tuple, and the code is wrong because we only look at the first 2 elements.
https://pycares.readthedocs.io/en/latest/channel.html#pycares.Channel.getnameinfo
Function signature is completely wrong. instead of two arguments (name and port) you have to use one argument -- tuple. For ipv4 it would be 2-element tuple (ip and port). For IPv6 it would be 4-element tuple, where the last element is a scope-id. It is essential for Link-local IPv6.
See Python's native
socket.getnameinfo()
.note
wlp2s0
. It is interface number 3 on my PC.The text was updated successfully, but these errors were encountered: