This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author geoffreyspear
Recipients geoffreyspear, ned.deily
Date 2014-02-12.11:15:39
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1392203739.81.0.0414732954523.issue20605@psf.upfronthosting.co.za>
In-reply-to
Content
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))]
History
Date User Action Args
2014-02-12 11:15:39geoffreyspearsetrecipients: + geoffreyspear, ned.deily
2014-02-12 11:15:39geoffreyspearsetmessageid: <1392203739.81.0.0414732954523.issue20605@psf.upfronthosting.co.za>
2014-02-12 11:15:39geoffreyspearlinkissue20605 messages
2014-02-12 11:15:39geoffreyspearcreate