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 c270dc525b5dd9716f9a8ce607220c12dfab777f
Author: Stephen Mallette <[email protected]>
AuthorDate: Fri Aug 16 11:16:03 2019 -0400

    Renamed python graphbinary "IO" to der or ser depending on function
    
    Makes it a little easier to see what function of io the class supports
---
 CHANGELOG.asciidoc                                   |  1 +
 docs/src/dev/io/graphbinary.asciidoc                 |  2 +-
 .../gremlin_python/structure/io/graphbinaryV1.py     | 20 ++++++++++----------
 3 files changed, 12 insertions(+), 11 deletions(-)

diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc
index b2ce9da..0efc04b 100644
--- a/CHANGELOG.asciidoc
+++ b/CHANGELOG.asciidoc
@@ -24,6 +24,7 @@ 
image::https://raw.githubusercontent.com/apache/tinkerpop/master/docs/static/ima
 === TinkerPop 3.4.4 (Release Date: NOT OFFICIALLY RELEASED YET)
 
 * Provided support for DSLs by way of remote connections through 
`AnonymousTraversalSource`.
+* Added GraphBinary support for Python.
 
 [[release-3-4-3]]
 === TinkerPop 3.4.3 (Release Date: August 5, 2019)
diff --git a/docs/src/dev/io/graphbinary.asciidoc 
b/docs/src/dev/io/graphbinary.asciidoc
index 0262387..40d0ac0 100644
--- a/docs/src/dev/io/graphbinary.asciidoc
+++ b/docs/src/dev/io/graphbinary.asciidoc
@@ -32,7 +32,7 @@ It describes arbitrary object graphs with a fully-qualified 
format:
 
 Where:
 
-* `{type_code}` is a single byte representing the type number.
+* `{type_code}` is a single unsigned byte representing the type number.
 * `{type_info}` is an optional sequence of bytes providing additional 
information of the type represented. This is
 specially useful for representing complex and custom types.
 * `{value_flag}` is a single byte providing information about the value. Flags 
have the following meaning:
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 738cfe7..cbdda22 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
@@ -403,7 +403,7 @@ class ListIO(_GraphBinaryTypeIO):
         return the_list
 
 
-class SetIO(ListIO):
+class SetDeserializer(ListIO):
 
     python_type = SetType
     graphbinary_type = DataType.set
@@ -740,7 +740,7 @@ class TraversalIO(BytecodeIO):
     python_type = GraphTraversal
 
 
-class LambdaIO(_GraphBinaryTypeIO):
+class LambdaSerializer(_GraphBinaryTypeIO):
 
     python_type = FunctionType
     graphbinary_type = DataType.lambda_
@@ -768,7 +768,7 @@ class LambdaIO(_GraphBinaryTypeIO):
         return cls.as_bytes(cls.write_as_value(cls.graphbinary_type, 
as_value), None, nullable, ba)
 
 
-class PIO(_GraphBinaryTypeIO):
+class PSerializer(_GraphBinaryTypeIO):
     graphbinary_type = DataType.p
     python_type = P
 
@@ -875,7 +875,7 @@ class BooleanIO(_GraphBinaryTypeIO):
                            nullable)
 
 
-class TextPIO(_GraphBinaryTypeIO):
+class TextPSerializer(_GraphBinaryTypeIO):
     graphbinary_type = DataType.textp
     python_type = TextP
 
@@ -901,7 +901,7 @@ class TextPIO(_GraphBinaryTypeIO):
         return cls.as_bytes(cls.write_as_value(cls.graphbinary_type, 
as_value), None, nullable, ba)
 
 
-class BulkSetIO(_GraphBinaryTypeIO):
+class BulkSetDeserializer(_GraphBinaryTypeIO):
 
     graphbinary_type = DataType.bulkset
 
@@ -923,7 +923,7 @@ class BulkSetIO(_GraphBinaryTypeIO):
         return the_list
 
 
-class MetricsIO(_GraphBinaryTypeIO):
+class MetricsDeserializer(_GraphBinaryTypeIO):
 
     graphbinary_type = DataType.metrics
 
@@ -948,7 +948,7 @@ class MetricsIO(_GraphBinaryTypeIO):
                 "metrics": metrics}
 
 
-class TraversalMetricsIO(_GraphBinaryTypeIO):
+class TraversalMetricsDeserializer(_GraphBinaryTypeIO):
 
     graphbinary_type = DataType.traversalmetrics
 
@@ -965,7 +965,7 @@ class TraversalMetricsIO(_GraphBinaryTypeIO):
                 "metrics": metrics}
 
 
-class ClassIO(_GraphBinaryTypeIO):
+class ClassSerializer(_GraphBinaryTypeIO):
     graphbinary_type = DataType.clazz
     python_type = GremlinType
 
@@ -975,14 +975,14 @@ class ClassIO(_GraphBinaryTypeIO):
             cls.graphbinary_type, as_value), None, nullable, 
StringIO.dictify(obj.gremlin_type, writer, True, False))
 
 
-class TraversalStrategyIO(_GraphBinaryTypeIO):
+class TraversalStrategySerializer(_GraphBinaryTypeIO):
     graphbinary_type = DataType.traversalstrategy
     python_type = TraversalStrategy
 
     @classmethod
     def dictify(cls, obj, writer, as_value=False, nullable=True):
         ba = bytearray()
-        ba.extend(ClassIO.dictify(GremlinType(obj.fqcn), writer, True, False))
+        ba.extend(ClassSerializer.dictify(GremlinType(obj.fqcn), writer, True, 
False))
         conf = {k: cls._convert(v) for k, v in obj.configuration.items()}
         ba.extend(MapIO.dictify(conf, writer, True, False))
         return cls.as_bytes(cls.write_as_value(cls.graphbinary_type, 
as_value), None, nullable, ba)

Reply via email to