This is an automated email from the ASF dual-hosted git repository. isapego pushed a commit to branch ignite-13735 in repository https://gitbox.apache.org/repos/asf/ignite-python-thin-client.git
commit 9c368a364fdb6abb3e751b0b05a28a0dc36ede23 Author: Dmitry Melnichuk <[email protected]> AuthorDate: Thu Oct 18 11:09:37 2018 +0300 IGNITE-9908: Python client: fixed long data type processing. This closes #5017. --- pyignite/datatypes/primitive.py | 2 +- pyignite/datatypes/primitive_objects.py | 2 +- pyignite/datatypes/standard.py | 6 +++--- pyignite/queries/__init__.py | 6 +++--- setup.py | 6 +++++- 5 files changed, 13 insertions(+), 9 deletions(-) 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 Int(Primitive): 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 IntObject(DataObject): 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 @@ class TimestampObject(StandardObject): '_pack_': 1, '_fields_': [ ('type_code', ctypes.c_byte), - ('epoch', ctypes.c_long), + ('epoch', ctypes.c_longlong), ('fraction', ctypes.c_int), ], } @@ -353,7 +353,7 @@ class DateObject(StandardObject): '_pack_': 1, '_fields_': [ ('type_code', ctypes.c_byte), - ('epoch', ctypes.c_long), + ('epoch', ctypes.c_longlong), ], } ) @@ -405,7 +405,7 @@ class TimeObject(StandardObject): '_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 @@ class Response: '_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 @@ class Query: '_fields_': [ ('length', ctypes.c_int), ('op_code', ctypes.c_short), - ('query_id', ctypes.c_long), + ('query_id', ctypes.c_longlong), ], }, ) @@ -309,7 +309,7 @@ class ConfigQuery(Query): '_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 @@ requirement_sections = [ 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):
