You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tinkerpop.apache.org by sp...@apache.org on 2017/01/30 16:19:46 UTC
[1/3] tinkerpop git commit: Fix the serializers lookup to handle the
type first, then the class inheritance.
Repository: tinkerpop
Updated Branches:
refs/heads/tp32 1820606f2 -> 5aa3f40db
Fix the serializers lookup to handle the type first, then the class inheritance.
Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo
Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/1af9ba6f
Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/1af9ba6f
Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/1af9ba6f
Branch: refs/heads/tp32
Commit: 1af9ba6fe24f5425d8f18ab4d34ea536fd91e77e
Parents: c958b22
Author: Alan Boudreault <al...@alanb.ca>
Authored: Fri Jan 27 08:43:35 2017 -0500
Committer: Alan Boudreault <al...@alanb.ca>
Committed: Fri Jan 27 09:14:38 2017 -0500
----------------------------------------------------------------------
.../main/jython/gremlin_python/structure/io/graphson.py | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/1af9ba6f/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 85e161d..31d9d65 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
@@ -75,9 +75,13 @@ class GraphSONWriter(object):
"""
Encodes python objects in GraphSON type-tagged dict values
"""
- for key, serializer in self.serializers.items():
- if isinstance(obj, key):
- return serializer.dictify(obj, self)
+ try:
+ return self.serializers[type(obj)].dictify(obj, self)
+ except KeyError:
+ for key, serializer in self.serializers.items():
+ if isinstance(obj, key):
+ return serializer.dictify(obj, self)
+
# list and map are treated as normal json objs (could be isolated serializers)
if isinstance(obj, (list, set)):
return [self.toDict(o) for o in obj]
[2/3] tinkerpop git commit: removed unuseful type check in Int32IO
class
Posted by sp...@apache.org.
removed unuseful type check in Int32IO class
Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo
Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/1267ed04
Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/1267ed04
Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/1267ed04
Branch: refs/heads/tp32
Commit: 1267ed047f2f6fe0c2085e0d4a120cb1b463cd76
Parents: 1af9ba6
Author: Alan Boudreault <al...@alanb.ca>
Authored: Fri Jan 27 10:48:54 2017 -0500
Committer: Alan Boudreault <al...@alanb.ca>
Committed: Fri Jan 27 10:48:54 2017 -0500
----------------------------------------------------------------------
.../src/main/jython/gremlin_python/structure/io/graphson.py | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/1267ed04/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 31d9d65..f33f528 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
@@ -293,11 +293,7 @@ class Int32IO(_NumberIO):
def dictify(cls, n, writer):
if isinstance(n, bool):
return n
- if isinstance(n, LongType):
- graphson_base_type = Int64IO.graphson_base_type
- else:
- graphson_base_type = cls.graphson_base_type
- return GraphSONUtil.typedValue(graphson_base_type, n)
+ return GraphSONUtil.typedValue(cls.graphson_base_type, n)
class VertexDeserializer(_GraphSONTypeIO):
[3/3] tinkerpop git commit: Merge branch 'pr-551' into tp32
Posted by sp...@apache.org.
Merge branch 'pr-551' into tp32
Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo
Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/5aa3f40d
Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/5aa3f40d
Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/5aa3f40d
Branch: refs/heads/tp32
Commit: 5aa3f40db7bcc902f0fc524b0375b7c4eff48351
Parents: 1820606 1267ed0
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Mon Jan 30 11:19:06 2017 -0500
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Mon Jan 30 11:19:06 2017 -0500
----------------------------------------------------------------------
.../jython/gremlin_python/structure/io/graphson.py | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
----------------------------------------------------------------------