def select_ip_version(host, port):
    # disabled due to problems with current ipv6 implementations
    # and various operating systems.  Probably this code also is
    # not supposed to work, but I can't come up with any other
    # ways to implement this.
    ##try:
    ##    info = socket.getaddrinfo(host, port, socket.AF_UNSPEC,
    ##                              socket.SOCK_STREAM, 0,
    ##                              socket.AI_PASSIVE)
    ##    if info:
    ##        return info[0][0]
    ##except socket.gaierror:
    ##    pass
    if ':' in host and hasattr(socket, 'AF_INET6'):
        return socket.AF_INET6
    return socket.AF_INET
Subclass to support dumping rich values.
dataset/ETHPy150Open Eforcers/gae-flask-todo/lib/werkzeug/serving.py/select_ip_version--crossover with--dataset/ETHPy150Open dieseldev/diesel/diesel/protocols/riak.py/Bucket.dumps