sockets = []
if address == "":
address = None
- if not socket.has_ipv6:
+ if not socket.has_ipv6 and family == socket.AF_UNSPEC:
+ # Python can be compiled with --disable-ipv6, which causes
+ # operations on AF_INET6 sockets to fail, but does not
+ # automatically exclude those results from getaddrinfo
+ # results.
+ # http://bugs.python.org/issue16208
family = socket.AF_INET
if flags is None:
flags = socket.AI_PASSIVE
port available in 12.10 (``apt-get install python3-pycurl``). This port
currently has bugs that prevent it from handling arbitrary binary data
but it should work for textual (utf8) resources.
+* `tornado.netutil.bind_sockets` now works when Python was compiled
+ with ``--disable-ipv6`` but IPv6 DNS resolution is available on the
+ system.