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/07/18 21:14:36 UTC

[4/4] tinkerpop git commit: Added ordereddict for serializers in graphson 3.0

Added ordereddict for serializers in graphson 3.0

Matches the same change applied to the 2.0 serializers in the prior merge from tp32. CTR


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

Branch: refs/heads/master
Commit: 4184807be7a7fdf48eba53d3c0e7a41f21aa9b66
Parents: e365b9c
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Tue Jul 18 17:13:44 2017 -0400
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Tue Jul 18 17:13:44 2017 -0400

----------------------------------------------------------------------
 .../main/jython/gremlin_python/structure/io/graphsonV3d0.py    | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/4184807b/gremlin-python/src/main/jython/gremlin_python/structure/io/graphsonV3d0.py
----------------------------------------------------------------------
diff --git a/gremlin-python/src/main/jython/gremlin_python/structure/io/graphsonV3d0.py b/gremlin-python/src/main/jython/gremlin_python/structure/io/graphsonV3d0.py
index 1818df7..7194f48 100644
--- a/gremlin-python/src/main/jython/gremlin_python/structure/io/graphsonV3d0.py
+++ b/gremlin-python/src/main/jython/gremlin_python/structure/io/graphsonV3d0.py
@@ -19,13 +19,17 @@ under the License.
 from aenum import Enum
 import json
 import six
+from collections import OrderedDict
 
 from gremlin_python import statics
 from gremlin_python.statics import FloatType, FunctionType, IntType, LongType, TypeType, DictType, ListType, SetType
 from gremlin_python.process.traversal import Binding, Bytecode, P, Traversal, Traverser, TraversalStrategy
 from gremlin_python.structure.graph import Edge, Property, Vertex, VertexProperty, Path
 
-_serializers = {}
+# When we fall back to a superclass's serializer, we iterate over this map.
+# We want that iteration order to be consistent, so we use an OrderedDict,
+# not a dict.
+_serializers = OrderedDict()
 _deserializers = {}