tinkerpop-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davebs...@apache.org
Subject [01/21] tinkerpop git commit: Fixed issue in NumberSerializer where a 64bit integer is misidentified as 32bit
Date Mon, 26 Sep 2016 17:26:27 GMT
Repository: tinkerpop
Updated Branches:
  refs/heads/TINKERPOP-1458 b4301630d -> 5022cd2a0


Fixed issue in NumberSerializer where a 64bit integer is misidentified as 32bit

Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo
Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/5573def4
Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/5573def4
Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/5573def4

Branch: refs/heads/TINKERPOP-1458
Commit: 5573def4a93072a79b66b3bb2e8a1727256b2d3e
Parents: 9004b4b
Author: Carlos Cheung <carlos@tumvi.com>
Authored: Wed Sep 14 22:15:49 2016 -0400
Committer: GitHub <noreply@github.com>
Committed: Wed Sep 14 22:15:49 2016 -0400

----------------------------------------------------------------------
 .../src/main/jython/gremlin_python/structure/io/graphson.py        | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/5573def4/gremlin-python/src/main/jython/gremlin_python/structure/io/graphson.py
----------------------------------------------------------------------
diff --git a/gremlin-python/src/main/jython/gremlin_python/structure/io/graphson.py b/gremlin-python/src/main/jython/gremlin_python/structure/io/graphson.py
index fd13ae9..aae3ab2 100644
--- a/gremlin-python/src/main/jython/gremlin_python/structure/io/graphson.py
+++ b/gremlin-python/src/main/jython/gremlin_python/structure/io/graphson.py
@@ -181,7 +181,7 @@ class NumberSerializer(GraphSONSerializer):
     def _dictify(self, number):
         if isinstance(number, bool):  # python thinks that 0/1 integers are booleans
             return number
-        elif isinstance(number, long):
+        elif isinstance(number, long) or (number > 2147483647): # in python all numbers
are int unless specified otherwise
             return _SymbolHelper.objectify("Int64", number)
         elif isinstance(number, int):
             return _SymbolHelper.objectify("Int32", number)


Mime
View raw message