IGNITE-9908: Python client: fixed long data type processing. This closes #5017.
diff --git a/pyignite/datatypes/primitive.py b/pyignite/datatypes/primitive.py
index 73f096d..94c8fe3 100644
--- a/pyignite/datatypes/primitive.py
+++ b/pyignite/datatypes/primitive.py
@@ -66,7 +66,7 @@
class Long(Primitive):
- c_type = ctypes.c_long
+ c_type = ctypes.c_longlong
class Float(Primitive):
diff --git a/pyignite/datatypes/primitive_objects.py b/pyignite/datatypes/primitive_objects.py
index 53b54b3..4e37ce1 100644
--- a/pyignite/datatypes/primitive_objects.py
+++ b/pyignite/datatypes/primitive_objects.py
@@ -97,7 +97,7 @@
class LongObject(DataObject):
- c_type = ctypes.c_long
+ c_type = ctypes.c_longlong
type_code = TC_LONG
pythonic = int
default = 0
diff --git a/pyignite/datatypes/standard.py b/pyignite/datatypes/standard.py
index 160e06e..6109c7a 100644
--- a/pyignite/datatypes/standard.py
+++ b/pyignite/datatypes/standard.py
@@ -297,7 +297,7 @@
'_pack_': 1,
'_fields_': [
('type_code', ctypes.c_byte),
- ('epoch', ctypes.c_long),
+ ('epoch', ctypes.c_longlong),
('fraction', ctypes.c_int),
],
}
@@ -353,7 +353,7 @@
'_pack_': 1,
'_fields_': [
('type_code', ctypes.c_byte),
- ('epoch', ctypes.c_long),
+ ('epoch', ctypes.c_longlong),
],
}
)
@@ -405,7 +405,7 @@
'_pack_': 1,
'_fields_': [
('type_code', ctypes.c_byte),
- ('value', ctypes.c_long),
+ ('value', ctypes.c_longlong),
],
}
)
diff --git a/pyignite/queries/__init__.py b/pyignite/queries/__init__.py
index f43d60e..2c2d254 100644
--- a/pyignite/queries/__init__.py
+++ b/pyignite/queries/__init__.py
@@ -54,7 +54,7 @@
'_pack_': 1,
'_fields_': [
('length', ctypes.c_int),
- ('query_id', ctypes.c_long),
+ ('query_id', ctypes.c_longlong),
('status_code', ctypes.c_int),
],
},
@@ -239,7 +239,7 @@
'_fields_': [
('length', ctypes.c_int),
('op_code', ctypes.c_short),
- ('query_id', ctypes.c_long),
+ ('query_id', ctypes.c_longlong),
],
},
)
@@ -309,7 +309,7 @@
'_fields_': [
('length', ctypes.c_int),
('op_code', ctypes.c_short),
- ('query_id', ctypes.c_long),
+ ('query_id', ctypes.c_longlong),
('config_length', ctypes.c_int),
],
},
diff --git a/setup.py b/setup.py
index 403b170..5d14dae 100644
--- a/setup.py
+++ b/setup.py
@@ -55,7 +55,11 @@
requirements = defaultdict(list)
for section in requirement_sections:
- with open('requirements/{}.txt'.format(section), 'r') as requirements_file:
+ with open(
+ 'requirements/{}.txt'.format(section),
+ 'r',
+ encoding='utf-8',
+ ) as requirements_file:
for line in requirements_file.readlines():
line = line.strip('\n')
if is_a_requirement(line):