[issue20605] test_socket (testGetaddrinfo) failing on OS X 10.6.8 (32-bit)

Geoffrey Spear report at bugs.python.org
Wed Feb 12 12:15:39 CET 2014


Geoffrey Spear added the comment:

Ned:

>>> socket.gethostbyname("localhost")
'127.0.0.1'

>>> socket.getaddrinfo("localhost", "00", 0, 0, 0, socket.AI_NUMERICSERV)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python3.4/socket.py", line 530, in getaddrinfo
    for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
socket.gaierror: [Errno 8] nodename nor servname provided, or not known


And to show that using AI_NUMERICSERV isn't *completely* broken on my machine:

>>> socket.getaddrinfo("localhost", "80", 0, 0, 0, socket.AI_NUMERICSERV)
[(<AddressFamily.AF_INET: 2>, <SocketType.SOCK_DGRAM: 2>, 17, '', ('127.0.0.1', 80)), (<AddressFamily.AF_INET: 2>, <SocketType.SOCK_STREAM: 1>, 6, '', ('127.0.0.1', 80)), (<AddressFamily.AF_INET6: 30>, <SocketType.SOCK_DGRAM: 2>, 17, '', ('::1', 80, 0, 0)), (<AddressFamily.AF_INET6: 30>, <SocketType.SOCK_STREAM: 1>, 6, '', ('::1', 80, 0, 0)), (<AddressFamily.AF_INET6: 30>, <SocketType.SOCK_DGRAM: 2>, 17, '', ('fe80::1%lo0', 80, 0, 1)), (<AddressFamily.AF_INET6: 30>, <SocketType.SOCK_STREAM: 1>, 6, '', ('fe80::1%lo0', 80, 0, 1))]

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue20605>
_______________________________________


More information about the Python-bugs-list mailing list