ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sboi...@apache.org
Subject [10/50] [abbrv] ignite git commit: IGNITE-9908: Python client: fixed long data type processing. This closes #5017.
Date Tue, 23 Oct 2018 15:01:14 GMT
IGNITE-9908: Python client: fixed long data type processing. This closes #5017.


Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/1b698100
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/1b698100
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/1b698100

Branch: refs/heads/ignite-gg-14206
Commit: 1b6981000b6fd581608d3db7fd280d6ddd1361a2
Parents: b3688dd
Author: Dmitry Melnichuk <dmitry.melnichuk@nobitlost.com>
Authored: Thu Oct 18 11:09:37 2018 +0300
Committer: devozerov <vozerov@gridgain.com>
Committed: Thu Oct 18 11:09:37 2018 +0300

----------------------------------------------------------------------
 modules/platforms/python/pyignite/datatypes/primitive.py       | 2 +-
 .../platforms/python/pyignite/datatypes/primitive_objects.py   | 2 +-
 modules/platforms/python/pyignite/datatypes/standard.py        | 6 +++---
 modules/platforms/python/pyignite/queries/__init__.py          | 6 +++---
 modules/platforms/python/setup.py                              | 6 +++++-
 5 files changed, 13 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/1b698100/modules/platforms/python/pyignite/datatypes/primitive.py
----------------------------------------------------------------------
diff --git a/modules/platforms/python/pyignite/datatypes/primitive.py b/modules/platforms/python/pyignite/datatypes/primitive.py
index 73f096d..94c8fe3 100644
--- a/modules/platforms/python/pyignite/datatypes/primitive.py
+++ b/modules/platforms/python/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):

http://git-wip-us.apache.org/repos/asf/ignite/blob/1b698100/modules/platforms/python/pyignite/datatypes/primitive_objects.py
----------------------------------------------------------------------
diff --git a/modules/platforms/python/pyignite/datatypes/primitive_objects.py b/modules/platforms/python/pyignite/datatypes/primitive_objects.py
index 53b54b3..4e37ce1 100644
--- a/modules/platforms/python/pyignite/datatypes/primitive_objects.py
+++ b/modules/platforms/python/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

http://git-wip-us.apache.org/repos/asf/ignite/blob/1b698100/modules/platforms/python/pyignite/datatypes/standard.py
----------------------------------------------------------------------
diff --git a/modules/platforms/python/pyignite/datatypes/standard.py b/modules/platforms/python/pyignite/datatypes/standard.py
index 160e06e..6109c7a 100644
--- a/modules/platforms/python/pyignite/datatypes/standard.py
+++ b/modules/platforms/python/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),
                     ],
                 }
             )

http://git-wip-us.apache.org/repos/asf/ignite/blob/1b698100/modules/platforms/python/pyignite/queries/__init__.py
----------------------------------------------------------------------
diff --git a/modules/platforms/python/pyignite/queries/__init__.py b/modules/platforms/python/pyignite/queries/__init__.py
index f43d60e..2c2d254 100644
--- a/modules/platforms/python/pyignite/queries/__init__.py
+++ b/modules/platforms/python/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),
                     ],
                 },

http://git-wip-us.apache.org/repos/asf/ignite/blob/1b698100/modules/platforms/python/setup.py
----------------------------------------------------------------------
diff --git a/modules/platforms/python/setup.py b/modules/platforms/python/setup.py
index 403b170..5d14dae 100644
--- a/modules/platforms/python/setup.py
+++ b/modules/platforms/python/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):


Mime
View raw message