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/19 19:19:31 UTC

[32/50] [abbrv] tinkerpop git commit: Ensure serializer iteration is consistent

Ensure serializer iteration is consistent


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

Branch: refs/heads/TINKERPOP-1716
Commit: 40c76e9ecddd244aba2e5c081f07911b66363de8
Parents: 937981a
Author: Alan Boudreault <al...@alanb.ca>
Authored: Thu Jul 13 11:05:44 2017 -0400
Committer: Alan Boudreault <al...@alanb.ca>
Committed: Thu Jul 13 11:05:44 2017 -0400

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


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/40c76e9e/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 f33f528..8102ee8 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
@@ -19,6 +19,7 @@ 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
@@ -26,7 +27,10 @@ from gremlin_python.process.traversal import Binding, Bytecode, P, Traversal, Tr
 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 = {}