Open
Description
Just as was done for the GoCQL driver (scylladb/gocql#457 and others), we should remove ancient protocol support. It's not such a big deal, but there's always an 'if' in the serialization and so forth.
Example:
class _SimpleParameterizedType(_ParameterizedType):
@classmethod
def deserialize_safe(cls, byts, protocol_version):
subtype, = cls.subtypes
if protocol_version >= 3:
unpack = int32_unpack
length = 4
else:
unpack = uint16_unpack
length = 2
Or:
def serialize_safe(cls, items, protocol_version):
if isinstance(items, str):
raise TypeError("Received a string for a type that expects a sequence")
subtype, = cls.subtypes
pack = int32_pack if protocol_version >= 3 else uint16_pack