@validator
def ipv6(value):
    parts = value.split(':')
    if len(parts) > 8:
        return False

    num_blank = 0
    for part in parts:
        if not part:
            num_blank += 1
        else:
            try:
                value = int(part, 16)
            except ValueError:
                return False
            else:
                if value < 0 or value >= 65536:
                    return False

    if num_blank < 2:
        return True
    elif num_blank == 2 and not parts[0] and not parts[1]:
        return True
    return False
Tell the factory we lost our connection.
dataset/ETHPy150Open SickRage/SickRage/lib/validators/ip_address.py/ipv6--crossover with--dataset/ETHPy150Open bfrog/whizzer/whizzer/rpc/picklerpc.py/PickleProtocol.connection_lost