New submission from Antoine Pitrou <pit...@free.fr>: It seems socket.getaddrinfo gives wrong results for IPv6 address under py3k:
>>> pprint.pprint(socket.getaddrinfo("www.python.org", 0)) [(2, 1, 6, '', ('82.94.164.162', 0)), (2, 2, 17, '', ('82.94.164.162', 0)), (2, 3, 0, '', ('82.94.164.162', 0)), (10, 1, 6, '', (10, b'\x00\x00\x00\x00\x00\x00 \x01\x08\x88 \x00\x00\r')), (10, 2, 17, '', (10, b'\x00\x00\x00\x00\x00\x00 \x01\x08\x88 \x00\x00\r')), (10, 3, 0, '', (10, b'\x00\x00\x00\x00\x00\x00 \x01\x08\x88 \x00\x00\r'))] The results given by 2.x make much more sense: >>> pprint.pprint(socket.getaddrinfo("www.python.org", 0)) [(2, 1, 6, '', ('82.94.164.162', 0)), (2, 2, 17, '', ('82.94.164.162', 0)), (2, 3, 0, '', ('82.94.164.162', 0)), (10, 1, 6, '', ('2001:888:2000:d::a2', 0, 0, 0)), (10, 2, 17, '', ('2001:888:2000:d::a2', 0, 0, 0)), (10, 3, 0, '', ('2001:888:2000:d::a2', 0, 0, 0))] ---------- messages: 106768 nosy: pitrou priority: high severity: normal status: open title: socket.getaddrinfo returns wrong results for IPv6 addresses type: behavior versions: Python 3.1, Python 3.2 _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue8858> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com