New submission from dzyu: I see, in python 2.7, in SocketServer.py the TCPServer implementation is hard-coded to use ipv4, can not handle IPv6 case. it hard-coded set address_family as socket.AF_INET. so when binding IPv6 host, it will throw "gaierror: [Errno -9] Address family for hostname not supported".
The code should to judge the provided host is IPv4 or IPv6, and base on the host type to set address_family as socket.AF_INET or socket.AF_INET6 ---------- components: Library (Lib) messages: 207818 nosy: dazhaoyu priority: normal severity: normal status: open title: Python2.7 socketserver can not listen IPv6 address type: behavior versions: Python 2.7 _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue20215> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com