Skip to content

Commit 3586db7

Browse files
committed
IGNITE-14511 Fix serialization of bytes, improve serialization-deserialization of collections. - Fixes #30.
1 parent 70bb1d9 commit 3586db7

File tree

13 files changed

+783
-729
lines changed

13 files changed

+783
-729
lines changed

pyignite/binary.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ async def _from_python_async(self, stream, save_to_buf=False):
151151
write_footer(self, stream, header, header_class, schema_items, offsets, initial_pos, save_to_buf)
152152

153153
def write_header(obj, stream):
154-
header_class = BinaryObject.build_header()
154+
header_class = BinaryObject.get_header_class()
155155
header = header_class()
156156
header.type_code = int.from_bytes(
157157
BinaryObject.type_code,

pyignite/datatypes/base.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,9 +72,9 @@ async def from_python_async(cls, stream, value, **kwargs):
7272
cls.from_python(stream, value, **kwargs)
7373

7474
@classmethod
75-
def to_python(cls, ctype_object, *args, **kwargs):
75+
def to_python(cls, ctypes_object, *args, **kwargs):
7676
raise NotImplementedError
7777

7878
@classmethod
79-
async def to_python_async(cls, ctype_object, *args, **kwargs):
80-
return cls.to_python(ctype_object, *args, **kwargs)
79+
async def to_python_async(cls, ctypes_object, *args, **kwargs):
80+
return cls.to_python(ctypes_object, *args, **kwargs)

pyignite/datatypes/cache_properties.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -115,12 +115,12 @@ async def parse_async(cls, stream):
115115
return cls.parse(stream)
116116

117117
@classmethod
118-
def to_python(cls, ctype_object, *args, **kwargs):
119-
return cls.prop_data_class.to_python(ctype_object.data, *args, **kwargs)
118+
def to_python(cls, ctypes_object, *args, **kwargs):
119+
return cls.prop_data_class.to_python(ctypes_object.data, *args, **kwargs)
120120

121121
@classmethod
122-
async def to_python_async(cls, ctype_object, *args, **kwargs):
123-
return cls.to_python(ctype_object, *args, **kwargs)
122+
async def to_python_async(cls, ctypes_object, *args, **kwargs):
123+
return cls.to_python(ctypes_object, *args, **kwargs)
124124

125125
@classmethod
126126
def from_python(cls, stream, value):
@@ -295,6 +295,6 @@ def from_python(cls, stream, value):
295295
)
296296

297297
@classmethod
298-
def to_python(cls, ctype_object, *args, **kwargs):
299-
prop_data_class = prop_map(ctype_object.prop_code)
300-
return prop_data_class.to_python(ctype_object.data, *args, **kwargs)
298+
def to_python(cls, ctypes_object, *args, **kwargs):
299+
prop_data_class = prop_map(ctypes_object.prop_code)
300+
return prop_data_class.to_python(ctypes_object.data, *args, **kwargs)

0 commit comments

Comments
 (0)