Gregory P. Smith added the comment: TL;DR - We really need reliable tests for the exact behavior we want before coming up with patches.
attached is a patch (-gps01) that would do the same thing as Lib/smtpd.py does... But I'm not convinced it is a good idea. Would forcing a socket.getaddrinfo() call from the constructor cause problems? This would be new behavior over what TCPServer did in the past. Could it trigger a blocking reverse DNS lookup where there wasn't one in the past? What about when server_address[0] is ''? getaddrinfo() fails on that, but the existing code works and binds to 0.0.0.0. Presumably this should bind via AF_INET6 if the host supports it but a simple getaddrinfo() call doesn't tell us that. ---------- title: socketserver can not listen IPv6 address -> socketserver.TCPServer can not listen IPv6 address Added file: http://bugs.python.org/file43983/issue20215-gps01.diff _______________________________________ 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