GitHub user davebshow opened a pull request:
TINKERPOP-1747 Streamline inheritance for gremlin-python GrapnSON
This PR cleans up the code used to define GraphSON serializer classes in
`GraphSONMessageSerializer` acts as a base class for
`GraphSONSerializersV2d0` and `GraphSONSerializersV3d0` in a similar fashion,
but with this change:
1. While `GraphSONMessageSerializer` can accept custom reader, writer, and
version implementations in order to create a custom serializer,
`GraphSONSerializersV2d0` and `GraphSONSerializersV3d0` cannot.
2. Instead `GraphSONSerializersV3d0` and `GraphSONSerializersV2d0` are in a
sense implementations of custom serializers, and they always use
As before, `GraphSONMessageSerializer` will default to the current version
of GraphSON (v3 for TP 3.3.0) if no custom reader/writer implementation is
passed. Defaults are now specified in a highly visible class attribute position
using uppercase naming like class CONSTANTS.
All other changes, like using `super` to call parent class's init methods,
are more stylistic, reflecting current Python standards for best practice.
I also added a couple small tests to make sure each serializer was assigned
proper reader, writer classes as well as version information.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/apache/tinkerpop TINKERPOP-1747
Alternatively you can review and apply these changes as the patch at:
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #691
Author: davebshow <davebs...@gmail.com>
cleaned up gremlin-python message serializer classes
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket