From a633a5a78c382f7d75612980d0406dd79b454114 Mon Sep 17 00:00:00 2001
From: Jeffrey Phillips Freeman <jeffrey.freeman@syncleus.com>
Date: Thu, 30 Jan 2020 17:25:25 +0100
Subject: [PATCH] Build: Updated build to use latest version of dependencies.

---
 CHANGELOG.md              |  1 +
 goblin/fileio/graphson.py |  6 +++---
 goblin/session.py         |  5 +++--
 requirements.txt          | 21 +++++++++++----------
 setup.py                  |  3 +--
 tests/test_graph.py       |  8 ++++----
 6 files changed, 23 insertions(+), 21 deletions(-)

diff --git a/CHANGELOG.md b/CHANGELOG.md
index da8bf05..45d3407 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -3,3 +3,4 @@
 ## v2.1.1
 
 * Fixed incorrect hashable id handling on Janusgraph.
+* Updated to run on newer versions of gremlin-python, 3.4.3 is the latest compatible version.
diff --git a/goblin/fileio/graphson.py b/goblin/fileio/graphson.py
index c993242..728581b 100644
--- a/goblin/fileio/graphson.py
+++ b/goblin/fileio/graphson.py
@@ -4,12 +4,12 @@ try:
 except ImportError:
     import json
 
-from gremlin_python.structure.io import graphson
+from gremlin_python.structure.io.graphsonV3d0 import GraphSONWriter
 from goblin.element import Vertex, Edge, VertexProperty
 from goblin.manager import ListVertexPropertyManager
 
 
-writer = graphson.GraphSONWriter()
+writer = GraphSONWriter()
 
 
 AdjList = collections.namedtuple("AdjList", "vertex inE outE")
@@ -124,4 +124,4 @@ def _prep_vp(prop, value, v, db_name):
 
 
 def _dump_edge(e):
-    pass
\ No newline at end of file
+    pass
diff --git a/goblin/session.py b/goblin/session.py
index ca8093a..1fcf84b 100644
--- a/goblin/session.py
+++ b/goblin/session.py
@@ -439,8 +439,9 @@ class Session:
             if not metaprops:
                 metaprops = {}
             if val is not None:
-                key = ('k' + str(binding), db_name)
-                val = ('v' + str(binding), val)
+                key = db_name
+                #key = ('k' + str(binding), db_name)
+                #val = ('v' + str(binding), val)
                 if card:
                     # Maybe use a dict here as a translator
                     if card == Cardinality.list_:
diff --git a/requirements.txt b/requirements.txt
index 9c677e0..95de832 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -1,15 +1,16 @@
-#required foir goblin
-six==1.10.0
-aenum==1.4.5
-aiohttp==2.3.10
-aiogremlin==3.2.6
+gremlinpython==3.4.3
+aiogremlin==3.3.2
+PyYAML==5.3
+six==1.14.0
+aenum==2.2.3
+aiohttp==3.6.2
 inflection==0.3.1
-gremlinpython==3.2.6
 
-#for goblin testing
-pytest-asyncio>=0.8.0
+#for testing
+pytest-asyncio>=0.10.0
 pytest-cache>=1.0
-pytest-cov>=2.5.1
+pytest-cov>=2.8.1
 pytest-pep8>=1.0.6
-pytest>=3.2.1
+pytest>=5.3.4
 pytest-timeout>=1.3.4
+coverage==5.0.3
diff --git a/setup.py b/setup.py
index 72a2d8f..48bb598 100644
--- a/setup.py
+++ b/setup.py
@@ -35,8 +35,7 @@ setup_requires = [
 ]
 
 install_requires = [
-    'aiogremlin>=3.2.6',
-    'gremlinpython>=3.2.6',
+    'aiogremlin>=3.3.2',
     'inflection>=0.3.1',
 ]
 
diff --git a/tests/test_graph.py b/tests/test_graph.py
index bda3bf5..9f79457 100644
--- a/tests/test_graph.py
+++ b/tests/test_graph.py
@@ -1,6 +1,6 @@
 import pytest
 from aiogremlin import process
-from gremlin_python.process.traversal import Binding
+from gremlin_python.process.traversal import Binding, T
 
 from goblin import driver
 
@@ -12,7 +12,7 @@ async def test_generate_traversal(remote_graph, remote_connection):
         traversal = g.V().hasLabel(('v1', 'person'))
         assert isinstance(traversal,
                           process.graph_traversal.AsyncGraphTraversal)
-        assert traversal.bytecode.bindings['v1'] == 'person'
+        assert traversal.bytecode.step_instructions[1][1][1] == 'person'
 
 
 @pytest.mark.asyncio
@@ -21,8 +21,8 @@ async def test_submit_traversal(remote_graph, remote_connection):
     resp = g.addV('person').property('name', 'leifur').valueMap(True)
     leif = await resp.next()
     assert leif['name'][0] == 'leifur'
-    assert leif['label'] == 'person'
-    resp = g.V(Binding('vid', leif['id'])).drop()
+    assert leif[T.label] == 'person'
+    resp = g.V(Binding('vid', leif[T.id])).drop()
     none = await resp.next()
     assert none is None
 
-- 
GitLab