|
24 | 24 | from uuid import UUID |
25 | 25 |
|
26 | 26 | from cassandra.cqltypes import lookup_casstype |
27 | | -from cassandra.util import OrderedDict, sortedset |
| 27 | +from cassandra.util import OrderedMap, sortedset |
28 | 28 |
|
29 | 29 | marshalled_value_pairs = ( |
30 | 30 | # binary form, type, python native type |
|
75 | 75 | (b'', 'MapType(AsciiType, BooleanType)', None), |
76 | 76 | (b'', 'ListType(FloatType)', None), |
77 | 77 | (b'', 'SetType(LongType)', None), |
78 | | - (b'\x00\x00', 'MapType(DecimalType, BooleanType)', OrderedDict()), |
| 78 | + (b'\x00\x00', 'MapType(DecimalType, BooleanType)', OrderedMap()), |
79 | 79 | (b'\x00\x00', 'ListType(FloatType)', []), |
80 | 80 | (b'\x00\x00', 'SetType(IntegerType)', sortedset()), |
81 | 81 | (b'\x00\x01\x00\x10\xafYC\xa3\xea<\x11\xe1\xabc\xc4,\x03"y\xf0', 'ListType(TimeUUIDType)', [UUID(bytes=b'\xafYC\xa3\xea<\x11\xe1\xabc\xc4,\x03"y\xf0')]), |
82 | 82 | ) |
83 | 83 |
|
84 | | -ordered_dict_value = OrderedDict() |
85 | | -ordered_dict_value[u'\u307fbob'] = 199 |
86 | | -ordered_dict_value[u''] = -1 |
87 | | -ordered_dict_value[u'\\'] = 0 |
| 84 | +ordered_map_value = OrderedMap([(u'\u307fbob', 199), |
| 85 | + (u'', -1), |
| 86 | + (u'\\', 0)]) |
88 | 87 |
|
89 | 88 | # these following entries work for me right now, but they're dependent on |
90 | 89 | # vagaries of internal python ordering for unordered types |
91 | 90 | marshalled_value_pairs_unsafe = ( |
92 | | - (b'\x00\x03\x00\x06\xe3\x81\xbfbob\x00\x04\x00\x00\x00\xc7\x00\x00\x00\x04\xff\xff\xff\xff\x00\x01\\\x00\x04\x00\x00\x00\x00', 'MapType(UTF8Type, Int32Type)', ordered_dict_value), |
| 91 | + (b'\x00\x03\x00\x06\xe3\x81\xbfbob\x00\x04\x00\x00\x00\xc7\x00\x00\x00\x04\xff\xff\xff\xff\x00\x01\\\x00\x04\x00\x00\x00\x00', 'MapType(UTF8Type, Int32Type)', ordered_map_value), |
93 | 92 | (b'\x00\x02\x00\x08@\x01\x99\x99\x99\x99\x99\x9a\x00\x08@\x14\x00\x00\x00\x00\x00\x00', 'SetType(DoubleType)', sortedset([2.2, 5.0])), |
94 | 93 | (b'\x00', 'IntegerType', 0), |
95 | 94 | ) |
|
0 commit comments