Skip to content
2 changes: 1 addition & 1 deletion cassandra/cluster.py
Original file line number Diff line number Diff line change
Expand Up @@ -4714,7 +4714,7 @@ def _set_result(self, host, connection, pool, response):
protocol = self.session.cluster.protocol_version
info = self._custom_payload.get('tablets-routing-v1')
ctype = types.lookup_casstype('TupleType(LongType, LongType, ListType(TupleType(UUIDType, Int32Type)))')
tablet_routing_info = ctype.from_binary(info, protocol)
tablet_routing_info = ctype(protocol).from_binary(info)
first_token = tablet_routing_info[0]
last_token = tablet_routing_info[1]
tablet_replicas = tablet_routing_info[2]
Expand Down
2 changes: 1 addition & 1 deletion cassandra/column_encryption/_policies.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ def encode_and_encrypt(self, coldesc, obj):
coldata = self.coldata.get(coldesc)
if not coldata:
raise ValueError("Could not find ColData for ColDesc %s".format(coldesc))
return self.encrypt(coldesc, coldata.type.serialize(obj, None))
return self.encrypt(coldesc, coldata.type(None).serialize(obj))

def cache_info(self):
return AES256ColumnEncryptionPolicy._build_cipher.cache_info()
Expand Down
2 changes: 1 addition & 1 deletion cassandra/cqlengine/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -948,7 +948,7 @@ def _transform_column(col_name, col_obj):
key_cols = [c for c in partition_keys.values()]
partition_key_index = dict((col.db_field_name, col._partition_key_index) for col in key_cols)
key_cql_types = [c.cql_type for c in key_cols]
key_serializer = staticmethod(lambda parts, proto_version: [t.to_binary(p, proto_version) for t, p in zip(key_cql_types, parts)])
key_serializer = staticmethod(lambda parts, proto_version: [t(proto_version).to_binary(p) for t, p in zip(key_cql_types, parts)])
else:
partition_key_index = {}
key_serializer = staticmethod(lambda parts, proto_version: None)
Expand Down
Loading
Loading