def supports_ipv6():
    if not socket.has_ipv6 or not hasattr(socket, "AF_INET6"):
        return False
    try:
        sock = socket.socket(socket.AF_INET6, socket.SOCK_STREAM)
        with contextlib.closing(sock):
            sock.bind(("::1", 0))
        return True
    except socket.error:
        return False
Provide information and statistics about the server
dataset/ETHPy150Open giampaolo/psutil/psutil/_common.py/supports_ipv6--crossover with--dataset/ETHPy150Open jookies/jasmin/jasmin/vendor/txredisapi.py/RedisProtocol.info