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 2019/09/04 20:16:49 UTC
[tinkerpop] 04/06: Fixed bad graphbinary serialization of
TraversalStrategy
This is an automated email from the ASF dual-hosted git repository.
spmallette pushed a commit to branch TINKERPOP-2279
in repository https://gitbox.apache.org/repos/asf/tinkerpop.git
commit 7e7445b45580009554409fb8b43e70cca2f40fc1
Author: Stephen Mallette <sp...@genoprime.com>
AuthorDate: Wed Sep 4 14:23:34 2019 -0400
Fixed bad graphbinary serialization of TraversalStrategy
---
.../main/jython/gremlin_python/structure/io/graphbinaryV1.py | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/gremlin-python/src/main/jython/gremlin_python/structure/io/graphbinaryV1.py b/gremlin-python/src/main/jython/gremlin_python/structure/io/graphbinaryV1.py
index 0e8b4cf..9f3ac17 100644
--- a/gremlin-python/src/main/jython/gremlin_python/structure/io/graphbinaryV1.py
+++ b/gremlin-python/src/main/jython/gremlin_python/structure/io/graphbinaryV1.py
@@ -149,14 +149,14 @@ class GraphBinaryWriter(object):
except KeyError:
for key, serializer in self.serializers.items():
if isinstance(obj, key):
- return serializer.dictify(obj, self)
+ return serializer.dictify(obj, self, to_extend)
if isinstance(obj, dict):
- return dict((self.toDict(k), self.toDict(v)) for k, v in obj.items())
+ return dict((self.toDict(k, to_extend), self.toDict(v, to_extend)) for k, v in obj.items())
elif isinstance(obj, set):
- return set([self.toDict(o) for o in obj])
+ return set([self.toDict(o, to_extend) for o in obj])
elif isinstance(obj, list):
- return [self.toDict(o) for o in obj]
+ return [self.toDict(o, to_extend) for o in obj]
else:
return obj
@@ -1023,7 +1023,7 @@ class TraversalStrategySerializer(_GraphBinaryTypeIO):
def dictify(cls, obj, writer, to_extend, as_value=False, nullable=True):
cls.prefix_bytes(cls.graphbinary_type, as_value, nullable, to_extend)
- to_extend.extend(ClassSerializer.dictify(GremlinType(obj.fqcn), writer, True, False))
+ ClassSerializer.dictify(GremlinType(obj.fqcn), writer, to_extend, True, False)
conf = {k: cls._convert(v) for k, v in obj.configuration.items()}
MapIO.dictify(conf, writer, to_extend, True, False)