Skip to content


Subversion checkout URL

You can clone with
Download ZIP


key_validation_class = Int32Type doesn't do what is says in the reference #165

ilyail3 opened this Issue · 1 comment

2 participants


Something annoying I wasted half an hour over, is that adding 'key_validation_class = Int32Type' doesn't actually change the bytes you send to cassandra, not in 1.6 anyway. A little demo:

    # This will work
    col_site = ColumnFamily(pool, 'Sites' , autopack_keys = False)
    site_id = Int32Type().pack(435)
    print len(site_id)
    print col_site.get(site_id , columns = ["domain"])

    # This will fail
    col_site = ColumnFamily(pool, 'Sites' , key_validation_class = Int32Type)
    print col_site.get(435 , columns = ["domain"])

    # This will fail too
    col_site = ColumnFamily(pool, 'Sites' , key_validation_class = Int32Type())
    print col_site.get(435 , columns = ["domain"])

Am I missing something, or is it really a bug?


key_validation_class isn't a recognized kwarg, only a property on ColumnFamily objects. Is there somewhere in the documentation that says otherwise (so that I can fix it)?

For backwards compatibility reasons, there are some extra accepted keyword arguments. However, I see that the way those are being handled doesn't raise any type of Exception when an invalid kwarg is used, which is definitely a bug. I'll get that fixed.

@thobbs thobbs closed this in 7df4c01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.