Giampaolo Rodola' <g.rod...@gmail.com> added the comment:
Patch committed as of: https://github.com/python/cpython/commit/eb7e29f2a9d075accc1ab3faf3612ac44f5e2183 For posterity, since the API evolved since the original proposal (as per PR review/suggestions), this is the final incarnation: # IPv4 only >>> socket.create_server(addr) # IPv6 only >>> socket.create_server(addr, family=socket.AF_INET6) # IPv4 + IPv6 >>> socket.create_server(addr, family=socket.AF_INET6, dualstack_ipv6=True) # IPv4/6 if possible and don't care about IPv4 mapped addresses, else IPv4 >>> if socket.has_dualstack_ipv6(): ... s = socket.create_server(addr, family=socket.AF_INET6, dualstack_ipv6=True) ... else: ... s = socket.create_server(addr) ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue17561> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com