tinkerpop git commit: CTR changelog entry for TINKERPOP-1933

2018-05-14 Thread davebshow
Repository: tinkerpop
Updated Branches:
  refs/heads/tp32 fa3fb9eac -> 58d3d403f


CTR changelog entry for TINKERPOP-1933


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

Branch: refs/heads/tp32
Commit: 58d3d403f09d09651828fe216a58cc1e8c624797
Parents: fa3fb9e
Author: davebshow <davebs...@gmail.com>
Authored: Mon May 14 12:42:49 2018 -0700
Committer: davebshow <davebs...@gmail.com>
Committed: Mon May 14 12:42:49 2018 -0700

--
 CHANGELOG.asciidoc | 2 ++
 1 file changed, 2 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/58d3d403/CHANGELOG.asciidoc
--
diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc
index 41d83c4..b407288 100644
--- a/CHANGELOG.asciidoc
+++ b/CHANGELOG.asciidoc
@@ -23,6 +23,8 @@ 
image::https://raw.githubusercontent.com/apache/tinkerpop/master/docs/static/ima
 [[release-3-2-10]]
 === TinkerPop 3.2.10 (Release Date: NOT OFFICIALLY RELEASED YET)
 
+* Removed recursive handling of streaming results from Gremlin-Python driver 
to avoid max recursion depth errors.
+
 
 [[release-3-2-9]]
 === TinkerPop 3.2.9 (Release Date: May 8, 2018)



[1/2] tinkerpop git commit: CTR changelog entry for TINKERPOP-1933

2018-05-14 Thread davebshow
Repository: tinkerpop
Updated Branches:
  refs/heads/tp33 715876822 -> 0b282e47f


CTR changelog entry for TINKERPOP-1933


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

Branch: refs/heads/tp33
Commit: 58d3d403f09d09651828fe216a58cc1e8c624797
Parents: fa3fb9e
Author: davebshow <davebs...@gmail.com>
Authored: Mon May 14 12:42:49 2018 -0700
Committer: davebshow <davebs...@gmail.com>
Committed: Mon May 14 12:42:49 2018 -0700

--
 CHANGELOG.asciidoc | 2 ++
 1 file changed, 2 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/58d3d403/CHANGELOG.asciidoc
--
diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc
index 41d83c4..b407288 100644
--- a/CHANGELOG.asciidoc
+++ b/CHANGELOG.asciidoc
@@ -23,6 +23,8 @@ 
image::https://raw.githubusercontent.com/apache/tinkerpop/master/docs/static/ima
 [[release-3-2-10]]
 === TinkerPop 3.2.10 (Release Date: NOT OFFICIALLY RELEASED YET)
 
+* Removed recursive handling of streaming results from Gremlin-Python driver 
to avoid max recursion depth errors.
+
 
 [[release-3-2-9]]
 === TinkerPop 3.2.9 (Release Date: May 8, 2018)



[2/2] tinkerpop git commit: Merge branch 'tp32' into tp33

2018-05-14 Thread davebshow
Merge branch 'tp32' into tp33


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

Branch: refs/heads/tp33
Commit: 0b282e47fab2ddde978439be5831542ca26d88f4
Parents: 7158768 58d3d40
Author: davebshow <davebs...@gmail.com>
Authored: Mon May 14 12:43:06 2018 -0700
Committer: davebshow <davebs...@gmail.com>
Committed: Mon May 14 12:43:06 2018 -0700

--
 CHANGELOG.asciidoc | 2 ++
 1 file changed, 2 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/0b282e47/CHANGELOG.asciidoc
--



[2/3] tinkerpop git commit: Merge branch 'tp32' into tp33

2018-05-14 Thread davebshow
Merge branch 'tp32' into tp33


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

Branch: refs/heads/master
Commit: 0b282e47fab2ddde978439be5831542ca26d88f4
Parents: 7158768 58d3d40
Author: davebshow <davebs...@gmail.com>
Authored: Mon May 14 12:43:06 2018 -0700
Committer: davebshow <davebs...@gmail.com>
Committed: Mon May 14 12:43:06 2018 -0700

--
 CHANGELOG.asciidoc | 2 ++
 1 file changed, 2 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/0b282e47/CHANGELOG.asciidoc
--



[1/3] tinkerpop git commit: CTR changelog entry for TINKERPOP-1933

2018-05-14 Thread davebshow
Repository: tinkerpop
Updated Branches:
  refs/heads/master d564631d8 -> 200c690f9


CTR changelog entry for TINKERPOP-1933


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

Branch: refs/heads/master
Commit: 58d3d403f09d09651828fe216a58cc1e8c624797
Parents: fa3fb9e
Author: davebshow <davebs...@gmail.com>
Authored: Mon May 14 12:42:49 2018 -0700
Committer: davebshow <davebs...@gmail.com>
Committed: Mon May 14 12:42:49 2018 -0700

--
 CHANGELOG.asciidoc | 2 ++
 1 file changed, 2 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/58d3d403/CHANGELOG.asciidoc
--
diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc
index 41d83c4..b407288 100644
--- a/CHANGELOG.asciidoc
+++ b/CHANGELOG.asciidoc
@@ -23,6 +23,8 @@ 
image::https://raw.githubusercontent.com/apache/tinkerpop/master/docs/static/ima
 [[release-3-2-10]]
 === TinkerPop 3.2.10 (Release Date: NOT OFFICIALLY RELEASED YET)
 
+* Removed recursive handling of streaming results from Gremlin-Python driver 
to avoid max recursion depth errors.
+
 
 [[release-3-2-9]]
 === TinkerPop 3.2.9 (Release Date: May 8, 2018)



[3/3] tinkerpop git commit: Merge branch 'tp33'

2018-05-14 Thread davebshow
Merge branch 'tp33'


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

Branch: refs/heads/master
Commit: 200c690f9345792e37e320bd3c5a01a2805cb654
Parents: d564631 0b282e4
Author: davebshow <davebs...@gmail.com>
Authored: Mon May 14 12:43:19 2018 -0700
Committer: davebshow <davebs...@gmail.com>
Committed: Mon May 14 12:43:19 2018 -0700

--
 CHANGELOG.asciidoc | 2 ++
 1 file changed, 2 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/200c690f/CHANGELOG.asciidoc
--



[1/2] tinkerpop git commit: Don't use recursive calls for streaming response

2018-05-14 Thread davebshow
Repository: tinkerpop
Updated Branches:
  refs/heads/tp32 770375d4d -> fa3fb9eac


Don't use recursive calls for streaming response


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

Branch: refs/heads/tp32
Commit: 4c8717dd4e94ec248a959911d8c11f3b45b2d7b3
Parents: 268423d
Author: davebshow <davebs...@gmail.com>
Authored: Mon Apr 23 16:21:48 2018 -0700
Committer: davebshow <davebs...@gmail.com>
Committed: Mon Apr 23 16:21:48 2018 -0700

--
 .../src/main/jython/gremlin_python/driver/connection.py  | 7 +--
 .../src/main/jython/gremlin_python/driver/protocol.py| 8 
 2 files changed, 9 insertions(+), 6 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/4c8717dd/gremlin-python/src/main/jython/gremlin_python/driver/connection.py
--
diff --git a/gremlin-python/src/main/jython/gremlin_python/driver/connection.py 
b/gremlin-python/src/main/jython/gremlin_python/driver/connection.py
index abc4545..bff1904 100644
--- a/gremlin-python/src/main/jython/gremlin_python/driver/connection.py
+++ b/gremlin-python/src/main/jython/gremlin_python/driver/connection.py
@@ -73,6 +73,9 @@ class Connection:
 return future
 
 def _receive(self):
-data = self._transport.read()
-self._protocol.data_received(data, self._results)
+while True:
+data = self._transport.read()
+status_code = self._protocol.data_received(data, self._results)
+if status_code != 206:
+break
 self._pool.put_nowait(self)

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/4c8717dd/gremlin-python/src/main/jython/gremlin_python/driver/protocol.py
--
diff --git a/gremlin-python/src/main/jython/gremlin_python/driver/protocol.py 
b/gremlin-python/src/main/jython/gremlin_python/driver/protocol.py
index 84a7d82..2fc7c1b 100644
--- a/gremlin-python/src/main/jython/gremlin_python/driver/protocol.py
+++ b/gremlin-python/src/main/jython/gremlin_python/driver/protocol.py
@@ -80,21 +80,21 @@ class GremlinServerWSProtocol(AbstractBaseProtocol):
 {'sasl': base64.b64encode(auth).decode()})
 self.write(request_id, request_message)
 data = self._transport.read()
+# Allow recursive call for auth
 self.data_received(data, results_dict)
 elif status_code == 204:
 result_set.stream.put_nowait([])
 del results_dict[request_id]
+return status_code
 elif status_code in [200, 206]:
 results = []
 for msg in data["result"]["data"]:
 results.append(
 self._message_serializer.deserialize_message(msg))
 result_set.stream.put_nowait(results)
-if status_code == 206:
-data = self._transport.read()
-self.data_received(data, results_dict)
-else:
+if status_code == 200:
 del results_dict[request_id]
+return status_code
 else:
 del results_dict[request_id]
 raise GremlinServerError(



[2/2] tinkerpop git commit: Merge branch 'TINKERPOP-1933' into tp32

2018-05-14 Thread davebshow
Merge branch 'TINKERPOP-1933' into tp32


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

Branch: refs/heads/tp32
Commit: fa3fb9eac88ca7b7f3669b18d097f0e69e09bfaf
Parents: 770375d 4c8717d
Author: davebshow <davebs...@gmail.com>
Authored: Mon May 14 12:09:21 2018 -0700
Committer: davebshow <davebs...@gmail.com>
Committed: Mon May 14 12:09:21 2018 -0700

--
 .../src/main/jython/gremlin_python/driver/connection.py  | 7 +--
 .../src/main/jython/gremlin_python/driver/protocol.py| 8 
 2 files changed, 9 insertions(+), 6 deletions(-)
--




[2/3] tinkerpop git commit: Merge branch 'TINKERPOP-1933' into tp32

2018-05-14 Thread davebshow
Merge branch 'TINKERPOP-1933' into tp32


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

Branch: refs/heads/tp33
Commit: fa3fb9eac88ca7b7f3669b18d097f0e69e09bfaf
Parents: 770375d 4c8717d
Author: davebshow <davebs...@gmail.com>
Authored: Mon May 14 12:09:21 2018 -0700
Committer: davebshow <davebs...@gmail.com>
Committed: Mon May 14 12:09:21 2018 -0700

--
 .../src/main/jython/gremlin_python/driver/connection.py  | 7 +--
 .../src/main/jython/gremlin_python/driver/protocol.py| 8 
 2 files changed, 9 insertions(+), 6 deletions(-)
--




[1/3] tinkerpop git commit: Don't use recursive calls for streaming response

2018-05-14 Thread davebshow
Repository: tinkerpop
Updated Branches:
  refs/heads/tp33 3f94a27f3 -> 715876822


Don't use recursive calls for streaming response


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

Branch: refs/heads/tp33
Commit: 4c8717dd4e94ec248a959911d8c11f3b45b2d7b3
Parents: 268423d
Author: davebshow <davebs...@gmail.com>
Authored: Mon Apr 23 16:21:48 2018 -0700
Committer: davebshow <davebs...@gmail.com>
Committed: Mon Apr 23 16:21:48 2018 -0700

--
 .../src/main/jython/gremlin_python/driver/connection.py  | 7 +--
 .../src/main/jython/gremlin_python/driver/protocol.py| 8 
 2 files changed, 9 insertions(+), 6 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/4c8717dd/gremlin-python/src/main/jython/gremlin_python/driver/connection.py
--
diff --git a/gremlin-python/src/main/jython/gremlin_python/driver/connection.py 
b/gremlin-python/src/main/jython/gremlin_python/driver/connection.py
index abc4545..bff1904 100644
--- a/gremlin-python/src/main/jython/gremlin_python/driver/connection.py
+++ b/gremlin-python/src/main/jython/gremlin_python/driver/connection.py
@@ -73,6 +73,9 @@ class Connection:
 return future
 
 def _receive(self):
-data = self._transport.read()
-self._protocol.data_received(data, self._results)
+while True:
+data = self._transport.read()
+status_code = self._protocol.data_received(data, self._results)
+if status_code != 206:
+break
 self._pool.put_nowait(self)

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/4c8717dd/gremlin-python/src/main/jython/gremlin_python/driver/protocol.py
--
diff --git a/gremlin-python/src/main/jython/gremlin_python/driver/protocol.py 
b/gremlin-python/src/main/jython/gremlin_python/driver/protocol.py
index 84a7d82..2fc7c1b 100644
--- a/gremlin-python/src/main/jython/gremlin_python/driver/protocol.py
+++ b/gremlin-python/src/main/jython/gremlin_python/driver/protocol.py
@@ -80,21 +80,21 @@ class GremlinServerWSProtocol(AbstractBaseProtocol):
 {'sasl': base64.b64encode(auth).decode()})
 self.write(request_id, request_message)
 data = self._transport.read()
+# Allow recursive call for auth
 self.data_received(data, results_dict)
 elif status_code == 204:
 result_set.stream.put_nowait([])
 del results_dict[request_id]
+return status_code
 elif status_code in [200, 206]:
 results = []
 for msg in data["result"]["data"]:
 results.append(
 self._message_serializer.deserialize_message(msg))
 result_set.stream.put_nowait(results)
-if status_code == 206:
-data = self._transport.read()
-self.data_received(data, results_dict)
-else:
+if status_code == 200:
 del results_dict[request_id]
+return status_code
 else:
 del results_dict[request_id]
 raise GremlinServerError(



[3/3] tinkerpop git commit: merged tp32. fixed conflict related to better message deserializer implementation in 3.3.x line

2018-05-14 Thread davebshow
merged tp32. fixed conflict related to better message deserializer 
implementation in 3.3.x line


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

Branch: refs/heads/tp33
Commit: 71587682236138de179137a233d243100178ee4f
Parents: 3f94a27 fa3fb9e
Author: davebshow <davebs...@gmail.com>
Authored: Mon May 14 12:15:37 2018 -0700
Committer: davebshow <davebs...@gmail.com>
Committed: Mon May 14 12:15:37 2018 -0700

--
 .../src/main/jython/gremlin_python/driver/connection.py   | 7 +--
 .../src/main/jython/gremlin_python/driver/protocol.py | 7 +--
 2 files changed, 10 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/71587682/gremlin-python/src/main/jython/gremlin_python/driver/protocol.py
--
diff --cc gremlin-python/src/main/jython/gremlin_python/driver/protocol.py
index 1330483,2fc7c1b..014daff
--- a/gremlin-python/src/main/jython/gremlin_python/driver/protocol.py
+++ b/gremlin-python/src/main/jython/gremlin_python/driver/protocol.py
@@@ -85,13 -85,16 +86,15 @@@ class GremlinServerWSProtocol(AbstractB
  elif status_code == 204:
  result_set.stream.put_nowait([])
  del results_dict[request_id]
+ return status_code
  elif status_code in [200, 206]:
 -results = []
 -for msg in data["result"]["data"]:
 -results.append(
 -self._message_serializer.deserialize_message(msg))
 -result_set.stream.put_nowait(results)
 -if status_code == 200:
 +result_set.stream.put_nowait(data)
 +if status_code == 206:
 +message = self._transport.read()
 +self.data_received(message, results_dict)
 +else:
  del results_dict[request_id]
+ return status_code
  else:
  del results_dict[request_id]
  raise GremlinServerError(



[1/4] tinkerpop git commit: Don't use recursive calls for streaming response

2018-05-14 Thread davebshow
Repository: tinkerpop
Updated Branches:
  refs/heads/master 34d42fe49 -> d564631d8


Don't use recursive calls for streaming response


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

Branch: refs/heads/master
Commit: 4c8717dd4e94ec248a959911d8c11f3b45b2d7b3
Parents: 268423d
Author: davebshow <davebs...@gmail.com>
Authored: Mon Apr 23 16:21:48 2018 -0700
Committer: davebshow <davebs...@gmail.com>
Committed: Mon Apr 23 16:21:48 2018 -0700

--
 .../src/main/jython/gremlin_python/driver/connection.py  | 7 +--
 .../src/main/jython/gremlin_python/driver/protocol.py| 8 
 2 files changed, 9 insertions(+), 6 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/4c8717dd/gremlin-python/src/main/jython/gremlin_python/driver/connection.py
--
diff --git a/gremlin-python/src/main/jython/gremlin_python/driver/connection.py 
b/gremlin-python/src/main/jython/gremlin_python/driver/connection.py
index abc4545..bff1904 100644
--- a/gremlin-python/src/main/jython/gremlin_python/driver/connection.py
+++ b/gremlin-python/src/main/jython/gremlin_python/driver/connection.py
@@ -73,6 +73,9 @@ class Connection:
 return future
 
 def _receive(self):
-data = self._transport.read()
-self._protocol.data_received(data, self._results)
+while True:
+data = self._transport.read()
+status_code = self._protocol.data_received(data, self._results)
+if status_code != 206:
+break
 self._pool.put_nowait(self)

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/4c8717dd/gremlin-python/src/main/jython/gremlin_python/driver/protocol.py
--
diff --git a/gremlin-python/src/main/jython/gremlin_python/driver/protocol.py 
b/gremlin-python/src/main/jython/gremlin_python/driver/protocol.py
index 84a7d82..2fc7c1b 100644
--- a/gremlin-python/src/main/jython/gremlin_python/driver/protocol.py
+++ b/gremlin-python/src/main/jython/gremlin_python/driver/protocol.py
@@ -80,21 +80,21 @@ class GremlinServerWSProtocol(AbstractBaseProtocol):
 {'sasl': base64.b64encode(auth).decode()})
 self.write(request_id, request_message)
 data = self._transport.read()
+# Allow recursive call for auth
 self.data_received(data, results_dict)
 elif status_code == 204:
 result_set.stream.put_nowait([])
 del results_dict[request_id]
+return status_code
 elif status_code in [200, 206]:
 results = []
 for msg in data["result"]["data"]:
 results.append(
 self._message_serializer.deserialize_message(msg))
 result_set.stream.put_nowait(results)
-if status_code == 206:
-data = self._transport.read()
-self.data_received(data, results_dict)
-else:
+if status_code == 200:
 del results_dict[request_id]
+return status_code
 else:
 del results_dict[request_id]
 raise GremlinServerError(



[3/4] tinkerpop git commit: merged tp32. fixed conflict related to better message deserializer implementation in 3.3.x line

2018-05-14 Thread davebshow
merged tp32. fixed conflict related to better message deserializer 
implementation in 3.3.x line


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

Branch: refs/heads/master
Commit: 71587682236138de179137a233d243100178ee4f
Parents: 3f94a27 fa3fb9e
Author: davebshow <davebs...@gmail.com>
Authored: Mon May 14 12:15:37 2018 -0700
Committer: davebshow <davebs...@gmail.com>
Committed: Mon May 14 12:15:37 2018 -0700

--
 .../src/main/jython/gremlin_python/driver/connection.py   | 7 +--
 .../src/main/jython/gremlin_python/driver/protocol.py | 7 +--
 2 files changed, 10 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/71587682/gremlin-python/src/main/jython/gremlin_python/driver/protocol.py
--
diff --cc gremlin-python/src/main/jython/gremlin_python/driver/protocol.py
index 1330483,2fc7c1b..014daff
--- a/gremlin-python/src/main/jython/gremlin_python/driver/protocol.py
+++ b/gremlin-python/src/main/jython/gremlin_python/driver/protocol.py
@@@ -85,13 -85,16 +86,15 @@@ class GremlinServerWSProtocol(AbstractB
  elif status_code == 204:
  result_set.stream.put_nowait([])
  del results_dict[request_id]
+ return status_code
  elif status_code in [200, 206]:
 -results = []
 -for msg in data["result"]["data"]:
 -results.append(
 -self._message_serializer.deserialize_message(msg))
 -result_set.stream.put_nowait(results)
 -if status_code == 200:
 +result_set.stream.put_nowait(data)
 +if status_code == 206:
 +message = self._transport.read()
 +self.data_received(message, results_dict)
 +else:
  del results_dict[request_id]
+ return status_code
  else:
  del results_dict[request_id]
  raise GremlinServerError(



[2/4] tinkerpop git commit: Merge branch 'TINKERPOP-1933' into tp32

2018-05-14 Thread davebshow
Merge branch 'TINKERPOP-1933' into tp32


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

Branch: refs/heads/master
Commit: fa3fb9eac88ca7b7f3669b18d097f0e69e09bfaf
Parents: 770375d 4c8717d
Author: davebshow <davebs...@gmail.com>
Authored: Mon May 14 12:09:21 2018 -0700
Committer: davebshow <davebs...@gmail.com>
Committed: Mon May 14 12:09:21 2018 -0700

--
 .../src/main/jython/gremlin_python/driver/connection.py  | 7 +--
 .../src/main/jython/gremlin_python/driver/protocol.py| 8 
 2 files changed, 9 insertions(+), 6 deletions(-)
--




[4/4] tinkerpop git commit: Merge branch 'tp33'

2018-05-14 Thread davebshow
Merge branch 'tp33'


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

Branch: refs/heads/master
Commit: d564631d8328f6f57d36a0a928347d5f3e8322f0
Parents: 34d42fe 7158768
Author: davebshow <davebs...@gmail.com>
Authored: Mon May 14 12:16:58 2018 -0700
Committer: davebshow <davebs...@gmail.com>
Committed: Mon May 14 12:16:58 2018 -0700

--
 .../src/main/jython/gremlin_python/driver/connection.py   | 7 +--
 .../src/main/jython/gremlin_python/driver/protocol.py | 7 +--
 2 files changed, 10 insertions(+), 4 deletions(-)
--




tinkerpop git commit: Don't use recursive calls for streaming response

2018-04-23 Thread davebshow
Repository: tinkerpop
Updated Branches:
  refs/heads/TINKERPOP-1933 [created] 4c8717dd4


Don't use recursive calls for streaming response


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

Branch: refs/heads/TINKERPOP-1933
Commit: 4c8717dd4e94ec248a959911d8c11f3b45b2d7b3
Parents: 268423d
Author: davebshow <davebs...@gmail.com>
Authored: Mon Apr 23 16:21:48 2018 -0700
Committer: davebshow <davebs...@gmail.com>
Committed: Mon Apr 23 16:21:48 2018 -0700

--
 .../src/main/jython/gremlin_python/driver/connection.py  | 7 +--
 .../src/main/jython/gremlin_python/driver/protocol.py| 8 
 2 files changed, 9 insertions(+), 6 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/4c8717dd/gremlin-python/src/main/jython/gremlin_python/driver/connection.py
--
diff --git a/gremlin-python/src/main/jython/gremlin_python/driver/connection.py 
b/gremlin-python/src/main/jython/gremlin_python/driver/connection.py
index abc4545..bff1904 100644
--- a/gremlin-python/src/main/jython/gremlin_python/driver/connection.py
+++ b/gremlin-python/src/main/jython/gremlin_python/driver/connection.py
@@ -73,6 +73,9 @@ class Connection:
 return future
 
 def _receive(self):
-data = self._transport.read()
-self._protocol.data_received(data, self._results)
+while True:
+data = self._transport.read()
+status_code = self._protocol.data_received(data, self._results)
+if status_code != 206:
+break
 self._pool.put_nowait(self)

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/4c8717dd/gremlin-python/src/main/jython/gremlin_python/driver/protocol.py
--
diff --git a/gremlin-python/src/main/jython/gremlin_python/driver/protocol.py 
b/gremlin-python/src/main/jython/gremlin_python/driver/protocol.py
index 84a7d82..2fc7c1b 100644
--- a/gremlin-python/src/main/jython/gremlin_python/driver/protocol.py
+++ b/gremlin-python/src/main/jython/gremlin_python/driver/protocol.py
@@ -80,21 +80,21 @@ class GremlinServerWSProtocol(AbstractBaseProtocol):
 {'sasl': base64.b64encode(auth).decode()})
 self.write(request_id, request_message)
 data = self._transport.read()
+# Allow recursive call for auth
 self.data_received(data, results_dict)
 elif status_code == 204:
 result_set.stream.put_nowait([])
 del results_dict[request_id]
+return status_code
 elif status_code in [200, 206]:
 results = []
 for msg in data["result"]["data"]:
 results.append(
 self._message_serializer.deserialize_message(msg))
 result_set.stream.put_nowait(results)
-if status_code == 206:
-data = self._transport.read()
-self.data_received(data, results_dict)
-else:
+if status_code == 200:
 del results_dict[request_id]
+return status_code
 else:
 del results_dict[request_id]
 raise GremlinServerError(



[2/2] tinkerpop git commit: Merge branch 'TINKERPOP-1875'

2018-02-05 Thread davebshow
Merge branch 'TINKERPOP-1875'


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

Branch: refs/heads/master
Commit: f5d67e4a4fc8a2d1a671d9ed76eaba6027654333
Parents: ebaad41 f0bbe7c
Author: davebshow <davebs...@gmail.com>
Authored: Mon Feb 5 18:49:31 2018 -0800
Committer: davebshow <davebs...@gmail.com>
Committed: Mon Feb 5 18:49:31 2018 -0800

--
 .../jython/gremlin_python/driver/protocol.py| 32 
 .../src/main/jython/tests/conftest.py   | 12 +---
 .../src/main/jython/tests/driver/test_client.py | 11 ---
 .../driver/test_driver_remote_connection.py |  4 +--
 4 files changed, 28 insertions(+), 31 deletions(-)
--




[1/2] tinkerpop git commit: added proper response message serialization, run all remote connection tests with graphson 2 and 3

2018-02-05 Thread davebshow
Repository: tinkerpop
Updated Branches:
  refs/heads/master ebaad41ed -> f5d67e4a4


added proper response message serialization, run all remote connection tests 
with graphson 2 and 3


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

Branch: refs/heads/master
Commit: f0bbe7c90f5f66028203f21dcf720bf0948f1950
Parents: e533b79
Author: davebshow <davebs...@gmail.com>
Authored: Wed Jan 24 13:14:03 2018 -0800
Committer: davebshow <davebs...@gmail.com>
Committed: Wed Jan 24 13:14:03 2018 -0800

--
 .../jython/gremlin_python/driver/protocol.py| 32 
 .../src/main/jython/tests/conftest.py   | 12 +---
 .../src/main/jython/tests/driver/test_client.py | 11 ---
 .../driver/test_driver_remote_connection.py |  4 +--
 4 files changed, 28 insertions(+), 31 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/f0bbe7c9/gremlin-python/src/main/jython/gremlin_python/driver/protocol.py
--
diff --git a/gremlin-python/src/main/jython/gremlin_python/driver/protocol.py 
b/gremlin-python/src/main/jython/gremlin_python/driver/protocol.py
index 75c99bc..1330483 100644
--- a/gremlin-python/src/main/jython/gremlin_python/driver/protocol.py
+++ b/gremlin-python/src/main/jython/gremlin_python/driver/protocol.py
@@ -65,12 +65,13 @@ class GremlinServerWSProtocol(AbstractBaseProtocol):
 request_id, request_message)
 self._transport.write(message)
 
-def data_received(self, data, results_dict):
-data = json.loads(data.decode('utf-8'))
-request_id = data['requestId']
+def data_received(self, message, results_dict):
+message = 
self._message_serializer.deserialize_message(json.loads(message.decode('utf-8')))
+request_id = message['requestId']
 result_set = results_dict[request_id]
-status_code = data['status']['code']
-aggregate_to = data['result']['meta'].get('aggregateTo', 'list')
+status_code = message['status']['code']
+aggregate_to = message['result']['meta'].get('aggregateTo', 'list')
+data = message['result']['data']
 result_set.aggregate_to = aggregate_to
 if status_code == 407:
 auth = b''.join([b'\x00', self._username.encode('utf-8'),
@@ -79,28 +80,19 @@ class GremlinServerWSProtocol(AbstractBaseProtocol):
 'traversal', 'authentication',
 {'sasl': base64.b64encode(auth).decode()})
 self.write(request_id, request_message)
-data = self._transport.read()
-self.data_received(data, results_dict)
+message = self._transport.read()
+self.data_received(message, results_dict)
 elif status_code == 204:
 result_set.stream.put_nowait([])
 del results_dict[request_id]
 elif status_code in [200, 206]:
-results = []
-# this is a bit of a hack for now. basically the protocol.py picks 
the json apart and doesn't
-# account for types too well right now.
-if self._message_serializer.version == 
b"application/vnd.gremlin-v2.0+json":
-for msg in data["result"]["data"]:
-results.append(
-self._message_serializer.deserialize_message(msg))
-else:
-results = 
self._message_serializer.deserialize_message(data["result"]["data"]["@value"])
-result_set.stream.put_nowait(results)
+result_set.stream.put_nowait(data)
 if status_code == 206:
-data = self._transport.read()
-self.data_received(data, results_dict)
+message = self._transport.read()
+self.data_received(message, results_dict)
 else:
 del results_dict[request_id]
 else:
 del results_dict[request_id]
 raise GremlinServerError(
-"{0}: {1}".format(status_code, data["status"]["message"]))
+"{0}: {1}".format(status_code, message["status"]["message"]))

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/f0bbe7c9/gremlin-python/src/main/jython/tests/conftest.py
--
diff --git a/gremlin-python/src/main/jython/tests/conftest.py 
b/gremlin-python/src/main/jython/tests/conftest.py
index 6fcb8db..9b12180 100644
--- a/gremlin-python/src/main/jyt

tinkerpop git commit: added proper response message serialization, run all remote connection tests with graphson 2 and 3

2018-01-24 Thread davebshow
Repository: tinkerpop
Updated Branches:
  refs/heads/TINKERPOP-1875 [created] f0bbe7c90


added proper response message serialization, run all remote connection tests 
with graphson 2 and 3


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

Branch: refs/heads/TINKERPOP-1875
Commit: f0bbe7c90f5f66028203f21dcf720bf0948f1950
Parents: e533b79
Author: davebshow <davebs...@gmail.com>
Authored: Wed Jan 24 13:14:03 2018 -0800
Committer: davebshow <davebs...@gmail.com>
Committed: Wed Jan 24 13:14:03 2018 -0800

--
 .../jython/gremlin_python/driver/protocol.py| 32 
 .../src/main/jython/tests/conftest.py   | 12 +---
 .../src/main/jython/tests/driver/test_client.py | 11 ---
 .../driver/test_driver_remote_connection.py |  4 +--
 4 files changed, 28 insertions(+), 31 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/f0bbe7c9/gremlin-python/src/main/jython/gremlin_python/driver/protocol.py
--
diff --git a/gremlin-python/src/main/jython/gremlin_python/driver/protocol.py 
b/gremlin-python/src/main/jython/gremlin_python/driver/protocol.py
index 75c99bc..1330483 100644
--- a/gremlin-python/src/main/jython/gremlin_python/driver/protocol.py
+++ b/gremlin-python/src/main/jython/gremlin_python/driver/protocol.py
@@ -65,12 +65,13 @@ class GremlinServerWSProtocol(AbstractBaseProtocol):
 request_id, request_message)
 self._transport.write(message)
 
-def data_received(self, data, results_dict):
-data = json.loads(data.decode('utf-8'))
-request_id = data['requestId']
+def data_received(self, message, results_dict):
+message = 
self._message_serializer.deserialize_message(json.loads(message.decode('utf-8')))
+request_id = message['requestId']
 result_set = results_dict[request_id]
-status_code = data['status']['code']
-aggregate_to = data['result']['meta'].get('aggregateTo', 'list')
+status_code = message['status']['code']
+aggregate_to = message['result']['meta'].get('aggregateTo', 'list')
+data = message['result']['data']
 result_set.aggregate_to = aggregate_to
 if status_code == 407:
 auth = b''.join([b'\x00', self._username.encode('utf-8'),
@@ -79,28 +80,19 @@ class GremlinServerWSProtocol(AbstractBaseProtocol):
 'traversal', 'authentication',
 {'sasl': base64.b64encode(auth).decode()})
 self.write(request_id, request_message)
-data = self._transport.read()
-self.data_received(data, results_dict)
+message = self._transport.read()
+self.data_received(message, results_dict)
 elif status_code == 204:
 result_set.stream.put_nowait([])
 del results_dict[request_id]
 elif status_code in [200, 206]:
-results = []
-# this is a bit of a hack for now. basically the protocol.py picks 
the json apart and doesn't
-# account for types too well right now.
-if self._message_serializer.version == 
b"application/vnd.gremlin-v2.0+json":
-for msg in data["result"]["data"]:
-results.append(
-self._message_serializer.deserialize_message(msg))
-else:
-results = 
self._message_serializer.deserialize_message(data["result"]["data"]["@value"])
-result_set.stream.put_nowait(results)
+result_set.stream.put_nowait(data)
 if status_code == 206:
-data = self._transport.read()
-self.data_received(data, results_dict)
+message = self._transport.read()
+self.data_received(message, results_dict)
 else:
 del results_dict[request_id]
 else:
 del results_dict[request_id]
 raise GremlinServerError(
-"{0}: {1}".format(status_code, data["status"]["message"]))
+"{0}: {1}".format(status_code, message["status"]["message"]))

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/f0bbe7c9/gremlin-python/src/main/jython/tests/conftest.py
--
diff --git a/gremlin-python/src/main/jython/tests/conftest.py 
b/gremlin-python/src/main/jython/tests/conftest.py
index 6fcb8db..9b12180 100644
--- a/gremlin-python/src/ma

tinkerpop git commit: CTR removed doubled changelog entry

2017-11-27 Thread davebshow
Repository: tinkerpop
Updated Branches:
  refs/heads/tp32 3db47e016 -> 8a76de7f5


CTR removed doubled changelog entry


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

Branch: refs/heads/tp32
Commit: 8a76de7f5ca68b2f66f666c41c57a27459002dcf
Parents: 3db47e0
Author: davebshow <davebs...@gmail.com>
Authored: Mon Nov 27 10:11:27 2017 -0800
Committer: davebshow <davebs...@gmail.com>
Committed: Mon Nov 27 10:11:27 2017 -0800

--
 CHANGELOG.asciidoc | 1 -
 1 file changed, 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/8a76de7f/CHANGELOG.asciidoc
--
diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc
index dd971de..bf865fa 100644
--- a/CHANGELOG.asciidoc
+++ b/CHANGELOG.asciidoc
@@ -33,7 +33,6 @@ 
image::https://raw.githubusercontent.com/apache/tinkerpop/master/docs/static/ima
 * Added test framework for GLVs.
 * Fixed bug in `TraversalHelper.replaceStep()` where the step being replaced 
needed to be removed prior to the new one being added.
 * Added alias support in the .NET `DriverRemoteConnection`.
-* `TraversalVertexProgram` ``profile()` now accounts for worker iteration in 
`GraphComputer` OLAP.
 * Added a test for self-edges and fixed `Neo4jVertex` to provided repeated 
self-edges on `BOTH`.
 * Better respected permissions on the `plugins.txt` file and prevented writing 
if marked as read-only.
 * Added getters for the lambdas held by `LambdaCollectingBarrierStep`, 
`LambdaFlatMapStep` and `LambdaSideEffectStep`.



[09/11] tinkerpop git commit: Merge branch 'TINKERPOP-1807' into tp32

2017-11-27 Thread davebshow
Merge branch 'TINKERPOP-1807' into tp32


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

Branch: refs/heads/master
Commit: 3db47e0162ef6330fe84e168591e9ab2f51b5725
Parents: 072b082 c0078cc
Author: davebshow <davebs...@gmail.com>
Authored: Mon Nov 27 09:45:41 2017 -0800
Committer: davebshow <davebs...@gmail.com>
Committed: Mon Nov 27 09:45:41 2017 -0800

--
 CHANGELOG.asciidoc  |  2 +
 .../upgrade/release-3.2.x-incubating.asciidoc   |  9 +++
 .../src/main/jython/gremlin_python/statics.py   |  9 +++
 .../gremlin_python/structure/io/graphson.py | 71 +++-
 .../jython/tests/structure/io/test_graphson.py  | 85 +++-
 5 files changed, 171 insertions(+), 5 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/3db47e01/CHANGELOG.asciidoc
--
diff --cc CHANGELOG.asciidoc
index 02c87ca,acfa892..dd971de
--- a/CHANGELOG.asciidoc
+++ b/CHANGELOG.asciidoc
@@@ -23,15 -23,8 +23,17 @@@ image::https://raw.githubusercontent.co
  [[release-3-2-7]]
  === TinkerPop 3.2.7 (Release Date: NOT OFFICIALLY RELEASED YET)
  
+ * Added core GraphSON classes for Gremlin-Python: `UUID`, `Date`, and 
`Timestamp`.
 +* Provided a method to configure detachment options with `EventStrategy`.
 +* Fixed a race condition in `TinkerIndex`.
 +* Fixed an `ArrayOutOfBoundsException` in `hasId()` for the rare situation 
when the provided collection is empty.
 +* Bump to Netty 4.0.52
 +* `TraversalVertexProgram` `profile()` now accounts for worker iteration in 
`GraphComputer` OLAP.
 +* Returned the `Builder` instance from the `DetachedEdge.Builder` methods of 
`setOutE` and `setOutV`.
 +* Added test framework for GLVs.
 +* Fixed bug in `TraversalHelper.replaceStep()` where the step being replaced 
needed to be removed prior to the new one being added.
 +* Added alias support in the .NET `DriverRemoteConnection`.
+ * `TraversalVertexProgram` ``profile()` now accounts for worker iteration in 
`GraphComputer` OLAP.
  * Added a test for self-edges and fixed `Neo4jVertex` to provided repeated 
self-edges on `BOTH`.
  * Better respected permissions on the `plugins.txt` file and prevented 
writing if marked as read-only.
  * Added getters for the lambdas held by `LambdaCollectingBarrierStep`, 
`LambdaFlatMapStep` and `LambdaSideEffectStep`.

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/3db47e01/docs/src/upgrade/release-3.2.x-incubating.asciidoc
--
diff --cc docs/src/upgrade/release-3.2.x-incubating.asciidoc
index 1589069,9be51f9..a8b5ad6
--- a/docs/src/upgrade/release-3.2.x-incubating.asciidoc
+++ b/docs/src/upgrade/release-3.2.x-incubating.asciidoc
@@@ -29,16 -29,15 +29,25 @@@ image::https://raw.githubusercontent.co
  
  Please see the 
link:https://github.com/apache/tinkerpop/blob/3.2.7/CHANGELOG.asciidoc#release-3-2-7[changelog]
 for a complete list of all the modifications that are part of this release.
  
+  Gremlin-Python Core Types
+ With the addition of `UUID`, `Date`, and `Timestamp`, Gremlin-Python now 
implements serializers for all core GraphSON types. Users
+ that were using other types to represent this data can now use the Python 
classes `datetime.datetime` and`uuid.UUID` in GLV traversals.
+ Since Python does not support a native `Timestamp` object, Gremlin-Python now 
offers a dummy class `Timestamp`, which allows
+ users to wrap a float and submit it to the Gremlin Server as a `Timestamp` 
GraphSON type. `Timestamp` can be found in
+ `gremlin_python.statics`.
+ 
+ See: link:https://issues.apache.org/jira/browse/TINKERPOP-1807[TINKERPOP-1807]
+ 
 + EventStrategy Detachment
 +
 +`EventStrategy` forced detachment of mutated elements prior to raising them 
in events. While this was a desired
 +outcome, it may not have always fit every use case. For example, a user may 
have wanted a reference element or the
 +actual element itself. As a result, `EventStrategy` has changed to allow it 
to be constructed with a `detach()`
 +option, where it is possible to specify any of the following: `null` for no 
detachment, `DetachedFactory` for the
 +original behavior, and `ReferenceFactory` for detachment that returns 
reference elements.
 +
 +See: link:https://issues.apache.org/jira/browse/TINKERPOP-1829[TINKERPOP-1829]
 +
   Embedded Remote Connection
  
  As Gremlin Language Variants (GLVs) expand their usage and use of 
`withRemote()` becomes more common, the need to mock



[4/4] tinkerpop git commit: Merge branch 'TINKERPOP-1807' into tp32

2017-11-27 Thread davebshow
Merge branch 'TINKERPOP-1807' into tp32


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

Branch: refs/heads/tp32
Commit: 3db47e0162ef6330fe84e168591e9ab2f51b5725
Parents: 072b082 c0078cc
Author: davebshow <davebs...@gmail.com>
Authored: Mon Nov 27 09:45:41 2017 -0800
Committer: davebshow <davebs...@gmail.com>
Committed: Mon Nov 27 09:45:41 2017 -0800

--
 CHANGELOG.asciidoc  |  2 +
 .../upgrade/release-3.2.x-incubating.asciidoc   |  9 +++
 .../src/main/jython/gremlin_python/statics.py   |  9 +++
 .../gremlin_python/structure/io/graphson.py | 71 +++-
 .../jython/tests/structure/io/test_graphson.py  | 85 +++-
 5 files changed, 171 insertions(+), 5 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/3db47e01/CHANGELOG.asciidoc
--
diff --cc CHANGELOG.asciidoc
index 02c87ca,acfa892..dd971de
--- a/CHANGELOG.asciidoc
+++ b/CHANGELOG.asciidoc
@@@ -23,15 -23,8 +23,17 @@@ image::https://raw.githubusercontent.co
  [[release-3-2-7]]
  === TinkerPop 3.2.7 (Release Date: NOT OFFICIALLY RELEASED YET)
  
+ * Added core GraphSON classes for Gremlin-Python: `UUID`, `Date`, and 
`Timestamp`.
 +* Provided a method to configure detachment options with `EventStrategy`.
 +* Fixed a race condition in `TinkerIndex`.
 +* Fixed an `ArrayOutOfBoundsException` in `hasId()` for the rare situation 
when the provided collection is empty.
 +* Bump to Netty 4.0.52
 +* `TraversalVertexProgram` `profile()` now accounts for worker iteration in 
`GraphComputer` OLAP.
 +* Returned the `Builder` instance from the `DetachedEdge.Builder` methods of 
`setOutE` and `setOutV`.
 +* Added test framework for GLVs.
 +* Fixed bug in `TraversalHelper.replaceStep()` where the step being replaced 
needed to be removed prior to the new one being added.
 +* Added alias support in the .NET `DriverRemoteConnection`.
+ * `TraversalVertexProgram` ``profile()` now accounts for worker iteration in 
`GraphComputer` OLAP.
  * Added a test for self-edges and fixed `Neo4jVertex` to provided repeated 
self-edges on `BOTH`.
  * Better respected permissions on the `plugins.txt` file and prevented 
writing if marked as read-only.
  * Added getters for the lambdas held by `LambdaCollectingBarrierStep`, 
`LambdaFlatMapStep` and `LambdaSideEffectStep`.

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/3db47e01/docs/src/upgrade/release-3.2.x-incubating.asciidoc
--
diff --cc docs/src/upgrade/release-3.2.x-incubating.asciidoc
index 1589069,9be51f9..a8b5ad6
--- a/docs/src/upgrade/release-3.2.x-incubating.asciidoc
+++ b/docs/src/upgrade/release-3.2.x-incubating.asciidoc
@@@ -29,16 -29,15 +29,25 @@@ image::https://raw.githubusercontent.co
  
  Please see the 
link:https://github.com/apache/tinkerpop/blob/3.2.7/CHANGELOG.asciidoc#release-3-2-7[changelog]
 for a complete list of all the modifications that are part of this release.
  
+  Gremlin-Python Core Types
+ With the addition of `UUID`, `Date`, and `Timestamp`, Gremlin-Python now 
implements serializers for all core GraphSON types. Users
+ that were using other types to represent this data can now use the Python 
classes `datetime.datetime` and`uuid.UUID` in GLV traversals.
+ Since Python does not support a native `Timestamp` object, Gremlin-Python now 
offers a dummy class `Timestamp`, which allows
+ users to wrap a float and submit it to the Gremlin Server as a `Timestamp` 
GraphSON type. `Timestamp` can be found in
+ `gremlin_python.statics`.
+ 
+ See: link:https://issues.apache.org/jira/browse/TINKERPOP-1807[TINKERPOP-1807]
+ 
 + EventStrategy Detachment
 +
 +`EventStrategy` forced detachment of mutated elements prior to raising them 
in events. While this was a desired
 +outcome, it may not have always fit every use case. For example, a user may 
have wanted a reference element or the
 +actual element itself. As a result, `EventStrategy` has changed to allow it 
to be constructed with a `detach()`
 +option, where it is possible to specify any of the following: `null` for no 
detachment, `DetachedFactory` for the
 +original behavior, and `ReferenceFactory` for detachment that returns 
reference elements.
 +
 +See: link:https://issues.apache.org/jira/browse/TINKERPOP-1829[TINKERPOP-1829]
 +
   Embedded Remote Connection
  
  As Gremlin Language Variants (GLVs) expand their usage and use of 
`withRemote()` becomes more common, the need to mock



[2/4] tinkerpop git commit: updated changelog and upgrade docs

2017-11-27 Thread davebshow
updated changelog and upgrade docs


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

Branch: refs/heads/tp32
Commit: 4661284292306fecb67fbcc46617af97b3b7762f
Parents: 3b651ff
Author: davebshow <davebs...@gmail.com>
Authored: Tue Nov 7 09:40:05 2017 -0800
Committer: davebshow <davebs...@gmail.com>
Committed: Tue Nov 7 09:40:05 2017 -0800

--
 CHANGELOG.asciidoc | 1 +
 docs/src/upgrade/release-3.2.x-incubating.asciidoc | 9 +
 2 files changed, 10 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/46612842/CHANGELOG.asciidoc
--
diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc
index fcba906..acfa892 100644
--- a/CHANGELOG.asciidoc
+++ b/CHANGELOG.asciidoc
@@ -23,6 +23,7 @@ 
image::https://raw.githubusercontent.com/apache/tinkerpop/master/docs/static/ima
 [[release-3-2-7]]
 === TinkerPop 3.2.7 (Release Date: NOT OFFICIALLY RELEASED YET)
 
+* Added core GraphSON classes for Gremlin-Python: `UUID`, `Date`, and 
`Timestamp`.
 * `TraversalVertexProgram` ``profile()` now accounts for worker iteration in 
`GraphComputer` OLAP.
 * Added a test for self-edges and fixed `Neo4jVertex` to provided repeated 
self-edges on `BOTH`.
 * Better respected permissions on the `plugins.txt` file and prevented writing 
if marked as read-only.

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/46612842/docs/src/upgrade/release-3.2.x-incubating.asciidoc
--
diff --git a/docs/src/upgrade/release-3.2.x-incubating.asciidoc 
b/docs/src/upgrade/release-3.2.x-incubating.asciidoc
index 60fd320..9be51f9 100644
--- a/docs/src/upgrade/release-3.2.x-incubating.asciidoc
+++ b/docs/src/upgrade/release-3.2.x-incubating.asciidoc
@@ -29,6 +29,15 @@ 
image::https://raw.githubusercontent.com/apache/tinkerpop/master/docs/static/ima
 
 Please see the 
link:https://github.com/apache/tinkerpop/blob/3.2.7/CHANGELOG.asciidoc#release-3-2-7[changelog]
 for a complete list of all the modifications that are part of this release.
 
+ Gremlin-Python Core Types
+With the addition of `UUID`, `Date`, and `Timestamp`, Gremlin-Python now 
implements serializers for all core GraphSON types. Users
+that were using other types to represent this data can now use the Python 
classes `datetime.datetime` and`uuid.UUID` in GLV traversals.
+Since Python does not support a native `Timestamp` object, Gremlin-Python now 
offers a dummy class `Timestamp`, which allows
+users to wrap a float and submit it to the Gremlin Server as a `Timestamp` 
GraphSON type. `Timestamp` can be found in
+`gremlin_python.statics`.
+
+See: link:https://issues.apache.org/jira/browse/TINKERPOP-1807[TINKERPOP-1807]
+
  Embedded Remote Connection
 
 As Gremlin Language Variants (GLVs) expand their usage and use of 
`withRemote()` becomes more common, the need to mock



[05/11] tinkerpop git commit: added core GraphSON types UUID, Date, and Timestamp for GraphSON 3

2017-11-27 Thread davebshow
added core GraphSON types UUID, Date, and Timestamp for GraphSON 3


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

Branch: refs/heads/master
Commit: 5031ccdbea28b1384c40fd522e9fec25b5b86818
Parents: d6f031f c0078cc
Author: davebshow <davebs...@gmail.com>
Authored: Wed Nov 15 10:12:22 2017 -0800
Committer: davebshow <davebs...@gmail.com>
Committed: Wed Nov 15 10:12:22 2017 -0800

--
 CHANGELOG.asciidoc  |  2 +
 .../upgrade/release-3.2.x-incubating.asciidoc   |  9 ++
 docs/src/upgrade/release-3.3.x.asciidoc |  9 ++
 .../src/main/jython/gremlin_python/statics.py   |  9 ++
 .../gremlin_python/structure/io/graphsonV2d0.py | 71 +++-
 .../gremlin_python/structure/io/graphsonV3d0.py | 75 -
 .../tests/structure/io/test_graphsonV2d0.py | 87 ++--
 .../tests/structure/io/test_graphsonV3d0.py | 83 ++-
 8 files changed, 331 insertions(+), 14 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/5031ccdb/CHANGELOG.asciidoc
--
diff --cc CHANGELOG.asciidoc
index ce65af6,acfa892..49c9a5b
--- a/CHANGELOG.asciidoc
+++ b/CHANGELOG.asciidoc
@@@ -246,11 -23,8 +246,13 @@@ image::https://raw.githubusercontent.co
  [[release-3-2-7]]
  === TinkerPop 3.2.7 (Release Date: NOT OFFICIALLY RELEASED YET)
  
+ * Added core GraphSON classes for Gremlin-Python: `UUID`, `Date`, and 
`Timestamp`.
 +* Provided a method to configure detachment options with `EventStrategy`.
 +* Fixed a race condition in `TinkerIndex`.
 +* Fixed an `ArrayOutOfBoundsException` in `hasId()` for the rare situation 
when the provided collection is empty.
 +* Bump to Netty 4.0.52
 +* `TraversalVertexProgram` `profile()` now accounts for worker iteration in 
`GraphComputer` OLAP.
+ * `TraversalVertexProgram` ``profile()` now accounts for worker iteration in 
`GraphComputer` OLAP.
  * Added a test for self-edges and fixed `Neo4jVertex` to provided repeated 
self-edges on `BOTH`.
  * Better respected permissions on the `plugins.txt` file and prevented 
writing if marked as read-only.
  * Added getters for the lambdas held by `LambdaCollectingBarrierStep`, 
`LambdaFlatMapStep` and `LambdaSideEffectStep`.

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/5031ccdb/docs/src/upgrade/release-3.2.x-incubating.asciidoc
--
diff --cc docs/src/upgrade/release-3.2.x-incubating.asciidoc
index 5564eec,9be51f9..8745ce5
--- a/docs/src/upgrade/release-3.2.x-incubating.asciidoc
+++ b/docs/src/upgrade/release-3.2.x-incubating.asciidoc
@@@ -29,16 -29,15 +29,25 @@@ image::https://raw.githubusercontent.co
  
  Please see the 
link:https://github.com/apache/tinkerpop/blob/3.2.7/CHANGELOG.asciidoc#release-3-2-7[changelog]
 for a complete list of all the modifications that are part of this release.
  
+  Gremlin-Python Core Types
+ With the addition of `UUID`, `Date`, and `Timestamp`, Gremlin-Python now 
implements serializers for all core GraphSON types. Users
+ that were using other types to represent this data can now use the Python 
classes `datetime.datetime` and`uuid.UUID` in GLV traversals.
+ Since Python does not support a native `Timestamp` object, Gremlin-Python now 
offers a dummy class `Timestamp`, which allows
+ users to wrap a float and submit it to the Gremlin Server as a `Timestamp` 
GraphSON type. `Timestamp` can be found in
+ `gremlin_python.statics`.
+ 
+ See: link:https://issues.apache.org/jira/browse/TINKERPOP-1807[TINKERPOP-1807]
+ 
 + EventStrategy Detachment
 +
 +`EventStrategy` forced detachment of mutated elements prior to raising them 
in events. While this was a desired
 +outcome, it may not have always fit every use case. For example, a user may 
have wanted a reference element or the
 +actual element itself. As a result, `EventStrategy` has changed to allow it 
to be constructed with a `detach()`
 +option, where it is possible to specify any of the following: `null` for no 
detachment, `DetachedFactory` for the
 +original behavior, and `ReferenceFactory` for detachment that returns 
reference elements.
 +
 +See: link:https://issues.apache.org/jira/browse/TINKERPOP-1829[TINKERPOP-1829]
 +
   Embedded Remote Connection
  
  As Gremlin Language Variants (GLVs) expand their usage and use of 
`withRemote()` becomes more common, the need to mock

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/5031ccdb/docs/src/upgrade/release-3.3.x.asciidoc
--
diff --cc docs

[04/11] tinkerpop git commit: added core GraphSON types UUID, Date, and Timestamp for GraphSON 3

2017-11-27 Thread davebshow
http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/5031ccdb/gremlin-python/src/main/jython/tests/structure/io/test_graphsonV2d0.py
--
diff --cc gremlin-python/src/main/jython/tests/structure/io/test_graphsonV2d0.py
index 8f6285f,000..19448d9
mode 100644,00..100644
--- a/gremlin-python/src/main/jython/tests/structure/io/test_graphsonV2d0.py
+++ b/gremlin-python/src/main/jython/tests/structure/io/test_graphsonV2d0.py
@@@ -1,294 -1,0 +1,371 @@@
- '''
++"""
 +Licensed to the Apache Software Foundation (ASF) under one
 +or more contributor license agreements.  See the NOTICE file
 +distributed with this work for additional information
 +regarding copyright ownership.  The ASF licenses this file
 +to you under the Apache License, Version 2.0 (the
 +"License"); you may not use this file except in compliance
 +with the License.  You may obtain a copy of the License at
 +
 +http://www.apache.org/licenses/LICENSE-2.0
 +
 +Unless required by applicable law or agreed to in writing,
 +software distributed under the License is distributed on an
 +"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
 +KIND, either express or implied.  See the License for the
 +specific language governing permissions and limitations
 +under the License.
- '''
++"""
 +
 +__author__ = 'Marko A. Rodriguez (http://markorodriguez.com)'
 +
- import sys
++import datetime
 +import json
++import uuid
++
 +from mock import Mock
 +
 +import six
 +
 +from gremlin_python.statics import *
- from gremlin_python.structure.graph import Vertex, Edge, Property, 
VertexProperty
- from gremlin_python.structure.graph import Path
++from gremlin_python.structure.graph import Vertex, Edge, Property, 
VertexProperty, Graph, Path
 +from gremlin_python.structure.io.graphsonV2d0 import GraphSONWriter, 
GraphSONReader, GraphSONUtil
 +import gremlin_python.structure.io.graphsonV2d0
++
 +from gremlin_python.process.traversal import P
 +from gremlin_python.process.strategies import SubgraphStrategy
 +from gremlin_python.process.graph_traversal import __
 +
 +
 +class TestGraphSONReader(object):
 +graphson_reader = GraphSONReader()
 +
 +def test_number_input(self):
 +x = self.graphson_reader.readObject(json.dumps({
 +"@type": "g:Int32",
 +"@value": 31
 +}))
 +assert isinstance(x, int)
 +assert 31 == x
 +##
 +x = self.graphson_reader.readObject(json.dumps({
 +"@type": "g:Int64",
 +"@value": 31
 +}))
 +assert isinstance(x, long)
 +assert long(31) == x
 +##
 +x = self.graphson_reader.readObject(json.dumps({
 +"@type": "g:Float",
 +"@value": 31.3
 +}))
 +assert isinstance(x, float)
 +assert 31.3 == x
 +##
 +x = self.graphson_reader.readObject(json.dumps({
 +"@type": "g:Double",
 +"@value": 31.2
 +}))
 +assert isinstance(x, float)
 +assert 31.2 == x
 +
 +def test_graph(self):
 +vertex = self.graphson_reader.readObject("""
 +{"@type":"g:Vertex", 
"@value":{"id":{"@type":"g:Int32","@value":1},"label":"person","outE":{"created":[{"id":{"@type":"g:Int32","@value":9},"inV":{"@type":"g:Int32","@value":3},"properties":{"weight":{"@type":"g:Double","@value":0.4}}}],"knows":[{"id":{"@type":"g:Int32","@value":7},"inV":{"@type":"g:Int32","@value":2},"properties":{"weight":{"@type":"g:Double","@value":0.5}}},{"id":{"@type":"g:Int32","@value":8},"inV":{"@type":"g:Int32","@value":4},"properties":{"weight":{"@type":"g:Double","@value":1.0}}}]},"properties":{"name":[{"id":{"@type":"g:Int64","@value":0},"value":"marko"}],"age":[{"id":{"@type":"g:Int64","@value":1},"value":{"@type":"g:Int32","@value":29}}]}}}""")
 +assert isinstance(vertex, Vertex)
 +assert "person" == vertex.label
 +assert 1 == vertex.id
 +assert isinstance(vertex.id, int)
 +assert vertex == Vertex(1)
 +##
 +vertex = self.graphson_reader.readObject("""
 +{"@type":"g:Vertex", 
"@value":{"id":{"@type":"g:Float","@value":45.23}}}""")
 +assert isinstance(vertex, Vertex)
 +assert 45.23 == vertex.id
 +assert isinstance(vertex.id, FloatType)
 +assert "vertex" == vertex.label
 +assert vertex == Vertex(45.23)
 +##
 +vertex_property = self.graphson_reader.readObject("""
 +{"@type":"g:VertexProperty", 
"@value":{"id":"anId","label":"aKey","value":true,"vertex":{"@type":"g:Int32","@value":9}}}""")
 +assert isinstance(vertex_property, VertexProperty)
 +assert "anId" == vertex_property.id
 +assert "aKey" == vertex_property.label
 +assert vertex_property.value
 +assert vertex_property.vertex == Vertex(9)
 +##
 +vertex_property = self.graphson_reader.readObject("""
 +{"@type":"g:VertexProperty", 

[1/4] tinkerpop git commit: Implemented support for missing core GraphSON types in gremlin-python

2017-11-27 Thread davebshow
Repository: tinkerpop
Updated Branches:
  refs/heads/tp32 072b08214 -> 3db47e016


Implemented support for missing core GraphSON types in gremlin-python


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

Branch: refs/heads/tp32
Commit: 3b651ff58cdf210a63a0101d0a311c7076de2b0e
Parents: f2b4fb9
Author: davebshow <davebs...@gmail.com>
Authored: Wed Nov 1 16:31:10 2017 -0700
Committer: davebshow <davebs...@gmail.com>
Committed: Wed Nov 1 16:31:10 2017 -0700

--
 .../src/main/jython/gremlin_python/statics.py   |  9 +++
 .../gremlin_python/structure/io/graphson.py | 71 -
 .../jython/tests/structure/io/test_graphson.py  | 81 +++-
 3 files changed, 156 insertions(+), 5 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/3b651ff5/gremlin-python/src/main/jython/gremlin_python/statics.py
--
diff --git a/gremlin-python/src/main/jython/gremlin_python/statics.py 
b/gremlin-python/src/main/jython/gremlin_python/statics.py
index a1abf8e..f98347e 100644
--- a/gremlin-python/src/main/jython/gremlin_python/statics.py
+++ b/gremlin-python/src/main/jython/gremlin_python/statics.py
@@ -36,6 +36,15 @@ else:
 from types import LongType
 from types import TypeType
 
+
+class timestamp(float):
+"""
+In Python a timestamp is simply a float. This dummy class (similar to 
long), allows users to wrap a float
+in a GLV script to make sure the value is serialized as a GraphSON 
timestamp.
+"""
+pass
+
+
 staticMethods = {}
 staticEnums = {}
 default_lambda_language = "gremlin-python"

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/3b651ff5/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 0daeffa..04085ee 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
@@ -16,11 +16,15 @@ KIND, either express or implied.  See the License for the
 specific language governing permissions and limitations
 under the License.
 '''
-from aenum import Enum
+import datetime
 import json
-import six
+import time
+import uuid
 from collections import OrderedDict
 
+import six
+from aenum import Enum
+
 from gremlin_python import statics
 from gremlin_python.statics import FloatType, FunctionType, IntType, LongType, 
TypeType
 from gremlin_python.process.traversal import Binding, Bytecode, P, Traversal, 
Traverser, TraversalStrategy
@@ -298,6 +302,69 @@ class TypeSerializer(_GraphSONTypeIO):
 return writer.toDict(typ())
 
 
+class UUIDIO(_GraphSONTypeIO):
+python_type = uuid.UUID
+graphson_type = "g:UUID"
+graphson_base_type = "UUID"
+
+@classmethod
+def dictify(cls, obj, writer):
+return GraphSONUtil.typedValue(cls.graphson_base_type, str(obj))
+
+@classmethod
+def objectify(cls, d, reader):
+return cls.python_type(d)
+
+
+class DateIO(_GraphSONTypeIO):
+python_type = datetime.datetime
+graphson_type = "g:Date"
+graphson_base_type = "Date"
+
+@classmethod
+def dictify(cls, obj, writer):
+# Java timestamp expects miliseconds
+if six.PY3:
+pts = obj.timestamp()
+else:
+# Hack for legacy Python
+# Taken from:
+# 
https://github.com/jaraco/backports.datetime_timestamp/blob/master/backports/datetime_timestamp/__init__.py
+pts = time.mktime((obj.year, obj.month, obj.day,
+  obj.hour, obj.minute, obj.second,
+  -1, -1, -1)) + obj.microsecond / 1e6
+
+# Have to use int because of legacy Python
+ts = int(round(pts * 1000))
+return GraphSONUtil.typedValue(cls.graphson_base_type, ts)
+
+@classmethod
+def objectify(cls, ts, reader):
+# Python timestamp expects seconds
+return datetime.datetime.fromtimestamp(ts / 1000.0)
+
+
+# Based on current implementation, this class must always be declared before 
FloatIO.
+# Seems pretty fragile for future maintainers. Maybe look into this.
+class TimestampIO(_GraphSONTypeIO):
+"""A timestamp in Python is type float"""
+python_type = statics.timestamp
+

[08/11] tinkerpop git commit: removed upgrading docs for 3.3.1. Inclusion in 3.2.7 is enough

2017-11-27 Thread davebshow
removed upgrading docs for 3.3.1. Inclusion in 3.2.7 is enough


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

Branch: refs/heads/master
Commit: 979057485fe62d33e754965582bdd687a4babba0
Parents: 80624fc
Author: davebshow <davebs...@gmail.com>
Authored: Fri Nov 17 09:36:22 2017 -0800
Committer: davebshow <davebs...@gmail.com>
Committed: Fri Nov 17 09:36:22 2017 -0800

--
 docs/src/upgrade/release-3.3.x.asciidoc | 9 -
 1 file changed, 9 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/97905748/docs/src/upgrade/release-3.3.x.asciidoc
--
diff --git a/docs/src/upgrade/release-3.3.x.asciidoc 
b/docs/src/upgrade/release-3.3.x.asciidoc
index 4aaca6a..80aff8b 100644
--- a/docs/src/upgrade/release-3.3.x.asciidoc
+++ b/docs/src/upgrade/release-3.3.x.asciidoc
@@ -29,15 +29,6 @@ Please see the 
link:https://github.com/apache/tinkerpop/blob/3.3.1/CHANGELOG.asc
 
 === Upgrading for Users
 
- Gremlin-Python Core Types
-With the addition of `UUID`, `Date`, and `Timestamp`, Gremlin-Python now 
implements serializers for all core GraphSON types. Users
-that were using other types to represent this data can now use the Python 
classes `datetime.datetime` and`uuid.UUID` in GLV traversals.
-Since Python does not support a native `Timestamp` object, Gremlin-Python now 
offers a dummy class `Timestamp`, which allows
-users to wrap a float and submit it to the Gremlin Server as a `Timestamp` 
GraphSON type. `Timestamp` can be found in
-`gremlin_python.statics`.
-
-See: link:https://issues.apache.org/jira/browse/TINKERPOP-1807[TINKERPOP-1807]
-
  Gremlin Python path()
 
 There was a bug in GraphSON 3.0 serialization that prevented proper handling 
of results contain `Path` object. As a



[06/11] tinkerpop git commit: fixed typo in changelog

2017-11-27 Thread davebshow
fixed typo in changelog


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

Branch: refs/heads/master
Commit: ed6133e502e573650a39a6ac96c4a901e168c2e6
Parents: 5031ccd
Author: davebshow <davebs...@gmail.com>
Authored: Wed Nov 15 10:17:34 2017 -0800
Committer: davebshow <davebs...@gmail.com>
Committed: Wed Nov 15 10:17:34 2017 -0800

--
 CHANGELOG.asciidoc | 1 -
 1 file changed, 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/ed6133e5/CHANGELOG.asciidoc
--
diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc
index 49c9a5b..049c999 100644
--- a/CHANGELOG.asciidoc
+++ b/CHANGELOG.asciidoc
@@ -252,7 +252,6 @@ 
image::https://raw.githubusercontent.com/apache/tinkerpop/master/docs/static/ima
 * Fixed an `ArrayOutOfBoundsException` in `hasId()` for the rare situation 
when the provided collection is empty.
 * Bump to Netty 4.0.52
 * `TraversalVertexProgram` `profile()` now accounts for worker iteration in 
`GraphComputer` OLAP.
-* `TraversalVertexProgram` ``profile()` now accounts for worker iteration in 
`GraphComputer` OLAP.
 * Added a test for self-edges and fixed `Neo4jVertex` to provided repeated 
self-edges on `BOTH`.
 * Better respected permissions on the `plugins.txt` file and prevented writing 
if marked as read-only.
 * Added getters for the lambdas held by `LambdaCollectingBarrierStep`, 
`LambdaFlatMapStep` and `LambdaSideEffectStep`.



[11/11] tinkerpop git commit: Merge branch 'tp32'

2017-11-27 Thread davebshow
Merge branch 'tp32'


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

Branch: refs/heads/master
Commit: 39c6e6566ce604e056658ee99bb9333a607ac845
Parents: 9d7bb91 3db47e0
Author: davebshow <davebs...@gmail.com>
Authored: Mon Nov 27 09:48:33 2017 -0800
Committer: davebshow <davebs...@gmail.com>
Committed: Mon Nov 27 09:48:33 2017 -0800

--
 CHANGELOG.asciidoc | 1 +
 1 file changed, 1 insertion(+)
--


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/39c6e656/CHANGELOG.asciidoc
--



[3/4] tinkerpop git commit: added asserts to check values are deserialized as expected

2017-11-27 Thread davebshow
added asserts to check values are deserialized as expected


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

Branch: refs/heads/tp32
Commit: c0078cc172e918f96460630da27ff04cb4e9478d
Parents: 4661284
Author: davebshow <davebs...@gmail.com>
Authored: Mon Nov 13 10:11:46 2017 -0800
Committer: davebshow <davebs...@gmail.com>
Committed: Mon Nov 13 10:11:46 2017 -0800

--
 .../src/main/jython/tests/structure/io/test_graphson.py  | 4 
 1 file changed, 4 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/c0078cc1/gremlin-python/src/main/jython/tests/structure/io/test_graphson.py
--
diff --git a/gremlin-python/src/main/jython/tests/structure/io/test_graphson.py 
b/gremlin-python/src/main/jython/tests/structure/io/test_graphson.py
index 75e7136..68d14ca 100644
--- a/gremlin-python/src/main/jython/tests/structure/io/test_graphson.py
+++ b/gremlin-python/src/main/jython/tests/structure/io/test_graphson.py
@@ -128,15 +128,18 @@ class TestGraphSONReader(object):
 def test_datetime(self):
 dt = self.graphson_reader.readObject(json.dumps({"@type": "g:Date", 
"@value": 1481750076295}))
 assert isinstance(dt, datetime.datetime)
+assert dt == datetime.datetime(2016, 12, 14, 13, 14, 36, 295000)
 
 def test_timestamp(self):
 dt = self.graphson_reader.readObject(json.dumps({"@type": 
"g:Timestamp", "@value": 1481750076295}))
 assert isinstance(dt, timestamp)
+assert float(dt) == 1481750076.295
 
 def test_uuid(self):
 prop = self.graphson_reader.readObject(
 json.dumps({'@type': 'g:UUID', '@value': 
"41d2e28a-20a4-4ab0-b379-d810dede3786"}))
 assert isinstance(prop, uuid.UUID)
+assert str(prop) == '41d2e28a-20a4-4ab0-b379-d810dede3786'
 
 
 class TestGraphSONWriter(object):
@@ -260,6 +263,7 @@ class TestGraphSONWriter(object):
 output = self.graphson_writer.writeObject(prop)
 assert expected == output
 
+
 class TestFunctionalGraphSONIO(object):
 """Functional IO tests"""
 



[03/11] tinkerpop git commit: added asserts to check values are deserialized as expected

2017-11-27 Thread davebshow
added asserts to check values are deserialized as expected


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

Branch: refs/heads/master
Commit: c0078cc172e918f96460630da27ff04cb4e9478d
Parents: 4661284
Author: davebshow <davebs...@gmail.com>
Authored: Mon Nov 13 10:11:46 2017 -0800
Committer: davebshow <davebs...@gmail.com>
Committed: Mon Nov 13 10:11:46 2017 -0800

--
 .../src/main/jython/tests/structure/io/test_graphson.py  | 4 
 1 file changed, 4 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/c0078cc1/gremlin-python/src/main/jython/tests/structure/io/test_graphson.py
--
diff --git a/gremlin-python/src/main/jython/tests/structure/io/test_graphson.py 
b/gremlin-python/src/main/jython/tests/structure/io/test_graphson.py
index 75e7136..68d14ca 100644
--- a/gremlin-python/src/main/jython/tests/structure/io/test_graphson.py
+++ b/gremlin-python/src/main/jython/tests/structure/io/test_graphson.py
@@ -128,15 +128,18 @@ class TestGraphSONReader(object):
 def test_datetime(self):
 dt = self.graphson_reader.readObject(json.dumps({"@type": "g:Date", 
"@value": 1481750076295}))
 assert isinstance(dt, datetime.datetime)
+assert dt == datetime.datetime(2016, 12, 14, 13, 14, 36, 295000)
 
 def test_timestamp(self):
 dt = self.graphson_reader.readObject(json.dumps({"@type": 
"g:Timestamp", "@value": 1481750076295}))
 assert isinstance(dt, timestamp)
+assert float(dt) == 1481750076.295
 
 def test_uuid(self):
 prop = self.graphson_reader.readObject(
 json.dumps({'@type': 'g:UUID', '@value': 
"41d2e28a-20a4-4ab0-b379-d810dede3786"}))
 assert isinstance(prop, uuid.UUID)
+assert str(prop) == '41d2e28a-20a4-4ab0-b379-d810dede3786'
 
 
 class TestGraphSONWriter(object):
@@ -260,6 +263,7 @@ class TestGraphSONWriter(object):
 output = self.graphson_writer.writeObject(prop)
 assert expected == output
 
+
 class TestFunctionalGraphSONIO(object):
 """Functional IO tests"""
 



[01/11] tinkerpop git commit: Implemented support for missing core GraphSON types in gremlin-python

2017-11-27 Thread davebshow
Repository: tinkerpop
Updated Branches:
  refs/heads/master bb67594cb -> 39c6e6566


Implemented support for missing core GraphSON types in gremlin-python


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

Branch: refs/heads/master
Commit: 3b651ff58cdf210a63a0101d0a311c7076de2b0e
Parents: f2b4fb9
Author: davebshow <davebs...@gmail.com>
Authored: Wed Nov 1 16:31:10 2017 -0700
Committer: davebshow <davebs...@gmail.com>
Committed: Wed Nov 1 16:31:10 2017 -0700

--
 .../src/main/jython/gremlin_python/statics.py   |  9 +++
 .../gremlin_python/structure/io/graphson.py | 71 -
 .../jython/tests/structure/io/test_graphson.py  | 81 +++-
 3 files changed, 156 insertions(+), 5 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/3b651ff5/gremlin-python/src/main/jython/gremlin_python/statics.py
--
diff --git a/gremlin-python/src/main/jython/gremlin_python/statics.py 
b/gremlin-python/src/main/jython/gremlin_python/statics.py
index a1abf8e..f98347e 100644
--- a/gremlin-python/src/main/jython/gremlin_python/statics.py
+++ b/gremlin-python/src/main/jython/gremlin_python/statics.py
@@ -36,6 +36,15 @@ else:
 from types import LongType
 from types import TypeType
 
+
+class timestamp(float):
+"""
+In Python a timestamp is simply a float. This dummy class (similar to 
long), allows users to wrap a float
+in a GLV script to make sure the value is serialized as a GraphSON 
timestamp.
+"""
+pass
+
+
 staticMethods = {}
 staticEnums = {}
 default_lambda_language = "gremlin-python"

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/3b651ff5/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 0daeffa..04085ee 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
@@ -16,11 +16,15 @@ KIND, either express or implied.  See the License for the
 specific language governing permissions and limitations
 under the License.
 '''
-from aenum import Enum
+import datetime
 import json
-import six
+import time
+import uuid
 from collections import OrderedDict
 
+import six
+from aenum import Enum
+
 from gremlin_python import statics
 from gremlin_python.statics import FloatType, FunctionType, IntType, LongType, 
TypeType
 from gremlin_python.process.traversal import Binding, Bytecode, P, Traversal, 
Traverser, TraversalStrategy
@@ -298,6 +302,69 @@ class TypeSerializer(_GraphSONTypeIO):
 return writer.toDict(typ())
 
 
+class UUIDIO(_GraphSONTypeIO):
+python_type = uuid.UUID
+graphson_type = "g:UUID"
+graphson_base_type = "UUID"
+
+@classmethod
+def dictify(cls, obj, writer):
+return GraphSONUtil.typedValue(cls.graphson_base_type, str(obj))
+
+@classmethod
+def objectify(cls, d, reader):
+return cls.python_type(d)
+
+
+class DateIO(_GraphSONTypeIO):
+python_type = datetime.datetime
+graphson_type = "g:Date"
+graphson_base_type = "Date"
+
+@classmethod
+def dictify(cls, obj, writer):
+# Java timestamp expects miliseconds
+if six.PY3:
+pts = obj.timestamp()
+else:
+# Hack for legacy Python
+# Taken from:
+# 
https://github.com/jaraco/backports.datetime_timestamp/blob/master/backports/datetime_timestamp/__init__.py
+pts = time.mktime((obj.year, obj.month, obj.day,
+  obj.hour, obj.minute, obj.second,
+  -1, -1, -1)) + obj.microsecond / 1e6
+
+# Have to use int because of legacy Python
+ts = int(round(pts * 1000))
+return GraphSONUtil.typedValue(cls.graphson_base_type, ts)
+
+@classmethod
+def objectify(cls, ts, reader):
+# Python timestamp expects seconds
+return datetime.datetime.fromtimestamp(ts / 1000.0)
+
+
+# Based on current implementation, this class must always be declared before 
FloatIO.
+# Seems pretty fragile for future maintainers. Maybe look into this.
+class TimestampIO(_GraphSONTypeIO):
+"""A timestamp in Python is type float"""
+python_type = statics.tim

[02/11] tinkerpop git commit: updated changelog and upgrade docs

2017-11-27 Thread davebshow
updated changelog and upgrade docs


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

Branch: refs/heads/master
Commit: 4661284292306fecb67fbcc46617af97b3b7762f
Parents: 3b651ff
Author: davebshow <davebs...@gmail.com>
Authored: Tue Nov 7 09:40:05 2017 -0800
Committer: davebshow <davebs...@gmail.com>
Committed: Tue Nov 7 09:40:05 2017 -0800

--
 CHANGELOG.asciidoc | 1 +
 docs/src/upgrade/release-3.2.x-incubating.asciidoc | 9 +
 2 files changed, 10 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/46612842/CHANGELOG.asciidoc
--
diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc
index fcba906..acfa892 100644
--- a/CHANGELOG.asciidoc
+++ b/CHANGELOG.asciidoc
@@ -23,6 +23,7 @@ 
image::https://raw.githubusercontent.com/apache/tinkerpop/master/docs/static/ima
 [[release-3-2-7]]
 === TinkerPop 3.2.7 (Release Date: NOT OFFICIALLY RELEASED YET)
 
+* Added core GraphSON classes for Gremlin-Python: `UUID`, `Date`, and 
`Timestamp`.
 * `TraversalVertexProgram` ``profile()` now accounts for worker iteration in 
`GraphComputer` OLAP.
 * Added a test for self-edges and fixed `Neo4jVertex` to provided repeated 
self-edges on `BOTH`.
 * Better respected permissions on the `plugins.txt` file and prevented writing 
if marked as read-only.

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/46612842/docs/src/upgrade/release-3.2.x-incubating.asciidoc
--
diff --git a/docs/src/upgrade/release-3.2.x-incubating.asciidoc 
b/docs/src/upgrade/release-3.2.x-incubating.asciidoc
index 60fd320..9be51f9 100644
--- a/docs/src/upgrade/release-3.2.x-incubating.asciidoc
+++ b/docs/src/upgrade/release-3.2.x-incubating.asciidoc
@@ -29,6 +29,15 @@ 
image::https://raw.githubusercontent.com/apache/tinkerpop/master/docs/static/ima
 
 Please see the 
link:https://github.com/apache/tinkerpop/blob/3.2.7/CHANGELOG.asciidoc#release-3-2-7[changelog]
 for a complete list of all the modifications that are part of this release.
 
+ Gremlin-Python Core Types
+With the addition of `UUID`, `Date`, and `Timestamp`, Gremlin-Python now 
implements serializers for all core GraphSON types. Users
+that were using other types to represent this data can now use the Python 
classes `datetime.datetime` and`uuid.UUID` in GLV traversals.
+Since Python does not support a native `Timestamp` object, Gremlin-Python now 
offers a dummy class `Timestamp`, which allows
+users to wrap a float and submit it to the Gremlin Server as a `Timestamp` 
GraphSON type. `Timestamp` can be found in
+`gremlin_python.statics`.
+
+See: link:https://issues.apache.org/jira/browse/TINKERPOP-1807[TINKERPOP-1807]
+
  Embedded Remote Connection
 
 As Gremlin Language Variants (GLVs) expand their usage and use of 
`withRemote()` becomes more common, the need to mock



[07/11] tinkerpop git commit: removed unwanted blank line

2017-11-27 Thread davebshow
removed unwanted blank line


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

Branch: refs/heads/master
Commit: 80624fcbe34ffb0d4d2a4033926a198096413ae3
Parents: ed6133e
Author: davebshow <davebs...@gmail.com>
Authored: Wed Nov 15 10:19:59 2017 -0800
Committer: davebshow <davebs...@gmail.com>
Committed: Wed Nov 15 10:19:59 2017 -0800

--
 .../src/main/jython/tests/structure/io/test_graphsonV2d0.py | 1 -
 1 file changed, 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/80624fcb/gremlin-python/src/main/jython/tests/structure/io/test_graphsonV2d0.py
--
diff --git 
a/gremlin-python/src/main/jython/tests/structure/io/test_graphsonV2d0.py 
b/gremlin-python/src/main/jython/tests/structure/io/test_graphsonV2d0.py
index 19448d9..885fa79 100644
--- a/gremlin-python/src/main/jython/tests/structure/io/test_graphsonV2d0.py
+++ b/gremlin-python/src/main/jython/tests/structure/io/test_graphsonV2d0.py
@@ -31,7 +31,6 @@ from gremlin_python.statics import *
 from gremlin_python.structure.graph import Vertex, Edge, Property, 
VertexProperty, Graph, Path
 from gremlin_python.structure.io.graphsonV2d0 import GraphSONWriter, 
GraphSONReader, GraphSONUtil
 import gremlin_python.structure.io.graphsonV2d0
-
 from gremlin_python.process.traversal import P
 from gremlin_python.process.strategies import SubgraphStrategy
 from gremlin_python.process.graph_traversal import __



[10/11] tinkerpop git commit: Merge branch 'TINKERPOP-1807-master'

2017-11-27 Thread davebshow
Merge branch 'TINKERPOP-1807-master'


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

Branch: refs/heads/master
Commit: 9d7bb9171f6180f4f634b946dd8addab476455b7
Parents: bb67594 9790574
Author: davebshow <davebs...@gmail.com>
Authored: Mon Nov 27 09:46:08 2017 -0800
Committer: davebshow <davebs...@gmail.com>
Committed: Mon Nov 27 09:46:08 2017 -0800

--
 CHANGELOG.asciidoc  |  1 +
 .../upgrade/release-3.2.x-incubating.asciidoc   |  9 ++
 .../src/main/jython/gremlin_python/statics.py   |  9 ++
 .../gremlin_python/structure/io/graphsonV2d0.py | 71 +++-
 .../gremlin_python/structure/io/graphsonV3d0.py | 75 -
 .../tests/structure/io/test_graphsonV2d0.py | 86 ++--
 .../tests/structure/io/test_graphsonV3d0.py | 83 ++-
 7 files changed, 320 insertions(+), 14 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/9d7bb917/CHANGELOG.asciidoc
--



tinkerpop git commit: removed upgrading docs for 3.3.1. Inclusion in 3.2.7 is enough

2017-11-17 Thread davebshow
Repository: tinkerpop
Updated Branches:
  refs/heads/TINKERPOP-1807-master 80624fcbe -> 979057485


removed upgrading docs for 3.3.1. Inclusion in 3.2.7 is enough


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

Branch: refs/heads/TINKERPOP-1807-master
Commit: 979057485fe62d33e754965582bdd687a4babba0
Parents: 80624fc
Author: davebshow <davebs...@gmail.com>
Authored: Fri Nov 17 09:36:22 2017 -0800
Committer: davebshow <davebs...@gmail.com>
Committed: Fri Nov 17 09:36:22 2017 -0800

--
 docs/src/upgrade/release-3.3.x.asciidoc | 9 -
 1 file changed, 9 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/97905748/docs/src/upgrade/release-3.3.x.asciidoc
--
diff --git a/docs/src/upgrade/release-3.3.x.asciidoc 
b/docs/src/upgrade/release-3.3.x.asciidoc
index 4aaca6a..80aff8b 100644
--- a/docs/src/upgrade/release-3.3.x.asciidoc
+++ b/docs/src/upgrade/release-3.3.x.asciidoc
@@ -29,15 +29,6 @@ Please see the 
link:https://github.com/apache/tinkerpop/blob/3.3.1/CHANGELOG.asc
 
 === Upgrading for Users
 
- Gremlin-Python Core Types
-With the addition of `UUID`, `Date`, and `Timestamp`, Gremlin-Python now 
implements serializers for all core GraphSON types. Users
-that were using other types to represent this data can now use the Python 
classes `datetime.datetime` and`uuid.UUID` in GLV traversals.
-Since Python does not support a native `Timestamp` object, Gremlin-Python now 
offers a dummy class `Timestamp`, which allows
-users to wrap a float and submit it to the Gremlin Server as a `Timestamp` 
GraphSON type. `Timestamp` can be found in
-`gremlin_python.statics`.
-
-See: link:https://issues.apache.org/jira/browse/TINKERPOP-1807[TINKERPOP-1807]
-
  Gremlin Python path()
 
 There was a bug in GraphSON 3.0 serialization that prevented proper handling 
of results contain `Path` object. As a



tinkerpop git commit: removed unwanted blank line

2017-11-15 Thread davebshow
Repository: tinkerpop
Updated Branches:
  refs/heads/TINKERPOP-1807-master ed6133e50 -> 80624fcbe


removed unwanted blank line


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

Branch: refs/heads/TINKERPOP-1807-master
Commit: 80624fcbe34ffb0d4d2a4033926a198096413ae3
Parents: ed6133e
Author: davebshow <davebs...@gmail.com>
Authored: Wed Nov 15 10:19:59 2017 -0800
Committer: davebshow <davebs...@gmail.com>
Committed: Wed Nov 15 10:19:59 2017 -0800

--
 .../src/main/jython/tests/structure/io/test_graphsonV2d0.py | 1 -
 1 file changed, 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/80624fcb/gremlin-python/src/main/jython/tests/structure/io/test_graphsonV2d0.py
--
diff --git 
a/gremlin-python/src/main/jython/tests/structure/io/test_graphsonV2d0.py 
b/gremlin-python/src/main/jython/tests/structure/io/test_graphsonV2d0.py
index 19448d9..885fa79 100644
--- a/gremlin-python/src/main/jython/tests/structure/io/test_graphsonV2d0.py
+++ b/gremlin-python/src/main/jython/tests/structure/io/test_graphsonV2d0.py
@@ -31,7 +31,6 @@ from gremlin_python.statics import *
 from gremlin_python.structure.graph import Vertex, Edge, Property, 
VertexProperty, Graph, Path
 from gremlin_python.structure.io.graphsonV2d0 import GraphSONWriter, 
GraphSONReader, GraphSONUtil
 import gremlin_python.structure.io.graphsonV2d0
-
 from gremlin_python.process.traversal import P
 from gremlin_python.process.strategies import SubgraphStrategy
 from gremlin_python.process.graph_traversal import __



tinkerpop git commit: fixed typo in changelog

2017-11-15 Thread davebshow
Repository: tinkerpop
Updated Branches:
  refs/heads/TINKERPOP-1807-master 5031ccdbe -> ed6133e50


fixed typo in changelog


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

Branch: refs/heads/TINKERPOP-1807-master
Commit: ed6133e502e573650a39a6ac96c4a901e168c2e6
Parents: 5031ccd
Author: davebshow <davebs...@gmail.com>
Authored: Wed Nov 15 10:17:34 2017 -0800
Committer: davebshow <davebs...@gmail.com>
Committed: Wed Nov 15 10:17:34 2017 -0800

--
 CHANGELOG.asciidoc | 1 -
 1 file changed, 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/ed6133e5/CHANGELOG.asciidoc
--
diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc
index 49c9a5b..049c999 100644
--- a/CHANGELOG.asciidoc
+++ b/CHANGELOG.asciidoc
@@ -252,7 +252,6 @@ 
image::https://raw.githubusercontent.com/apache/tinkerpop/master/docs/static/ima
 * Fixed an `ArrayOutOfBoundsException` in `hasId()` for the rare situation 
when the provided collection is empty.
 * Bump to Netty 4.0.52
 * `TraversalVertexProgram` `profile()` now accounts for worker iteration in 
`GraphComputer` OLAP.
-* `TraversalVertexProgram` ``profile()` now accounts for worker iteration in 
`GraphComputer` OLAP.
 * Added a test for self-edges and fixed `Neo4jVertex` to provided repeated 
self-edges on `BOTH`.
 * Better respected permissions on the `plugins.txt` file and prevented writing 
if marked as read-only.
 * Added getters for the lambdas held by `LambdaCollectingBarrierStep`, 
`LambdaFlatMapStep` and `LambdaSideEffectStep`.



[1/2] tinkerpop git commit: added core GraphSON types UUID, Date, and Timestamp for GraphSON 3

2017-11-15 Thread davebshow
Repository: tinkerpop
Updated Branches:
  refs/heads/TINKERPOP-1807-master [created] 5031ccdbe


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/5031ccdb/gremlin-python/src/main/jython/tests/structure/io/test_graphsonV2d0.py
--
diff --cc gremlin-python/src/main/jython/tests/structure/io/test_graphsonV2d0.py
index 8f6285f,000..19448d9
mode 100644,00..100644
--- a/gremlin-python/src/main/jython/tests/structure/io/test_graphsonV2d0.py
+++ b/gremlin-python/src/main/jython/tests/structure/io/test_graphsonV2d0.py
@@@ -1,294 -1,0 +1,371 @@@
- '''
++"""
 +Licensed to the Apache Software Foundation (ASF) under one
 +or more contributor license agreements.  See the NOTICE file
 +distributed with this work for additional information
 +regarding copyright ownership.  The ASF licenses this file
 +to you under the Apache License, Version 2.0 (the
 +"License"); you may not use this file except in compliance
 +with the License.  You may obtain a copy of the License at
 +
 +http://www.apache.org/licenses/LICENSE-2.0
 +
 +Unless required by applicable law or agreed to in writing,
 +software distributed under the License is distributed on an
 +"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
 +KIND, either express or implied.  See the License for the
 +specific language governing permissions and limitations
 +under the License.
- '''
++"""
 +
 +__author__ = 'Marko A. Rodriguez (http://markorodriguez.com)'
 +
- import sys
++import datetime
 +import json
++import uuid
++
 +from mock import Mock
 +
 +import six
 +
 +from gremlin_python.statics import *
- from gremlin_python.structure.graph import Vertex, Edge, Property, 
VertexProperty
- from gremlin_python.structure.graph import Path
++from gremlin_python.structure.graph import Vertex, Edge, Property, 
VertexProperty, Graph, Path
 +from gremlin_python.structure.io.graphsonV2d0 import GraphSONWriter, 
GraphSONReader, GraphSONUtil
 +import gremlin_python.structure.io.graphsonV2d0
++
 +from gremlin_python.process.traversal import P
 +from gremlin_python.process.strategies import SubgraphStrategy
 +from gremlin_python.process.graph_traversal import __
 +
 +
 +class TestGraphSONReader(object):
 +graphson_reader = GraphSONReader()
 +
 +def test_number_input(self):
 +x = self.graphson_reader.readObject(json.dumps({
 +"@type": "g:Int32",
 +"@value": 31
 +}))
 +assert isinstance(x, int)
 +assert 31 == x
 +##
 +x = self.graphson_reader.readObject(json.dumps({
 +"@type": "g:Int64",
 +"@value": 31
 +}))
 +assert isinstance(x, long)
 +assert long(31) == x
 +##
 +x = self.graphson_reader.readObject(json.dumps({
 +"@type": "g:Float",
 +"@value": 31.3
 +}))
 +assert isinstance(x, float)
 +assert 31.3 == x
 +##
 +x = self.graphson_reader.readObject(json.dumps({
 +"@type": "g:Double",
 +"@value": 31.2
 +}))
 +assert isinstance(x, float)
 +assert 31.2 == x
 +
 +def test_graph(self):
 +vertex = self.graphson_reader.readObject("""
 +{"@type":"g:Vertex", 
"@value":{"id":{"@type":"g:Int32","@value":1},"label":"person","outE":{"created":[{"id":{"@type":"g:Int32","@value":9},"inV":{"@type":"g:Int32","@value":3},"properties":{"weight":{"@type":"g:Double","@value":0.4}}}],"knows":[{"id":{"@type":"g:Int32","@value":7},"inV":{"@type":"g:Int32","@value":2},"properties":{"weight":{"@type":"g:Double","@value":0.5}}},{"id":{"@type":"g:Int32","@value":8},"inV":{"@type":"g:Int32","@value":4},"properties":{"weight":{"@type":"g:Double","@value":1.0}}}]},"properties":{"name":[{"id":{"@type":"g:Int64","@value":0},"value":"marko"}],"age":[{"id":{"@type":"g:Int64","@value":1},"value":{"@type":"g:Int32","@value":29}}]}}}""")
 +assert isinstance(vertex, Vertex)
 +assert "person" == vertex.label
 +assert 1 == vertex.id
 +assert isinstance(vertex.id, int)
 +assert vertex == Vertex(1)
 +##
 +vertex = self.graphson_reader.readObject("""
 +{"@type":"g:Vertex", 
"@value":{"id":{"@type":"g:Float","@value":45.23}}}""")
 +assert isinstance(vertex, Vertex)
 +assert 45.23 == vertex.id
 +assert isinstance(vertex.id, FloatType)
 +assert "vertex" == vertex.label
 +assert vertex == Vertex(45.23)
 +##
 +vertex_property = self.graphson_reader.readObject("""
 +{"@type":"g:VertexProperty", 
"@value":{"id":"anId","label":"aKey","value":true,"vertex":{"@type":"g:Int32","@value":9}}}""")
 +assert isinstance(vertex_property, VertexProperty)
 +assert "anId" == vertex_property.id
 +assert "aKey" == vertex_property.label
 +assert vertex_property.value
 +assert vertex_property.vertex == Vertex(9)
 +##
 +

[2/2] tinkerpop git commit: added core GraphSON types UUID, Date, and Timestamp for GraphSON 3

2017-11-15 Thread davebshow
added core GraphSON types UUID, Date, and Timestamp for GraphSON 3


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

Branch: refs/heads/TINKERPOP-1807-master
Commit: 5031ccdbea28b1384c40fd522e9fec25b5b86818
Parents: d6f031f c0078cc
Author: davebshow <davebs...@gmail.com>
Authored: Wed Nov 15 10:12:22 2017 -0800
Committer: davebshow <davebs...@gmail.com>
Committed: Wed Nov 15 10:12:22 2017 -0800

--
 CHANGELOG.asciidoc  |  2 +
 .../upgrade/release-3.2.x-incubating.asciidoc   |  9 ++
 docs/src/upgrade/release-3.3.x.asciidoc |  9 ++
 .../src/main/jython/gremlin_python/statics.py   |  9 ++
 .../gremlin_python/structure/io/graphsonV2d0.py | 71 +++-
 .../gremlin_python/structure/io/graphsonV3d0.py | 75 -
 .../tests/structure/io/test_graphsonV2d0.py | 87 ++--
 .../tests/structure/io/test_graphsonV3d0.py | 83 ++-
 8 files changed, 331 insertions(+), 14 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/5031ccdb/CHANGELOG.asciidoc
--
diff --cc CHANGELOG.asciidoc
index ce65af6,acfa892..49c9a5b
--- a/CHANGELOG.asciidoc
+++ b/CHANGELOG.asciidoc
@@@ -246,11 -23,8 +246,13 @@@ image::https://raw.githubusercontent.co
  [[release-3-2-7]]
  === TinkerPop 3.2.7 (Release Date: NOT OFFICIALLY RELEASED YET)
  
+ * Added core GraphSON classes for Gremlin-Python: `UUID`, `Date`, and 
`Timestamp`.
 +* Provided a method to configure detachment options with `EventStrategy`.
 +* Fixed a race condition in `TinkerIndex`.
 +* Fixed an `ArrayOutOfBoundsException` in `hasId()` for the rare situation 
when the provided collection is empty.
 +* Bump to Netty 4.0.52
 +* `TraversalVertexProgram` `profile()` now accounts for worker iteration in 
`GraphComputer` OLAP.
+ * `TraversalVertexProgram` ``profile()` now accounts for worker iteration in 
`GraphComputer` OLAP.
  * Added a test for self-edges and fixed `Neo4jVertex` to provided repeated 
self-edges on `BOTH`.
  * Better respected permissions on the `plugins.txt` file and prevented 
writing if marked as read-only.
  * Added getters for the lambdas held by `LambdaCollectingBarrierStep`, 
`LambdaFlatMapStep` and `LambdaSideEffectStep`.

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/5031ccdb/docs/src/upgrade/release-3.2.x-incubating.asciidoc
--
diff --cc docs/src/upgrade/release-3.2.x-incubating.asciidoc
index 5564eec,9be51f9..8745ce5
--- a/docs/src/upgrade/release-3.2.x-incubating.asciidoc
+++ b/docs/src/upgrade/release-3.2.x-incubating.asciidoc
@@@ -29,16 -29,15 +29,25 @@@ image::https://raw.githubusercontent.co
  
  Please see the 
link:https://github.com/apache/tinkerpop/blob/3.2.7/CHANGELOG.asciidoc#release-3-2-7[changelog]
 for a complete list of all the modifications that are part of this release.
  
+  Gremlin-Python Core Types
+ With the addition of `UUID`, `Date`, and `Timestamp`, Gremlin-Python now 
implements serializers for all core GraphSON types. Users
+ that were using other types to represent this data can now use the Python 
classes `datetime.datetime` and`uuid.UUID` in GLV traversals.
+ Since Python does not support a native `Timestamp` object, Gremlin-Python now 
offers a dummy class `Timestamp`, which allows
+ users to wrap a float and submit it to the Gremlin Server as a `Timestamp` 
GraphSON type. `Timestamp` can be found in
+ `gremlin_python.statics`.
+ 
+ See: link:https://issues.apache.org/jira/browse/TINKERPOP-1807[TINKERPOP-1807]
+ 
 + EventStrategy Detachment
 +
 +`EventStrategy` forced detachment of mutated elements prior to raising them 
in events. While this was a desired
 +outcome, it may not have always fit every use case. For example, a user may 
have wanted a reference element or the
 +actual element itself. As a result, `EventStrategy` has changed to allow it 
to be constructed with a `detach()`
 +option, where it is possible to specify any of the following: `null` for no 
detachment, `DetachedFactory` for the
 +original behavior, and `ReferenceFactory` for detachment that returns 
reference elements.
 +
 +See: link:https://issues.apache.org/jira/browse/TINKERPOP-1829[TINKERPOP-1829]
 +
   Embedded Remote Connection
  
  As Gremlin Language Variants (GLVs) expand their usage and use of 
`withRemote()` becomes more common, the need to mock

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/5031ccdb/docs/src/upgrade/release-3.3.x.asciidoc

tinkerpop git commit: added asserts to check values are deserialized as expected

2017-11-13 Thread davebshow
Repository: tinkerpop
Updated Branches:
  refs/heads/TINKERPOP-1807 466128429 -> c0078cc17


added asserts to check values are deserialized as expected


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

Branch: refs/heads/TINKERPOP-1807
Commit: c0078cc172e918f96460630da27ff04cb4e9478d
Parents: 4661284
Author: davebshow <davebs...@gmail.com>
Authored: Mon Nov 13 10:11:46 2017 -0800
Committer: davebshow <davebs...@gmail.com>
Committed: Mon Nov 13 10:11:46 2017 -0800

--
 .../src/main/jython/tests/structure/io/test_graphson.py  | 4 
 1 file changed, 4 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/c0078cc1/gremlin-python/src/main/jython/tests/structure/io/test_graphson.py
--
diff --git a/gremlin-python/src/main/jython/tests/structure/io/test_graphson.py 
b/gremlin-python/src/main/jython/tests/structure/io/test_graphson.py
index 75e7136..68d14ca 100644
--- a/gremlin-python/src/main/jython/tests/structure/io/test_graphson.py
+++ b/gremlin-python/src/main/jython/tests/structure/io/test_graphson.py
@@ -128,15 +128,18 @@ class TestGraphSONReader(object):
 def test_datetime(self):
 dt = self.graphson_reader.readObject(json.dumps({"@type": "g:Date", 
"@value": 1481750076295}))
 assert isinstance(dt, datetime.datetime)
+assert dt == datetime.datetime(2016, 12, 14, 13, 14, 36, 295000)
 
 def test_timestamp(self):
 dt = self.graphson_reader.readObject(json.dumps({"@type": 
"g:Timestamp", "@value": 1481750076295}))
 assert isinstance(dt, timestamp)
+assert float(dt) == 1481750076.295
 
 def test_uuid(self):
 prop = self.graphson_reader.readObject(
 json.dumps({'@type': 'g:UUID', '@value': 
"41d2e28a-20a4-4ab0-b379-d810dede3786"}))
 assert isinstance(prop, uuid.UUID)
+assert str(prop) == '41d2e28a-20a4-4ab0-b379-d810dede3786'
 
 
 class TestGraphSONWriter(object):
@@ -260,6 +263,7 @@ class TestGraphSONWriter(object):
 output = self.graphson_writer.writeObject(prop)
 assert expected == output
 
+
 class TestFunctionalGraphSONIO(object):
 """Functional IO tests"""
 



tinkerpop git commit: updated changelog and upgrade docs

2017-11-07 Thread davebshow
Repository: tinkerpop
Updated Branches:
  refs/heads/TINKERPOP-1807 3b651ff58 -> 466128429


updated changelog and upgrade docs


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

Branch: refs/heads/TINKERPOP-1807
Commit: 4661284292306fecb67fbcc46617af97b3b7762f
Parents: 3b651ff
Author: davebshow <davebs...@gmail.com>
Authored: Tue Nov 7 09:40:05 2017 -0800
Committer: davebshow <davebs...@gmail.com>
Committed: Tue Nov 7 09:40:05 2017 -0800

--
 CHANGELOG.asciidoc | 1 +
 docs/src/upgrade/release-3.2.x-incubating.asciidoc | 9 +
 2 files changed, 10 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/46612842/CHANGELOG.asciidoc
--
diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc
index fcba906..acfa892 100644
--- a/CHANGELOG.asciidoc
+++ b/CHANGELOG.asciidoc
@@ -23,6 +23,7 @@ 
image::https://raw.githubusercontent.com/apache/tinkerpop/master/docs/static/ima
 [[release-3-2-7]]
 === TinkerPop 3.2.7 (Release Date: NOT OFFICIALLY RELEASED YET)
 
+* Added core GraphSON classes for Gremlin-Python: `UUID`, `Date`, and 
`Timestamp`.
 * `TraversalVertexProgram` ``profile()` now accounts for worker iteration in 
`GraphComputer` OLAP.
 * Added a test for self-edges and fixed `Neo4jVertex` to provided repeated 
self-edges on `BOTH`.
 * Better respected permissions on the `plugins.txt` file and prevented writing 
if marked as read-only.

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/46612842/docs/src/upgrade/release-3.2.x-incubating.asciidoc
--
diff --git a/docs/src/upgrade/release-3.2.x-incubating.asciidoc 
b/docs/src/upgrade/release-3.2.x-incubating.asciidoc
index 60fd320..9be51f9 100644
--- a/docs/src/upgrade/release-3.2.x-incubating.asciidoc
+++ b/docs/src/upgrade/release-3.2.x-incubating.asciidoc
@@ -29,6 +29,15 @@ 
image::https://raw.githubusercontent.com/apache/tinkerpop/master/docs/static/ima
 
 Please see the 
link:https://github.com/apache/tinkerpop/blob/3.2.7/CHANGELOG.asciidoc#release-3-2-7[changelog]
 for a complete list of all the modifications that are part of this release.
 
+ Gremlin-Python Core Types
+With the addition of `UUID`, `Date`, and `Timestamp`, Gremlin-Python now 
implements serializers for all core GraphSON types. Users
+that were using other types to represent this data can now use the Python 
classes `datetime.datetime` and`uuid.UUID` in GLV traversals.
+Since Python does not support a native `Timestamp` object, Gremlin-Python now 
offers a dummy class `Timestamp`, which allows
+users to wrap a float and submit it to the Gremlin Server as a `Timestamp` 
GraphSON type. `Timestamp` can be found in
+`gremlin_python.statics`.
+
+See: link:https://issues.apache.org/jira/browse/TINKERPOP-1807[TINKERPOP-1807]
+
  Embedded Remote Connection
 
 As Gremlin Language Variants (GLVs) expand their usage and use of 
`withRemote()` becomes more common, the need to mock



tinkerpop git commit: Implemented support for missing core GraphSON types in gremlin-python

2017-11-01 Thread davebshow
Repository: tinkerpop
Updated Branches:
  refs/heads/TINKERPOP-1807 [created] 3b651ff58


Implemented support for missing core GraphSON types in gremlin-python


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

Branch: refs/heads/TINKERPOP-1807
Commit: 3b651ff58cdf210a63a0101d0a311c7076de2b0e
Parents: f2b4fb9
Author: davebshow <davebs...@gmail.com>
Authored: Wed Nov 1 16:31:10 2017 -0700
Committer: davebshow <davebs...@gmail.com>
Committed: Wed Nov 1 16:31:10 2017 -0700

--
 .../src/main/jython/gremlin_python/statics.py   |  9 +++
 .../gremlin_python/structure/io/graphson.py | 71 -
 .../jython/tests/structure/io/test_graphson.py  | 81 +++-
 3 files changed, 156 insertions(+), 5 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/3b651ff5/gremlin-python/src/main/jython/gremlin_python/statics.py
--
diff --git a/gremlin-python/src/main/jython/gremlin_python/statics.py 
b/gremlin-python/src/main/jython/gremlin_python/statics.py
index a1abf8e..f98347e 100644
--- a/gremlin-python/src/main/jython/gremlin_python/statics.py
+++ b/gremlin-python/src/main/jython/gremlin_python/statics.py
@@ -36,6 +36,15 @@ else:
 from types import LongType
 from types import TypeType
 
+
+class timestamp(float):
+"""
+In Python a timestamp is simply a float. This dummy class (similar to 
long), allows users to wrap a float
+in a GLV script to make sure the value is serialized as a GraphSON 
timestamp.
+"""
+pass
+
+
 staticMethods = {}
 staticEnums = {}
 default_lambda_language = "gremlin-python"

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/3b651ff5/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 0daeffa..04085ee 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
@@ -16,11 +16,15 @@ KIND, either express or implied.  See the License for the
 specific language governing permissions and limitations
 under the License.
 '''
-from aenum import Enum
+import datetime
 import json
-import six
+import time
+import uuid
 from collections import OrderedDict
 
+import six
+from aenum import Enum
+
 from gremlin_python import statics
 from gremlin_python.statics import FloatType, FunctionType, IntType, LongType, 
TypeType
 from gremlin_python.process.traversal import Binding, Bytecode, P, Traversal, 
Traverser, TraversalStrategy
@@ -298,6 +302,69 @@ class TypeSerializer(_GraphSONTypeIO):
 return writer.toDict(typ())
 
 
+class UUIDIO(_GraphSONTypeIO):
+python_type = uuid.UUID
+graphson_type = "g:UUID"
+graphson_base_type = "UUID"
+
+@classmethod
+def dictify(cls, obj, writer):
+return GraphSONUtil.typedValue(cls.graphson_base_type, str(obj))
+
+@classmethod
+def objectify(cls, d, reader):
+return cls.python_type(d)
+
+
+class DateIO(_GraphSONTypeIO):
+python_type = datetime.datetime
+graphson_type = "g:Date"
+graphson_base_type = "Date"
+
+@classmethod
+def dictify(cls, obj, writer):
+# Java timestamp expects miliseconds
+if six.PY3:
+pts = obj.timestamp()
+else:
+# Hack for legacy Python
+# Taken from:
+# 
https://github.com/jaraco/backports.datetime_timestamp/blob/master/backports/datetime_timestamp/__init__.py
+pts = time.mktime((obj.year, obj.month, obj.day,
+  obj.hour, obj.minute, obj.second,
+  -1, -1, -1)) + obj.microsecond / 1e6
+
+# Have to use int because of legacy Python
+ts = int(round(pts * 1000))
+return GraphSONUtil.typedValue(cls.graphson_base_type, ts)
+
+@classmethod
+def objectify(cls, ts, reader):
+# Python timestamp expects seconds
+return datetime.datetime.fromtimestamp(ts / 1000.0)
+
+
+# Based on current implementation, this class must always be declared before 
FloatIO.
+# Seems pretty fragile for future maintainers. Maybe look into this.
+class TimestampIO(_GraphSONTypeIO):
+"""A timestamp in Python is type float"""
+python_type = stati

[2/2] tinkerpop git commit: cleaned up gremlin-python message serializer classes

2017-08-11 Thread davebshow
cleaned up gremlin-python message serializer classes


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

Branch: refs/heads/master
Commit: e9f03d5ba8615b325fbb61ea571fa409f848e78d
Parents: d083c94
Author: davebshow <davebs...@gmail.com>
Authored: Wed Aug 9 15:14:44 2017 -0400
Committer: davebshow <davebs...@gmail.com>
Committed: Fri Aug 11 08:41:51 2017 -0400

--
 .../jython/gremlin_python/driver/serializer.py  | 59 +++-
 .../src/main/jython/tests/conftest.py   | 14 -
 .../main/jython/tests/driver/test_serializer.py | 37 
 3 files changed, 84 insertions(+), 26 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/e9f03d5b/gremlin-python/src/main/jython/gremlin_python/driver/serializer.py
--
diff --git a/gremlin-python/src/main/jython/gremlin_python/driver/serializer.py 
b/gremlin-python/src/main/jython/gremlin_python/driver/serializer.py
index 8686b7b..679a7ce 100644
--- a/gremlin-python/src/main/jython/gremlin_python/driver/serializer.py
+++ b/gremlin-python/src/main/jython/gremlin_python/driver/serializer.py
@@ -81,19 +81,35 @@ class Traversal(Processor):
 return args
 
 
-class GraphSONMessageSerializer:
-"""Message serializer for GraphSON"""
-
-def __init__(self, reader=None, writer=None, 
version=b"application/vnd.gremlin-v3.0+json"):
-self.version = version
+class GraphSONMessageSerializer(object):
+"""
+Message serializer for GraphSON. Allow users to pass custom reader,
+writer, and version kwargs for custom serialization. Otherwise,
+use current GraphSON version as default.
+"""
+
+# KEEP TRACK OF CURRENT DEFAULTS
+DEFAULT_READER = graphsonV3d0.GraphSONReader()
+DEFAULT_WRITER = graphsonV3d0.GraphSONWriter()
+DEFAULT_VERSION = b"application/vnd.gremlin-v3.0+json"
+
+def __init__(self, reader=None, writer=None, version=None):
+if not version:
+version = self.DEFAULT_VERSION
+self._version = version
 if not reader:
-reader = graphsonV3d0.GraphSONReader()
+reader = self.DEFAULT_READER
 self._graphson_reader = reader
 if not writer:
-writer = graphsonV3d0.GraphSONWriter()
+writer = self.DEFAULT_WRITER
 self.standard = Standard(writer)
 self.traversal = Traversal(writer)
 
+@property
+def version(self):
+"""Read only property"""
+return self._version
+
 def get_processor(self, processor):
 processor = getattr(self, processor, None)
 if not processor:
@@ -129,27 +145,20 @@ class GraphSONMessageSerializer:
 def deserialize_message(self, message):
 return self._graphson_reader.toObject(message)
 
+
 class GraphSONSerializersV2d0(GraphSONMessageSerializer):
 """Message serializer for GraphSON 2.0"""
-
-def __init__(self, reader=None, writer=None):
-GraphSONMessageSerializer.__init__(self, reader, writer, 
b"application/vnd.gremlin-v2.0+json")
-if not reader:
-self._graphson_reader = graphsonV2d0.GraphSONReader()
-if not writer:
-self._graphson_writer = graphsonV2d0.GraphSONWriter()
-self.standard = Standard(self._graphson_writer)
-self.traversal = Traversal(self._graphson_writer)
+def __init__(self):
+reader = graphsonV2d0.GraphSONReader()
+writer = graphsonV2d0.GraphSONWriter()
+version = b"application/vnd.gremlin-v2.0+json"
+super(GraphSONSerializersV2d0, self).__init__(reader, writer, version)
 
 
 class GraphSONSerializersV3d0(GraphSONMessageSerializer):
 """Message serializer for GraphSON 3.0"""
-
-def __init__(self, reader=None, writer=None):
-GraphSONMessageSerializer.__init__(self, reader, writer, 
b"application/vnd.gremlin-v3.0+json")
-if not reader:
-self._graphson_reader = graphsonV3d0.GraphSONReader()
-if not writer:
-self._graphson_writer = graphsonV3d0.GraphSONWriter()
-self.standard = Standard(self._graphson_writer)
-self.traversal = Traversal(self._graphson_writer)
\ No newline at end of file
+def __init__(self):
+reader = graphsonV3d0.GraphSONReader()
+writer = graphsonV3d0.GraphSONWriter()
+version = b"applicatio

[1/2] tinkerpop git commit: store defaults as classes

2017-08-11 Thread davebshow
Repository: tinkerpop
Updated Branches:
  refs/heads/master d083c942b -> 4d1e12c5c


store defaults as classes


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

Branch: refs/heads/master
Commit: 4d1e12c5c36333c726447d1833e446f955474297
Parents: e9f03d5
Author: davebshow <davebs...@gmail.com>
Authored: Wed Aug 9 16:42:27 2017 -0400
Committer: davebshow <davebs...@gmail.com>
Committed: Fri Aug 11 08:41:51 2017 -0400

--
 .../src/main/jython/gremlin_python/driver/serializer.py  | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/4d1e12c5/gremlin-python/src/main/jython/gremlin_python/driver/serializer.py
--
diff --git a/gremlin-python/src/main/jython/gremlin_python/driver/serializer.py 
b/gremlin-python/src/main/jython/gremlin_python/driver/serializer.py
index 679a7ce..007e162 100644
--- a/gremlin-python/src/main/jython/gremlin_python/driver/serializer.py
+++ b/gremlin-python/src/main/jython/gremlin_python/driver/serializer.py
@@ -89,8 +89,8 @@ class GraphSONMessageSerializer(object):
 """
 
 # KEEP TRACK OF CURRENT DEFAULTS
-DEFAULT_READER = graphsonV3d0.GraphSONReader()
-DEFAULT_WRITER = graphsonV3d0.GraphSONWriter()
+DEFAULT_READER_CLASS = graphsonV3d0.GraphSONReader
+DEFAULT_WRITER_CLASS = graphsonV3d0.GraphSONWriter
 DEFAULT_VERSION = b"application/vnd.gremlin-v3.0+json"
 
 def __init__(self, reader=None, writer=None, version=None):
@@ -98,10 +98,10 @@ class GraphSONMessageSerializer(object):
 version = self.DEFAULT_VERSION
 self._version = version
 if not reader:
-reader = self.DEFAULT_READER
+reader = self.DEFAULT_READER_CLASS()
 self._graphson_reader = reader
 if not writer:
-writer = self.DEFAULT_WRITER
+writer = self.DEFAULT_WRITER_CLASS()
 self.standard = Standard(writer)
 self.traversal = Traversal(writer)
 



tinkerpop git commit: store defaults as classes

2017-08-09 Thread davebshow
Repository: tinkerpop
Updated Branches:
  refs/heads/TINKERPOP-1747 83206a210 -> e95096067


store defaults as classes


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

Branch: refs/heads/TINKERPOP-1747
Commit: e95096067fbcfefd94a5174389251f11efcfad1d
Parents: 83206a2
Author: davebshow <davebs...@gmail.com>
Authored: Wed Aug 9 16:42:27 2017 -0400
Committer: davebshow <davebs...@gmail.com>
Committed: Wed Aug 9 16:42:27 2017 -0400

--
 .../src/main/jython/gremlin_python/driver/serializer.py  | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/e9509606/gremlin-python/src/main/jython/gremlin_python/driver/serializer.py
--
diff --git a/gremlin-python/src/main/jython/gremlin_python/driver/serializer.py 
b/gremlin-python/src/main/jython/gremlin_python/driver/serializer.py
index 679a7ce..007e162 100644
--- a/gremlin-python/src/main/jython/gremlin_python/driver/serializer.py
+++ b/gremlin-python/src/main/jython/gremlin_python/driver/serializer.py
@@ -89,8 +89,8 @@ class GraphSONMessageSerializer(object):
 """
 
 # KEEP TRACK OF CURRENT DEFAULTS
-DEFAULT_READER = graphsonV3d0.GraphSONReader()
-DEFAULT_WRITER = graphsonV3d0.GraphSONWriter()
+DEFAULT_READER_CLASS = graphsonV3d0.GraphSONReader
+DEFAULT_WRITER_CLASS = graphsonV3d0.GraphSONWriter
 DEFAULT_VERSION = b"application/vnd.gremlin-v3.0+json"
 
 def __init__(self, reader=None, writer=None, version=None):
@@ -98,10 +98,10 @@ class GraphSONMessageSerializer(object):
 version = self.DEFAULT_VERSION
 self._version = version
 if not reader:
-reader = self.DEFAULT_READER
+reader = self.DEFAULT_READER_CLASS()
 self._graphson_reader = reader
 if not writer:
-writer = self.DEFAULT_WRITER
+writer = self.DEFAULT_WRITER_CLASS()
 self.standard = Standard(writer)
 self.traversal = Traversal(writer)
 



tinkerpop git commit: cleaned up gremlin-python message serializer classes

2017-08-09 Thread davebshow
Repository: tinkerpop
Updated Branches:
  refs/heads/TINKERPOP-1747 [created] 83206a210


cleaned up gremlin-python message serializer classes


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

Branch: refs/heads/TINKERPOP-1747
Commit: 83206a2101a0f03c515d4e1829149ed14a330dc7
Parents: 4e418c1
Author: davebshow <davebs...@gmail.com>
Authored: Wed Aug 9 15:14:44 2017 -0400
Committer: davebshow <davebs...@gmail.com>
Committed: Wed Aug 9 15:14:44 2017 -0400

--
 .../jython/gremlin_python/driver/serializer.py  | 59 +++-
 .../src/main/jython/tests/conftest.py   | 14 -
 .../main/jython/tests/driver/test_serializer.py | 37 
 3 files changed, 84 insertions(+), 26 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/83206a21/gremlin-python/src/main/jython/gremlin_python/driver/serializer.py
--
diff --git a/gremlin-python/src/main/jython/gremlin_python/driver/serializer.py 
b/gremlin-python/src/main/jython/gremlin_python/driver/serializer.py
index 8686b7b..679a7ce 100644
--- a/gremlin-python/src/main/jython/gremlin_python/driver/serializer.py
+++ b/gremlin-python/src/main/jython/gremlin_python/driver/serializer.py
@@ -81,19 +81,35 @@ class Traversal(Processor):
 return args
 
 
-class GraphSONMessageSerializer:
-"""Message serializer for GraphSON"""
-
-def __init__(self, reader=None, writer=None, 
version=b"application/vnd.gremlin-v3.0+json"):
-self.version = version
+class GraphSONMessageSerializer(object):
+"""
+Message serializer for GraphSON. Allow users to pass custom reader,
+writer, and version kwargs for custom serialization. Otherwise,
+use current GraphSON version as default.
+"""
+
+# KEEP TRACK OF CURRENT DEFAULTS
+DEFAULT_READER = graphsonV3d0.GraphSONReader()
+DEFAULT_WRITER = graphsonV3d0.GraphSONWriter()
+DEFAULT_VERSION = b"application/vnd.gremlin-v3.0+json"
+
+def __init__(self, reader=None, writer=None, version=None):
+if not version:
+version = self.DEFAULT_VERSION
+self._version = version
 if not reader:
-reader = graphsonV3d0.GraphSONReader()
+reader = self.DEFAULT_READER
 self._graphson_reader = reader
 if not writer:
-writer = graphsonV3d0.GraphSONWriter()
+writer = self.DEFAULT_WRITER
 self.standard = Standard(writer)
 self.traversal = Traversal(writer)
 
+@property
+def version(self):
+"""Read only property"""
+return self._version
+
 def get_processor(self, processor):
 processor = getattr(self, processor, None)
 if not processor:
@@ -129,27 +145,20 @@ class GraphSONMessageSerializer:
 def deserialize_message(self, message):
 return self._graphson_reader.toObject(message)
 
+
 class GraphSONSerializersV2d0(GraphSONMessageSerializer):
 """Message serializer for GraphSON 2.0"""
-
-def __init__(self, reader=None, writer=None):
-GraphSONMessageSerializer.__init__(self, reader, writer, 
b"application/vnd.gremlin-v2.0+json")
-if not reader:
-self._graphson_reader = graphsonV2d0.GraphSONReader()
-if not writer:
-self._graphson_writer = graphsonV2d0.GraphSONWriter()
-self.standard = Standard(self._graphson_writer)
-self.traversal = Traversal(self._graphson_writer)
+def __init__(self):
+reader = graphsonV2d0.GraphSONReader()
+writer = graphsonV2d0.GraphSONWriter()
+version = b"application/vnd.gremlin-v2.0+json"
+super(GraphSONSerializersV2d0, self).__init__(reader, writer, version)
 
 
 class GraphSONSerializersV3d0(GraphSONMessageSerializer):
 """Message serializer for GraphSON 3.0"""
-
-def __init__(self, reader=None, writer=None):
-GraphSONMessageSerializer.__init__(self, reader, writer, 
b"application/vnd.gremlin-v3.0+json")
-if not reader:
-self._graphson_reader = graphsonV3d0.GraphSONReader()
-if not writer:
-self._graphson_writer = graphsonV3d0.GraphSONWriter()
-self.standard = Standard(self._graphson_writer)
-self.traversal = Traversal(self._graphson_writer)
\ No newline at end of file
+def __init__(self):
+reader = graphsonV3d0.GraphSONReader()
+writer = graphsonV3d0.Grap

tinkerpop git commit: updated pattern for defining anonymous dsl traversals

2017-05-11 Thread davebshow
Repository: tinkerpop
Updated Branches:
  refs/heads/TINKERPOP-786 d0a6841b6 -> 8df1da2b1


updated pattern for defining anonymous dsl traversals


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

Branch: refs/heads/TINKERPOP-786
Commit: 8df1da2b175f7e5e60d6bab0f9bc3a3ffa3058ad
Parents: d0a6841
Author: davebshow <davebs...@gmail.com>
Authored: Thu May 11 12:02:45 2017 -0400
Committer: davebshow <davebs...@gmail.com>
Committed: Thu May 11 12:07:25 2017 -0400

--
 .../python/GraphTraversalSourceGenerator.groovy |  15 +-
 .../gremlin_python/process/graph_traversal.py   | 555 ++-
 .../src/main/jython/tests/process/test_dsl.py   |  23 +-
 3 files changed, 299 insertions(+), 294 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/8df1da2b/gremlin-python/src/main/groovy/org/apache/tinkerpop/gremlin/python/GraphTraversalSourceGenerator.groovy
--
diff --git 
a/gremlin-python/src/main/groovy/org/apache/tinkerpop/gremlin/python/GraphTraversalSourceGenerator.groovy
 
b/gremlin-python/src/main/groovy/org/apache/tinkerpop/gremlin/python/GraphTraversalSourceGenerator.groovy
index c2e733f..086b8ea 100644
--- 
a/gremlin-python/src/main/groovy/org/apache/tinkerpop/gremlin/python/GraphTraversalSourceGenerator.groovy
+++ 
b/gremlin-python/src/main/groovy/org/apache/tinkerpop/gremlin/python/GraphTraversalSourceGenerator.groovy
@@ -162,11 +162,12 @@ under the License.
 
 pythonClass.append(
 """class __(object):
-  @staticmethod
-  def start():
+  graph_traversal = GraphTraversal
+  @classmethod
+  def start(cls):
 return GraphTraversal(None, None, Bytecode())
-  @staticmethod
-  def __(*args):
+  @classmethod
+  def __(cls, *args):
 return __.inject(*args)
 """)
 __.class.getMethods().
@@ -178,9 +179,9 @@ under the License.
 sort { a, b -> a <=> b }.
 forEach { method ->
 pythonClass.append(
-"""  @staticmethod
-  def ${method}(*args):
-return GraphTraversal(None, None, Bytecode()).${method}(*args)
+"""  @classmethod
+  def ${method}(cls, *args):
+return cls.graph_traversal(None, None, Bytecode()).${method}(*args)
 """)
 };
 pythonClass.append("\n\n")

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/8df1da2b/gremlin-python/src/main/jython/gremlin_python/process/graph_traversal.py
--
diff --git 
a/gremlin-python/src/main/jython/gremlin_python/process/graph_traversal.py 
b/gremlin-python/src/main/jython/gremlin_python/process/graph_traversal.py
index ef49443..1c940aa 100644
--- a/gremlin-python/src/main/jython/gremlin_python/process/graph_traversal.py
+++ b/gremlin-python/src/main/jython/gremlin_python/process/graph_traversal.py
@@ -396,285 +396,286 @@ class GraphTraversal(Traversal):
 
 
 class __(object):
-  @staticmethod
-  def start():
+  graph_traversal = GraphTraversal
+  @classmethod
+  def start(cls):
 return GraphTraversal(None, None, Bytecode())
-  @staticmethod
-  def __(*args):
+  @classmethod
+  def __(cls, *args):
 return __.inject(*args)
-  @staticmethod
-  def V(*args):
-return GraphTraversal(None, None, Bytecode()).V(*args)
-  @staticmethod
-  def addE(*args):
-return GraphTraversal(None, None, Bytecode()).addE(*args)
-  @staticmethod
-  def addInE(*args):
-return GraphTraversal(None, None, Bytecode()).addInE(*args)
-  @staticmethod
-  def addOutE(*args):
-return GraphTraversal(None, None, Bytecode()).addOutE(*args)
-  @staticmethod
-  def addV(*args):
-return GraphTraversal(None, None, Bytecode()).addV(*args)
-  @staticmethod
-  def aggregate(*args):
-return GraphTraversal(None, None, Bytecode()).aggregate(*args)
-  @staticmethod
-  def and_(*args):
-return GraphTraversal(None, None, Bytecode()).and_(*args)
-  @staticmethod
-  def as_(*args):
-return GraphTraversal(None, None, Bytecode()).as_(*args)
-  @staticmethod
-  def barrier(*args):
-return GraphTraversal(None, None, Bytecode()).barrier(*args)
-  @staticmethod
-  def both(*args):
-return GraphTraversal(None, None, Bytecode()).both(*args)
-  @staticmethod
-  def bothE(*args):
-return GraphTraversal(None, None, Bytecode()).bothE(*args)
-  @staticmethod
-  def bothV(*args):
-return GraphTraversal(None, None, Bytecode()).bothV(*args)
-  @staticmethod
-  def b

tinkerpop git commit: added basic pattern for gremlin-python dsl development

2017-05-08 Thread davebshow
Repository: tinkerpop
Updated Branches:
  refs/heads/TINKERPOP-786 3f8eae2fa -> 512c66aea


added basic pattern for gremlin-python dsl development


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

Branch: refs/heads/TINKERPOP-786
Commit: 512c66aea501d40f28ee910a99f93f00aa53d6f4
Parents: 3f8eae2
Author: davebshow <davebs...@gmail.com>
Authored: Mon May 8 17:47:37 2017 -0400
Committer: davebshow <davebs...@gmail.com>
Committed: Mon May 8 17:47:37 2017 -0400

--
 .../python/GraphTraversalSourceGenerator.groovy | 13 +++--
 .../gremlin_python/process/graph_traversal.py   | 29 ++-
 .../jython/gremlin_python/structure/graph.py|  6 ++-
 .../src/main/jython/tests/process/test_dsl.py   | 54 
 4 files changed, 84 insertions(+), 18 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/512c66ae/gremlin-python/src/main/groovy/org/apache/tinkerpop/gremlin/python/GraphTraversalSourceGenerator.groovy
--
diff --git 
a/gremlin-python/src/main/groovy/org/apache/tinkerpop/gremlin/python/GraphTraversalSourceGenerator.groovy
 
b/gremlin-python/src/main/groovy/org/apache/tinkerpop/gremlin/python/GraphTraversalSourceGenerator.groovy
index 1c66c35..c2e733f 100644
--- 
a/gremlin-python/src/main/groovy/org/apache/tinkerpop/gremlin/python/GraphTraversalSourceGenerator.groovy
+++ 
b/gremlin-python/src/main/groovy/org/apache/tinkerpop/gremlin/python/GraphTraversalSourceGenerator.groovy
@@ -75,8 +75,13 @@ under the License.
 if bytecode is None:
   bytecode = Bytecode()
 self.bytecode = bytecode
+self.graph_traversal = GraphTraversal
   def __repr__(self):
 return "graphtraversalsource[" + str(self.graph) + "]"
+  def get_graph_traversal_source(self):
+return self.__class__(self.graph, 
TraversalStrategies(self.traversal_strategies), Bytecode(self.bytecode))
+  def get_graph_traversal(self):
+return self.graph_traversal(self.graph, self.traversal_strategies, 
Bytecode(self.bytecode))
 """)
 GraphTraversalSource.getMethods(). // SOURCE STEPS
 findAll { GraphTraversalSource.class.equals(it.returnType) }.
@@ -92,14 +97,14 @@ under the License.
 forEach { method ->
 pythonClass.append(
 """  def ${method}(self, *args):
-source = GraphTraversalSource(self.graph, 
TraversalStrategies(self.traversal_strategies), Bytecode(self.bytecode))
+source = self.get_graph_traversal_source()
 source.bytecode.add_source("${SymbolHelper.toJava(method)}", *args)
 return source
 """)
 }
 pythonClass.append(
 """  def withRemote(self, remote_connection):
-source = GraphTraversalSource(self.graph, 
TraversalStrategies(self.traversal_strategies), Bytecode(self.bytecode))
+source = self.get_graph_traversal_source()
 
source.traversal_strategies.add_strategies([RemoteStrategy(remote_connection)])
 return source
   def withComputer(self,graph_computer=None, workers=None, result=None, 
persist=None, vertices=None, edges=None, configuration=None):
@@ -113,7 +118,7 @@ under the License.
 forEach { method ->
 pythonClass.append(
 """  def ${method}(self, *args):
-traversal = GraphTraversal(self.graph, self.traversal_strategies, 
Bytecode(self.bytecode))
+traversal = self.get_graph_traversal()
 traversal.bytecode.add_step("${SymbolHelper.toJava(method)}", *args)
 return traversal
 """)
@@ -126,7 +131,7 @@ under the License.
 pythonClass.append(
 """class GraphTraversal(Traversal):
   def __init__(self, graph, traversal_strategies, bytecode):
-Traversal.__init__(self, graph, traversal_strategies, bytecode)
+super(GraphTraversal, self).__init__(graph, traversal_strategies, bytecode)
   def __getitem__(self, index):
 if isinstance(index, int):
 return self.range(long(index), long(index + 1))

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/512c66ae/gremlin-python/src/main/jython/gremlin_python/process/graph_traversal.py
--
diff --git 
a/gremlin-python/src/main/jython/gremlin_python/process/graph_traversal.py 
b/gremlin-python/src/main/jython/gremlin_python/process/graph_traversal.py
index e722215..ef49443 100644
--- a/gremlin-python/src/main/jython/gremlin_

tinkerpop git commit: changed property to function for example consistency

2017-05-08 Thread davebshow
Repository: tinkerpop
Updated Branches:
  refs/heads/gremlin_python_dsl 90df40df1 -> 3f92e413f


changed property to function for example consistency


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

Branch: refs/heads/gremlin_python_dsl
Commit: 3f92e413fceacd22757d6d26a03796961ed2aa0c
Parents: 90df40d
Author: davebshow <davebs...@gmail.com>
Authored: Mon May 8 16:50:32 2017 -0400
Committer: davebshow <davebs...@gmail.com>
Committed: Mon May 8 16:50:32 2017 -0400

--
 .../gremlin_python/process/graph_traversal.py| 19 +--
 1 file changed, 9 insertions(+), 10 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/3f92e413/gremlin-python/src/main/jython/gremlin_python/process/graph_traversal.py
--
diff --git 
a/gremlin-python/src/main/jython/gremlin_python/process/graph_traversal.py 
b/gremlin-python/src/main/jython/gremlin_python/process/graph_traversal.py
index fc8df6b..fbe8a97 100644
--- a/gremlin-python/src/main/jython/gremlin_python/process/graph_traversal.py
+++ b/gremlin-python/src/main/jython/gremlin_python/process/graph_traversal.py
@@ -36,41 +36,40 @@ class GraphTraversalSource(object):
 self.graph_traversal = GraphTraversal
   def __repr__(self):
 return "graphtraversalsource[" + str(self.graph) + "]"
-  @property
-  def graph_traversal_source(self):
+  def get_graph_traversal_source(self):
 return self.__class__(self.graph, 
TraversalStrategies(self.traversal_strategies), Bytecode(self.bytecode))
   def get_graph_traversal(self):
 return self.graph_traversal(self.graph, self.traversal_strategies, 
Bytecode(self.bytecode))
   def withBindings(self, *args):
-source = self.graph_traversal_source
+source = self.get_graph_traversal_source()
 source.bytecode.add_source("withBindings", *args)
 return source
   def withBulk(self, *args):
-source = self.graph_traversal_source
+source = self.get_graph_traversal_source()
 source.bytecode.add_source("withBulk", *args)
 return source
   def withPath(self, *args):
-source = self.graph_traversal_source
+source = self.get_graph_traversal_source()
 source.bytecode.add_source("withPath", *args)
 return source
   def withSack(self, *args):
-source = self.graph_traversal_source
+source = self.get_graph_traversal_source()
 source.bytecode.add_source("withSack", *args)
 return source
   def withSideEffect(self, *args):
-source = self.graph_traversal_source
+source = self.get_graph_traversal_source()
 source.bytecode.add_source("withSideEffect", *args)
 return source
   def withStrategies(self, *args):
-source = self.graph_traversal_source
+source = self.get_graph_traversal_source()
 source.bytecode.add_source("withStrategies", *args)
 return source
   def withoutStrategies(self, *args):
-source = self.graph_traversal_source
+source = self.get_graph_traversal_source()
 source.bytecode.add_source("withoutStrategies", *args)
 return source
   def withRemote(self, remote_connection):
-source = self.graph_traversal_source
+source = self.get_graph_traversal_source()
 
source.traversal_strategies.add_strategies([RemoteStrategy(remote_connection)])
 return source
   def withComputer(self,graph_computer=None, workers=None, result=None, 
persist=None, vertices=None, edges=None, configuration=None):



tinkerpop git commit: added simple example of python dsl

2017-05-08 Thread davebshow
Repository: tinkerpop
Updated Branches:
  refs/heads/gremlin_python_dsl [created] 90df40df1


added simple example of python dsl


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

Branch: refs/heads/gremlin_python_dsl
Commit: 90df40df10b3fa580774da9fa4ff2ad7b51af949
Parents: 5199cd1
Author: davebshow <davebs...@gmail.com>
Authored: Mon May 8 16:47:44 2017 -0400
Committer: davebshow <davebs...@gmail.com>
Committed: Mon May 8 16:47:44 2017 -0400

--
 .../gremlin_python/process/graph_traversal.py   | 36 +++--
 .../jython/gremlin_python/structure/graph.py|  6 ++-
 .../src/main/jython/tests/process/test_dsl.py   | 54 
 3 files changed, 78 insertions(+), 18 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/90df40df/gremlin-python/src/main/jython/gremlin_python/process/graph_traversal.py
--
diff --git 
a/gremlin-python/src/main/jython/gremlin_python/process/graph_traversal.py 
b/gremlin-python/src/main/jython/gremlin_python/process/graph_traversal.py
index df61495..fc8df6b 100644
--- a/gremlin-python/src/main/jython/gremlin_python/process/graph_traversal.py
+++ b/gremlin-python/src/main/jython/gremlin_python/process/graph_traversal.py
@@ -25,6 +25,7 @@ from ..driver.remote_connection import RemoteStrategy
 from .. import statics
 from ..statics import long
 
+
 class GraphTraversalSource(object):
   def __init__(self, graph, traversal_strategies, bytecode=None):
 self.graph = graph
@@ -32,63 +33,69 @@ class GraphTraversalSource(object):
 if bytecode is None:
   bytecode = Bytecode()
 self.bytecode = bytecode
+self.graph_traversal = GraphTraversal
   def __repr__(self):
 return "graphtraversalsource[" + str(self.graph) + "]"
+  @property
+  def graph_traversal_source(self):
+return self.__class__(self.graph, 
TraversalStrategies(self.traversal_strategies), Bytecode(self.bytecode))
+  def get_graph_traversal(self):
+return self.graph_traversal(self.graph, self.traversal_strategies, 
Bytecode(self.bytecode))
   def withBindings(self, *args):
-source = GraphTraversalSource(self.graph, 
TraversalStrategies(self.traversal_strategies), Bytecode(self.bytecode))
+source = self.graph_traversal_source
 source.bytecode.add_source("withBindings", *args)
 return source
   def withBulk(self, *args):
-source = GraphTraversalSource(self.graph, 
TraversalStrategies(self.traversal_strategies), Bytecode(self.bytecode))
+source = self.graph_traversal_source
 source.bytecode.add_source("withBulk", *args)
 return source
   def withPath(self, *args):
-source = GraphTraversalSource(self.graph, 
TraversalStrategies(self.traversal_strategies), Bytecode(self.bytecode))
+source = self.graph_traversal_source
 source.bytecode.add_source("withPath", *args)
 return source
   def withSack(self, *args):
-source = GraphTraversalSource(self.graph, 
TraversalStrategies(self.traversal_strategies), Bytecode(self.bytecode))
+source = self.graph_traversal_source
 source.bytecode.add_source("withSack", *args)
 return source
   def withSideEffect(self, *args):
-source = GraphTraversalSource(self.graph, 
TraversalStrategies(self.traversal_strategies), Bytecode(self.bytecode))
+source = self.graph_traversal_source
 source.bytecode.add_source("withSideEffect", *args)
 return source
   def withStrategies(self, *args):
-source = GraphTraversalSource(self.graph, 
TraversalStrategies(self.traversal_strategies), Bytecode(self.bytecode))
+source = self.graph_traversal_source
 source.bytecode.add_source("withStrategies", *args)
 return source
   def withoutStrategies(self, *args):
-source = GraphTraversalSource(self.graph, 
TraversalStrategies(self.traversal_strategies), Bytecode(self.bytecode))
+source = self.graph_traversal_source
 source.bytecode.add_source("withoutStrategies", *args)
 return source
   def withRemote(self, remote_connection):
-source = GraphTraversalSource(self.graph, 
TraversalStrategies(self.traversal_strategies), Bytecode(self.bytecode))
+source = self.graph_traversal_source
 
source.traversal_strategies.add_strategies([RemoteStrategy(remote_connection)])
 return source
   def withComputer(self,graph_computer=None, workers=None, result=None, 
persist=None, vertices=None, edges=None, configuration=None):
 return 
self.withStrategies(VertexProgramStrategy(graph_computer,workers,result,pe

tinkerpop git commit: CTR fixed long in graphson tests

2017-04-19 Thread davebshow
Repository: tinkerpop
Updated Branches:
  refs/heads/master 2bb231d4e -> f3ae7ff4e


CTR fixed long in graphson tests


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

Branch: refs/heads/master
Commit: f3ae7ff4ef8108d789a3f1d4724586ddc9d0ec18
Parents: 2bb231d
Author: davebshow <davebs...@gmail.com>
Authored: Wed Apr 19 10:52:43 2017 -0400
Committer: davebshow <davebs...@gmail.com>
Committed: Wed Apr 19 10:52:43 2017 -0400

--
 gremlin-python/src/main/jython/tests/structure/io/test_graphson.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/f3ae7ff4/gremlin-python/src/main/jython/tests/structure/io/test_graphson.py
--
diff --git a/gremlin-python/src/main/jython/tests/structure/io/test_graphson.py 
b/gremlin-python/src/main/jython/tests/structure/io/test_graphson.py
index 0b25a42..719550b 100644
--- a/gremlin-python/src/main/jython/tests/structure/io/test_graphson.py
+++ b/gremlin-python/src/main/jython/tests/structure/io/test_graphson.py
@@ -211,7 +211,7 @@ class TestGraphSONWriter(object):
 
 def test_graph(self):
 # TODO: this assert is not compatible with python 3 and now that we 
test with both 2 and 3 it fails
-# assert {"@type": "g:Vertex", "@value": {"id": {"@type": "g:Int64", 
"@value": 12}, "label": "person"}} == 
json.loads(self.graphson_writer.writeObject(Vertex(12L, "person")))
+assert {"@type": "g:Vertex", "@value": {"id": {"@type": "g:Int64", 
"@value": 12}, "label": "person"}} == 
json.loads(self.graphson_writer.writeObject(Vertex(long(12), "person")))
 
 assert {"@type": "g:Edge", "@value": {"id": {"@type": "g:Int32", 
"@value": 7},
   "outV": {"@type": "g:Int32", 
"@value": 0},



[1/3] tinkerpop git commit: removed unittest from gremlin-python tests

2017-04-10 Thread davebshow
Repository: tinkerpop
Updated Branches:
  refs/heads/tp32 021831eda -> 2436a69e9


removed unittest from gremlin-python tests


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

Branch: refs/heads/tp32
Commit: d06868292d7f2592772dac2f15281fe2803cc328
Parents: 95d3efc
Author: davebshow <davebs...@gmail.com>
Authored: Tue Apr 4 22:02:08 2017 -0400
Committer: davebshow <davebs...@gmail.com>
Committed: Tue Apr 4 22:02:08 2017 -0400

--
 .../src/main/jython/tests/process/test_strategies.py  |  8 +---
 .../src/main/jython/tests/process/test_traversal.py   |  9 +
 .../src/main/jython/tests/structure/io/test_graphson.py   | 10 ++
 .../src/main/jython/tests/structure/test_graph.py |  9 +
 gremlin-python/src/main/jython/tests/test_statics.py  |  9 +
 5 files changed, 6 insertions(+), 39 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/d0686829/gremlin-python/src/main/jython/tests/process/test_strategies.py
--
diff --git a/gremlin-python/src/main/jython/tests/process/test_strategies.py 
b/gremlin-python/src/main/jython/tests/process/test_strategies.py
index 6d1d2c3..008ec80 100644
--- a/gremlin-python/src/main/jython/tests/process/test_strategies.py
+++ b/gremlin-python/src/main/jython/tests/process/test_strategies.py
@@ -19,15 +19,12 @@ under the License.
 
 __author__ = 'Marko A. Rodriguez (http://markorodriguez.com)'
 
-import unittest
-from unittest import TestCase
-
 from gremlin_python.structure.graph import Graph
 from gremlin_python.process.strategies import *
 from gremlin_python.process.graph_traversal import __
 
 
-class TestTraversalStrategies(TestCase):
+class TestTraversalStrategies(object):
 def test_singletons(self):
 g = Graph().traversal()
 bytecode = g.withStrategies(ReadOnlyStrategy()).bytecode
@@ -101,6 +98,3 @@ class TestTraversalStrategies(TestCase):
 strategy = bytecode.source_instructions[0][1]
 assert 1 == len(strategy.configuration)
 assert __.has("name","marko") == strategy.configuration["vertices"]
-
-if __name__ == '__main__':
-unittest.main()

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/d0686829/gremlin-python/src/main/jython/tests/process/test_traversal.py
--
diff --git a/gremlin-python/src/main/jython/tests/process/test_traversal.py 
b/gremlin-python/src/main/jython/tests/process/test_traversal.py
index eb652f4..aba7781 100644
--- a/gremlin-python/src/main/jython/tests/process/test_traversal.py
+++ b/gremlin-python/src/main/jython/tests/process/test_traversal.py
@@ -19,16 +19,13 @@ under the License.
 
 __author__ = 'Marko A. Rodriguez (http://markorodriguez.com)'
 
-import unittest
-from unittest import TestCase
-
 from gremlin_python.structure.graph import Graph
 from gremlin_python.process.traversal import P
 from gremlin_python.process.traversal import Binding
 from gremlin_python.process.graph_traversal import __
 
 
-class TestTraversal(TestCase):
+class TestTraversal(object):
 def test_bytecode(self):
 g = Graph().traversal()
 bytecode = g.V().out("created").bytecode
@@ -85,7 +82,3 @@ class TestTraversal(TestCase):
 assert 0 == len(bytecode.bindings.keys())
 assert 0 == len(bytecode.source_instructions)
 assert 0 == len(bytecode.step_instructions)
-
-
-if __name__ == '__main__':
-unittest.main()

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/d0686829/gremlin-python/src/main/jython/tests/structure/io/test_graphson.py
--
diff --git a/gremlin-python/src/main/jython/tests/structure/io/test_graphson.py 
b/gremlin-python/src/main/jython/tests/structure/io/test_graphson.py
index 7bca769..07381bf 100644
--- a/gremlin-python/src/main/jython/tests/structure/io/test_graphson.py
+++ b/gremlin-python/src/main/jython/tests/structure/io/test_graphson.py
@@ -21,8 +21,6 @@ __author__ = 'Marko A. Rodriguez (http://markorodriguez.com)'
 
 import json
 from mock import Mock
-import unittest
-from unittest import TestCase
 
 import six
 
@@ -36,7 +34,7 @@ from gremlin_python.process.strategies import SubgraphStrategy
 from gremlin_python.process.graph_traversal import __
 
 
-class TestGraphSONReader(TestCase):
+class TestGraphSONReader(object):
 graphson_reader = GraphSONReader()
 
 def test_number_input(self):
@@ -124,7 +122,7 @@ class TestGraphSONReader(TestCase):
 assert o is se

[3/3] tinkerpop git commit: Merge branch 'TINKERPOP-1665' into tp32

2017-04-10 Thread davebshow
Merge branch 'TINKERPOP-1665' into tp32


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

Branch: refs/heads/tp32
Commit: 2436a69e90006b4b2f231334baaf37358339f3cf
Parents: 021831e e745fb0
Author: davebshow <davebs...@gmail.com>
Authored: Mon Apr 10 16:40:03 2017 -0400
Committer: davebshow <davebs...@gmail.com>
Committed: Mon Apr 10 16:40:03 2017 -0400

--
 gremlin-console/src/test/python/tests/test_console.py |  8 ++--
 .../src/main/jython/tests/process/test_strategies.py  |  8 +---
 .../src/main/jython/tests/process/test_traversal.py   |  9 +
 .../src/main/jython/tests/structure/io/test_graphson.py   | 10 ++
 .../src/main/jython/tests/structure/test_graph.py |  9 +
 gremlin-python/src/main/jython/tests/test_statics.py  |  9 +
 6 files changed, 8 insertions(+), 45 deletions(-)
--




[2/4] tinkerpop git commit: removed unittest

2017-04-10 Thread davebshow
removed unittest


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

Branch: refs/heads/master
Commit: e745fb06f82559e8917a51b80a24dbd29c1f9d79
Parents: d068682
Author: davebshow <davebs...@gmail.com>
Authored: Wed Apr 5 09:30:34 2017 -0400
Committer: davebshow <davebs...@gmail.com>
Committed: Wed Apr 5 09:30:34 2017 -0400

--
 gremlin-console/src/test/python/tests/test_console.py | 8 ++--
 1 file changed, 2 insertions(+), 6 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/e745fb06/gremlin-console/src/test/python/tests/test_console.py
--
diff --git a/gremlin-console/src/test/python/tests/test_console.py 
b/gremlin-console/src/test/python/tests/test_console.py
index c2719bd..f079291 100644
--- a/gremlin-console/src/test/python/tests/test_console.py
+++ b/gremlin-console/src/test/python/tests/test_console.py
@@ -17,11 +17,10 @@ specific language governing permissions and limitations
 under the License.
 '''
 
-import unittest
-from unittest import TestCase
 import pexpect
 
-class TestConsole(TestCase):
+
+class TestConsole(object):
 
 # the base command must pass -C because if colors are enabled pexpect gets 
garbled input and tests won't pass
 gremlinsh = "bash gremlin-console/bin/gremlin.sh -C "
@@ -90,6 +89,3 @@ class TestConsole(TestCase):
 @staticmethod
 def _close(child):
 child.sendline(":x")
-
-
-



[3/4] tinkerpop git commit: Merge branch 'TINKERPOP-1665' into tp32

2017-04-10 Thread davebshow
Merge branch 'TINKERPOP-1665' into tp32


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

Branch: refs/heads/master
Commit: 2436a69e90006b4b2f231334baaf37358339f3cf
Parents: 021831e e745fb0
Author: davebshow <davebs...@gmail.com>
Authored: Mon Apr 10 16:40:03 2017 -0400
Committer: davebshow <davebs...@gmail.com>
Committed: Mon Apr 10 16:40:03 2017 -0400

--
 gremlin-console/src/test/python/tests/test_console.py |  8 ++--
 .../src/main/jython/tests/process/test_strategies.py  |  8 +---
 .../src/main/jython/tests/process/test_traversal.py   |  9 +
 .../src/main/jython/tests/structure/io/test_graphson.py   | 10 ++
 .../src/main/jython/tests/structure/test_graph.py |  9 +
 gremlin-python/src/main/jython/tests/test_statics.py  |  9 +
 6 files changed, 8 insertions(+), 45 deletions(-)
--




[4/4] tinkerpop git commit: Merge branch 'tp32', fixed conflicts in gremlin-python/src/main/jython/tests/structure/io/test_graphson.py

2017-04-10 Thread davebshow
Merge branch 'tp32', fixed conflicts in 
gremlin-python/src/main/jython/tests/structure/io/test_graphson.py


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

Branch: refs/heads/master
Commit: 18bd16e98ffc36a7ce9b629a9835efb02d88db4f
Parents: accc058 2436a69
Author: davebshow <davebs...@gmail.com>
Authored: Mon Apr 10 16:42:34 2017 -0400
Committer: davebshow <davebs...@gmail.com>
Committed: Mon Apr 10 16:42:34 2017 -0400

--
 gremlin-console/src/test/python/tests/test_console.py|  8 ++--
 .../src/main/jython/tests/process/test_strategies.py |  8 +---
 .../src/main/jython/tests/process/test_traversal.py  |  9 +
 .../src/main/jython/tests/structure/io/test_graphson.py  | 11 +++
 .../src/main/jython/tests/structure/test_graph.py|  9 +
 gremlin-python/src/main/jython/tests/test_statics.py |  9 +
 6 files changed, 9 insertions(+), 45 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/18bd16e9/gremlin-python/src/main/jython/tests/structure/io/test_graphson.py
--

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/18bd16e9/gremlin-python/src/main/jython/tests/structure/test_graph.py
--



[1/4] tinkerpop git commit: removed unittest from gremlin-python tests

2017-04-10 Thread davebshow
Repository: tinkerpop
Updated Branches:
  refs/heads/master accc05801 -> 18bd16e98


removed unittest from gremlin-python tests


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

Branch: refs/heads/master
Commit: d06868292d7f2592772dac2f15281fe2803cc328
Parents: 95d3efc
Author: davebshow <davebs...@gmail.com>
Authored: Tue Apr 4 22:02:08 2017 -0400
Committer: davebshow <davebs...@gmail.com>
Committed: Tue Apr 4 22:02:08 2017 -0400

--
 .../src/main/jython/tests/process/test_strategies.py  |  8 +---
 .../src/main/jython/tests/process/test_traversal.py   |  9 +
 .../src/main/jython/tests/structure/io/test_graphson.py   | 10 ++
 .../src/main/jython/tests/structure/test_graph.py |  9 +
 gremlin-python/src/main/jython/tests/test_statics.py  |  9 +
 5 files changed, 6 insertions(+), 39 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/d0686829/gremlin-python/src/main/jython/tests/process/test_strategies.py
--
diff --git a/gremlin-python/src/main/jython/tests/process/test_strategies.py 
b/gremlin-python/src/main/jython/tests/process/test_strategies.py
index 6d1d2c3..008ec80 100644
--- a/gremlin-python/src/main/jython/tests/process/test_strategies.py
+++ b/gremlin-python/src/main/jython/tests/process/test_strategies.py
@@ -19,15 +19,12 @@ under the License.
 
 __author__ = 'Marko A. Rodriguez (http://markorodriguez.com)'
 
-import unittest
-from unittest import TestCase
-
 from gremlin_python.structure.graph import Graph
 from gremlin_python.process.strategies import *
 from gremlin_python.process.graph_traversal import __
 
 
-class TestTraversalStrategies(TestCase):
+class TestTraversalStrategies(object):
 def test_singletons(self):
 g = Graph().traversal()
 bytecode = g.withStrategies(ReadOnlyStrategy()).bytecode
@@ -101,6 +98,3 @@ class TestTraversalStrategies(TestCase):
 strategy = bytecode.source_instructions[0][1]
 assert 1 == len(strategy.configuration)
 assert __.has("name","marko") == strategy.configuration["vertices"]
-
-if __name__ == '__main__':
-unittest.main()

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/d0686829/gremlin-python/src/main/jython/tests/process/test_traversal.py
--
diff --git a/gremlin-python/src/main/jython/tests/process/test_traversal.py 
b/gremlin-python/src/main/jython/tests/process/test_traversal.py
index eb652f4..aba7781 100644
--- a/gremlin-python/src/main/jython/tests/process/test_traversal.py
+++ b/gremlin-python/src/main/jython/tests/process/test_traversal.py
@@ -19,16 +19,13 @@ under the License.
 
 __author__ = 'Marko A. Rodriguez (http://markorodriguez.com)'
 
-import unittest
-from unittest import TestCase
-
 from gremlin_python.structure.graph import Graph
 from gremlin_python.process.traversal import P
 from gremlin_python.process.traversal import Binding
 from gremlin_python.process.graph_traversal import __
 
 
-class TestTraversal(TestCase):
+class TestTraversal(object):
 def test_bytecode(self):
 g = Graph().traversal()
 bytecode = g.V().out("created").bytecode
@@ -85,7 +82,3 @@ class TestTraversal(TestCase):
 assert 0 == len(bytecode.bindings.keys())
 assert 0 == len(bytecode.source_instructions)
 assert 0 == len(bytecode.step_instructions)
-
-
-if __name__ == '__main__':
-unittest.main()

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/d0686829/gremlin-python/src/main/jython/tests/structure/io/test_graphson.py
--
diff --git a/gremlin-python/src/main/jython/tests/structure/io/test_graphson.py 
b/gremlin-python/src/main/jython/tests/structure/io/test_graphson.py
index 7bca769..07381bf 100644
--- a/gremlin-python/src/main/jython/tests/structure/io/test_graphson.py
+++ b/gremlin-python/src/main/jython/tests/structure/io/test_graphson.py
@@ -21,8 +21,6 @@ __author__ = 'Marko A. Rodriguez (http://markorodriguez.com)'
 
 import json
 from mock import Mock
-import unittest
-from unittest import TestCase
 
 import six
 
@@ -36,7 +34,7 @@ from gremlin_python.process.strategies import SubgraphStrategy
 from gremlin_python.process.graph_traversal import __
 
 
-class TestGraphSONReader(TestCase):
+class TestGraphSONReader(object):
 graphson_reader = GraphSONReader()
 
 def test_number_input(self):
@@ -124,7 +122,7 @@ class TestGraphSONReader(TestCase):
 asser

tinkerpop git commit: removed unittest

2017-04-05 Thread davebshow
Repository: tinkerpop
Updated Branches:
  refs/heads/TINKERPOP-1665 d06868292 -> e745fb06f


removed unittest


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

Branch: refs/heads/TINKERPOP-1665
Commit: e745fb06f82559e8917a51b80a24dbd29c1f9d79
Parents: d068682
Author: davebshow <davebs...@gmail.com>
Authored: Wed Apr 5 09:30:34 2017 -0400
Committer: davebshow <davebs...@gmail.com>
Committed: Wed Apr 5 09:30:34 2017 -0400

--
 gremlin-console/src/test/python/tests/test_console.py | 8 ++--
 1 file changed, 2 insertions(+), 6 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/e745fb06/gremlin-console/src/test/python/tests/test_console.py
--
diff --git a/gremlin-console/src/test/python/tests/test_console.py 
b/gremlin-console/src/test/python/tests/test_console.py
index c2719bd..f079291 100644
--- a/gremlin-console/src/test/python/tests/test_console.py
+++ b/gremlin-console/src/test/python/tests/test_console.py
@@ -17,11 +17,10 @@ specific language governing permissions and limitations
 under the License.
 '''
 
-import unittest
-from unittest import TestCase
 import pexpect
 
-class TestConsole(TestCase):
+
+class TestConsole(object):
 
 # the base command must pass -C because if colors are enabled pexpect gets 
garbled input and tests won't pass
 gremlinsh = "bash gremlin-console/bin/gremlin.sh -C "
@@ -90,6 +89,3 @@ class TestConsole(TestCase):
 @staticmethod
 def _close(child):
 child.sendline(":x")
-
-
-



tinkerpop git commit: removed unittest from gremlin-python tests

2017-04-04 Thread davebshow
Repository: tinkerpop
Updated Branches:
  refs/heads/TINKERPOP-1665 [created] d06868292


removed unittest from gremlin-python tests


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

Branch: refs/heads/TINKERPOP-1665
Commit: d06868292d7f2592772dac2f15281fe2803cc328
Parents: 95d3efc
Author: davebshow <davebs...@gmail.com>
Authored: Tue Apr 4 22:02:08 2017 -0400
Committer: davebshow <davebs...@gmail.com>
Committed: Tue Apr 4 22:02:08 2017 -0400

--
 .../src/main/jython/tests/process/test_strategies.py  |  8 +---
 .../src/main/jython/tests/process/test_traversal.py   |  9 +
 .../src/main/jython/tests/structure/io/test_graphson.py   | 10 ++
 .../src/main/jython/tests/structure/test_graph.py |  9 +
 gremlin-python/src/main/jython/tests/test_statics.py  |  9 +
 5 files changed, 6 insertions(+), 39 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/d0686829/gremlin-python/src/main/jython/tests/process/test_strategies.py
--
diff --git a/gremlin-python/src/main/jython/tests/process/test_strategies.py 
b/gremlin-python/src/main/jython/tests/process/test_strategies.py
index 6d1d2c3..008ec80 100644
--- a/gremlin-python/src/main/jython/tests/process/test_strategies.py
+++ b/gremlin-python/src/main/jython/tests/process/test_strategies.py
@@ -19,15 +19,12 @@ under the License.
 
 __author__ = 'Marko A. Rodriguez (http://markorodriguez.com)'
 
-import unittest
-from unittest import TestCase
-
 from gremlin_python.structure.graph import Graph
 from gremlin_python.process.strategies import *
 from gremlin_python.process.graph_traversal import __
 
 
-class TestTraversalStrategies(TestCase):
+class TestTraversalStrategies(object):
 def test_singletons(self):
 g = Graph().traversal()
 bytecode = g.withStrategies(ReadOnlyStrategy()).bytecode
@@ -101,6 +98,3 @@ class TestTraversalStrategies(TestCase):
 strategy = bytecode.source_instructions[0][1]
 assert 1 == len(strategy.configuration)
 assert __.has("name","marko") == strategy.configuration["vertices"]
-
-if __name__ == '__main__':
-unittest.main()

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/d0686829/gremlin-python/src/main/jython/tests/process/test_traversal.py
--
diff --git a/gremlin-python/src/main/jython/tests/process/test_traversal.py 
b/gremlin-python/src/main/jython/tests/process/test_traversal.py
index eb652f4..aba7781 100644
--- a/gremlin-python/src/main/jython/tests/process/test_traversal.py
+++ b/gremlin-python/src/main/jython/tests/process/test_traversal.py
@@ -19,16 +19,13 @@ under the License.
 
 __author__ = 'Marko A. Rodriguez (http://markorodriguez.com)'
 
-import unittest
-from unittest import TestCase
-
 from gremlin_python.structure.graph import Graph
 from gremlin_python.process.traversal import P
 from gremlin_python.process.traversal import Binding
 from gremlin_python.process.graph_traversal import __
 
 
-class TestTraversal(TestCase):
+class TestTraversal(object):
 def test_bytecode(self):
 g = Graph().traversal()
 bytecode = g.V().out("created").bytecode
@@ -85,7 +82,3 @@ class TestTraversal(TestCase):
 assert 0 == len(bytecode.bindings.keys())
 assert 0 == len(bytecode.source_instructions)
 assert 0 == len(bytecode.step_instructions)
-
-
-if __name__ == '__main__':
-unittest.main()

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/d0686829/gremlin-python/src/main/jython/tests/structure/io/test_graphson.py
--
diff --git a/gremlin-python/src/main/jython/tests/structure/io/test_graphson.py 
b/gremlin-python/src/main/jython/tests/structure/io/test_graphson.py
index 7bca769..07381bf 100644
--- a/gremlin-python/src/main/jython/tests/structure/io/test_graphson.py
+++ b/gremlin-python/src/main/jython/tests/structure/io/test_graphson.py
@@ -21,8 +21,6 @@ __author__ = 'Marko A. Rodriguez (http://markorodriguez.com)'
 
 import json
 from mock import Mock
-import unittest
-from unittest import TestCase
 
 import six
 
@@ -36,7 +34,7 @@ from gremlin_python.process.strategies import SubgraphStrategy
 from gremlin_python.process.graph_traversal import __
 
 
-class TestGraphSONReader(TestCase):
+class TestGraphSONReader(object):
 graphson_reader = GraphSONReader()
 
 def test_number_input(self):
@@ -124,7 +122,7 @@ class TestGraphSONReader(TestCase)

[3/4] tinkerpop git commit: added tornado submod to setup

2017-02-21 Thread davebshow
added tornado submod to setup


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

Branch: refs/heads/TINKERPOP-1599
Commit: d75b9bf0633097902aa8cee3db0f4b7ad48c6f8c
Parents: 4262594
Author: davebshow <davebs...@gmail.com>
Authored: Tue Feb 21 14:20:37 2017 -0500
Committer: davebshow <davebs...@gmail.com>
Committed: Tue Feb 21 14:20:37 2017 -0500

--
 gremlin-python/src/main/jython/setup.py | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/d75b9bf0/gremlin-python/src/main/jython/setup.py
--
diff --git a/gremlin-python/src/main/jython/setup.py 
b/gremlin-python/src/main/jython/setup.py
index 8b30b9f..da7da68 100644
--- a/gremlin-python/src/main/jython/setup.py
+++ b/gremlin-python/src/main/jython/setup.py
@@ -56,7 +56,9 @@ if sys.version_info < (3,2):
 setup(
 name='gremlinpython',
 version=version,
-packages=['gremlin_python', 'gremlin_python.driver', 
'gremlin_python.process', 'gremlin_python.structure', 
'gremlin_python.structure.io'],
+packages=['gremlin_python', 'gremlin_python.driver',
+  'gremlin_python.driver.tornado', 'gremlin_python.process',
+  'gremlin_python.structure', 'gremlin_python.structure.io'],
 license='Apache 2',
 url='http://tinkerpop.apache.org',
 description='Gremlin-Python for Apache TinkerPop',



[12/21] tinkerpop git commit: Added tests around use of Pop in select()

2017-02-17 Thread davebshow
Added tests around use of Pop in select()

Added more javadoc and reference docs CTR


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

Branch: refs/heads/TINKERPOP-1599
Commit: 0a08bf929fdad19cbef4b21e993ce041254d8589
Parents: 123abf9
Author: Stephen Mallette 
Authored: Fri Feb 17 11:27:09 2017 -0500
Committer: Stephen Mallette 
Committed: Fri Feb 17 11:27:09 2017 -0500

--
 docs/src/reference/the-traversal.asciidoc   |  9 +++
 .../traversal/dsl/graph/GraphTraversal.java | 22 +++
 .../traversal/step/map/GroovySelectTest.groovy  | 10 +++
 .../process/traversal/step/map/SelectTest.java  | 28 
 4 files changed, 69 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/0a08bf92/docs/src/reference/the-traversal.asciidoc
--
diff --git a/docs/src/reference/the-traversal.asciidoc 
b/docs/src/reference/the-traversal.asciidoc
index 2002028..8ba51df 100644
--- a/docs/src/reference/the-traversal.asciidoc
+++ b/docs/src/reference/the-traversal.asciidoc
@@ -1960,6 +1960,15 @@ 
g.V().hasLabel('song').out('sungBy').groupCount().by('name').select(values).unfo
 
 WARNING: Note that `by()`-modulation is not supported with `select(keys)` and 
`select(values)`.
 
+There is also an option to supply a `Pop` operation to `select()` to 
manipulate `List` objects in the `Traverser`:
+
+[gremlin-groovy,modern]
+
+g.V(1).as("a").repeat(out().as("a")).times(2).select(first, "a")
+g.V(1).as("a").repeat(out().as("a")).times(2).select(last, "a")
+g.V(1).as("a").repeat(out().as("a")).times(2).select(all, "a")
+
+
 [[using-where-with-select]]
 Using Where with Select
 ^^^

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/0a08bf92/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/dsl/graph/GraphTraversal.java
--
diff --git 
a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/dsl/graph/GraphTraversal.java
 
b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/dsl/graph/GraphTraversal.java
index 0c04e83..095391d 100644
--- 
a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/dsl/graph/GraphTraversal.java
+++ 
b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/dsl/graph/GraphTraversal.java
@@ -595,6 +595,7 @@ public interface GraphTraversal extends Traversal {
  * Map the {@link Traverser} to its {@link Path} history via {@link 
Traverser#path}.
  *
  * @return the traversal with an appended {@link PathStep}.
+ * @see http://tinkerpop.apache.org/docs/${project.version}/reference/#path-step;>Reference
 Documentation - Path Step
  */
 public default GraphTraversal path() {
 this.asAdmin().getBytecode().addStep(Symbols.path);
@@ -607,6 +608,7 @@ public interface GraphTraversal extends Traversal {
  * @param matchTraversals the traversal that maintain variables which must 
hold for the life of the traverser
  * @param the type of the obejcts bound in the variables
  * @return the traversal with an appended {@link MatchStep}.
+ * @see http://tinkerpop.apache.org/docs/${project.version}/reference/#match-step;>Reference
 Documentation - Match Step
  */
 public default  GraphTraversal> match(final 
Traversal... matchTraversals) {
 this.asAdmin().getBytecode().addStep(Symbols.match, matchTraversals);
@@ -618,6 +620,7 @@ public interface GraphTraversal extends Traversal {
  *
  * @param  the sack value type
  * @return the traversal with an appended {@link SackStep}.
+ * @see http://tinkerpop.apache.org/docs/${project.version}/reference/#sack-step;>Reference
 Documentation - Sack Step
  */
 public default  GraphTraversal sack() {
 this.asAdmin().getBytecode().addStep(Symbols.sack);
@@ -646,6 +649,7 @@ public interface GraphTraversal extends Traversal {
  * @param otherSelectKeys the third+ keys to project
  * @param the type of the objects projected
  * @return the traversal with an appended {@link SelectStep}.
+ * @see http://tinkerpop.apache.org/docs/${project.version}/reference/#select-step;>Reference
 Documentation - Select Step
  */
 public default  GraphTraversal> select(final Pop 
pop, final String selectKey1, final String selectKey2, String... 

[01/21] tinkerpop git commit: Fixed an optimization bug in LazyBarrierStrategy. RemoteStrategy should be responsible for network I/O concerns (and using bulking as the optimization). [Forced Update!]

2017-02-17 Thread davebshow
Repository: tinkerpop
Updated Branches:
  refs/heads/TINKERPOP-1599 7ca1c4de9 -> 629b5c17a (forced update)


Fixed an optimization bug in LazyBarrierStrategy. RemoteStrategy should be 
responsible for network I/O concerns (and using bulking as the optimization).


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

Branch: refs/heads/TINKERPOP-1599
Commit: 080306b099b3ca5dbf5bf5041447fd1a0557b9cb
Parents: 9d74372
Author: Marko A. Rodriguez 
Authored: Wed Feb 15 15:07:53 2017 -0700
Committer: Marko A. Rodriguez 
Committed: Wed Feb 15 15:07:53 2017 -0700

--
 CHANGELOG.asciidoc  |  3 ++-
 .../upgrade/release-3.2.x-incubating.asciidoc   | 26 
 .../strategy/decoration/RemoteStrategy.java |  8 +-
 .../optimization/LazyBarrierStrategy.java   |  2 +-
 .../optimization/LazyBarrierStrategyTest.java   | 19 +++---
 .../Neo4jGraphStepStrategyTest.java |  2 +-
 .../TinkerGraphStepStrategyTest.java|  2 +-
 7 files changed, 47 insertions(+), 15 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/080306b0/CHANGELOG.asciidoc
--
diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc
index b550fe4..cf7312e 100644
--- a/CHANGELOG.asciidoc
+++ b/CHANGELOG.asciidoc
@@ -26,7 +26,8 @@ 
image::https://raw.githubusercontent.com/apache/tinkerpop/master/docs/static/ima
 TinkerPop 3.2.5 (Release Date: NOT OFFICIALLY RELEASED YET)
 ~~~
 
-
+* Fixed an optimization bug in `LazyBarrierStrategy` around appending barriers 
to the end of a `Traversal`.
+* `RemoteStrategy` is smart to try and append a `NoOpBarrierStep` in order to 
bulk traversers prior to network I/O.
 
 [[release-3-2-4]]
 TinkerPop 3.2.4 (Release Date: February 8, 2017)

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/080306b0/docs/src/upgrade/release-3.2.x-incubating.asciidoc
--
diff --git a/docs/src/upgrade/release-3.2.x-incubating.asciidoc 
b/docs/src/upgrade/release-3.2.x-incubating.asciidoc
index c199238..1247433 100644
--- a/docs/src/upgrade/release-3.2.x-incubating.asciidoc
+++ b/docs/src/upgrade/release-3.2.x-incubating.asciidoc
@@ -22,6 +22,32 @@ 
image::https://raw.githubusercontent.com/apache/tinkerpop/master/docs/static/ima
 
 *Nine Inch Gremlins*
 
+TinkerPop 3.2.5
+---
+
+*Release Date: NOT OFFICIALLY RELEASED YET*
+
+Please see the 
link:https://github.com/apache/tinkerpop/blob/3.2.5/CHANGELOG.asciidoc#release-3-2-5[changelog]
 for a complete list of all the modifications that are part of this release.
+
+Upgrading for Users
+~~~
+
+Upgrading for Providers
+~~~
+
+LazyBarrierStrategy No Longer End Appends Barriers
+++
+
+`LazyBarrierStrategy` was trying to do to much by considering `Traverser` 
effects on network I/O by appending an
+`NoOpBarrierStrategy` to the end of the root traversal. This should not be 
accomplished by `LazyBarrierStrategy`,
+but instead by `RemoteStrategy`. `RemoteStrategy` now tries to barrier-append. 
This may effect the reasoninig logic in
+some `ProviderStrategies`. Most likely not, but just be aware.
+
+See: link:https://issues.apache.org/jira/browse/TINKERPOP-1627[TINKERPOP-1627]
+
+TinkerGraph Deserialization
+^^^
+
 TinkerPop 3.2.4
 ---
 

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/080306b0/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/remote/traversal/strategy/decoration/RemoteStrategy.java
--
diff --git 
a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/remote/traversal/strategy/decoration/RemoteStrategy.java
 
b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/remote/traversal/strategy/decoration/RemoteStrategy.java
index 38ceb95..14d3b36 100644
--- 
a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/remote/traversal/strategy/decoration/RemoteStrategy.java
+++ 
b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/remote/traversal/strategy/decoration/RemoteStrategy.java
@@ -24,6 +24,8 @@ import 
org.apache.tinkerpop.gremlin.process.remote.RemoteGraph;
 import 
org.apache.tinkerpop.gremlin.process.remote.traversal.step.map.RemoteStep;
 import org.apache.tinkerpop.gremlin.process.traversal.Traversal;
 import 

[16/21] tinkerpop git commit: a couple small fixes in tests

2017-02-17 Thread davebshow
a couple small fixes in tests


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

Branch: refs/heads/TINKERPOP-1599
Commit: aa848c1add11e67cedebb6a63d2a9e40f1cb2072
Parents: 1d203b7
Author: davebshow <davebs...@gmail.com>
Authored: Mon Jan 30 20:02:25 2017 -0500
Committer: davebshow <davebs...@gmail.com>
Committed: Fri Feb 17 11:36:57 2017 -0500

--
 .../src/main/jython/gremlin_python/driver/protocol.py   | 1 -
 gremlin-python/src/main/jython/tests/conftest.py| 9 +
 gremlin-python/src/main/jython/tests/driver/test_client.py  | 5 -
 3 files changed, 5 insertions(+), 10 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/aa848c1a/gremlin-python/src/main/jython/gremlin_python/driver/protocol.py
--
diff --git a/gremlin-python/src/main/jython/gremlin_python/driver/protocol.py 
b/gremlin-python/src/main/jython/gremlin_python/driver/protocol.py
index 2ace35e..279a8f5 100644
--- a/gremlin-python/src/main/jython/gremlin_python/driver/protocol.py
+++ b/gremlin-python/src/main/jython/gremlin_python/driver/protocol.py
@@ -95,7 +95,6 @@ class GremlinServerWSProtocol(AbstractBaseProtocol):
 data = self._transport.read()
 self.data_received(data, results_dict)
 else:
-# result_set.done.set_result(None)
 del results_dict[request_id]
 else:
 del results_dict[request_id]

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/aa848c1a/gremlin-python/src/main/jython/tests/conftest.py
--
diff --git a/gremlin-python/src/main/jython/tests/conftest.py 
b/gremlin-python/src/main/jython/tests/conftest.py
index 3ab64a8..49779ac 100644
--- a/gremlin-python/src/main/jython/tests/conftest.py
+++ b/gremlin-python/src/main/jython/tests/conftest.py
@@ -31,14 +31,15 @@ from gremlin_python.driver.tornado.transport import 
TornadoTransport
 
 @pytest.fixture
 def connection(request):
+protocol = GremlinServerWSProtocol(
+username='stephen', password='password')
+executor = concurrent.futures.ThreadPoolExecutor(5)
+pool = queue.Queue()
 try:
-protocol = GremlinServerWSProtocol(
-username='stephen', password='password')
-executor = concurrent.futures.ThreadPoolExecutor(5)
-pool = queue.Queue()
 conn = Connection('ws://localhost:45940/gremlin', 'g', protocol,
   lambda: TornadoTransport(), executor, pool)
 except:
+executor.shutdown()
 pytest.skip('Gremlin Server is not running')
 else:
 def fin():

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/aa848c1a/gremlin-python/src/main/jython/tests/driver/test_client.py
--
diff --git a/gremlin-python/src/main/jython/tests/driver/test_client.py 
b/gremlin-python/src/main/jython/tests/driver/test_client.py
index 6395d7b..2e0e96c 100644
--- a/gremlin-python/src/main/jython/tests/driver/test_client.py
+++ b/gremlin-python/src/main/jython/tests/driver/test_client.py
@@ -41,7 +41,6 @@ def test_client(client):
 message = RequestMessage('traversal', 'bytecode', {'gremlin': t.bytecode})
 result_set = client.submit(message)
 assert len(result_set.all().result()) == 6
-client.close()
 
 def test_iterate_result_set(client):
 g = Graph().traversal()
@@ -52,7 +51,6 @@ def test_iterate_result_set(client):
 for result in result_set:
 results += result
 assert len(results) == 6
-client.close()
 
 def test_client_async(client):
 g = Graph().traversal()
@@ -62,7 +60,6 @@ def test_client_async(client):
 assert not future.done()
 result_set = future.result()
 assert len(result_set.all().result()) == 6
-client.close()
 
 def test_connection_share(client):
 # Overwrite fixture with pool_size=1 client
@@ -80,7 +77,6 @@ def test_connection_share(client):
 assert future.done()
 result_set = future.result()
 assert len(result_set.all().result()) == 6
-client.close()
 
 def test_multi_conn_pool(client):
 g = Graph().traversal()
@@ -95,4 +91,3 @@ def test_multi_conn_pool(client):
 # with connection pool `future` may or may not be done here
 result_set = future.result()
 assert len(result_set.all().result()) == 6
-client.close()



[04/21] tinkerpop git commit: Added ability to inject maven variables to javadoc

2017-02-17 Thread davebshow
Added ability to inject maven variables to javadoc

This will make it possible to easily cross-reference javadoc to reference docs 
CTR


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

Branch: refs/heads/TINKERPOP-1599
Commit: 7d173c86be7f6ad00eeb0a18d7b615d9f527ec48
Parents: b717615
Author: Stephen Mallette 
Authored: Thu Feb 16 13:55:18 2017 -0500
Committer: Stephen Mallette 
Committed: Thu Feb 16 13:55:18 2017 -0500

--
 .../traversal/dsl/graph/GraphTraversal.java |  1 +
 pom.xml | 36 
 2 files changed, 37 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/7d173c86/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/dsl/graph/GraphTraversal.java
--
diff --git 
a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/dsl/graph/GraphTraversal.java
 
b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/dsl/graph/GraphTraversal.java
index abcb870..2e5858a 100644
--- 
a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/dsl/graph/GraphTraversal.java
+++ 
b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/dsl/graph/GraphTraversal.java
@@ -262,6 +262,7 @@ public interface GraphTraversal extends Traversal {
  * Map any object to a fixed E value.
  *
  * @return the traversal with an appended {@link ConstantStep}.
+ * @see http://tinkerpop.apache.org/docs/${project.version}/reference/#constant-step;>Reference
 Documentation - Constant Step
  */
 public default  GraphTraversal constant(final E2 e) {
 this.asAdmin().getBytecode().addStep(Symbols.constant, e);

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/7d173c86/pom.xml
--
diff --git a/pom.xml b/pom.xml
index 00eaaab..802593e 100644
--- a/pom.xml
+++ b/pom.xml
@@ -1215,6 +1215,42 @@ limitations under the License.
 
 
 
+
+maven-resources-plugin
+
+
+apply-filters-to-javadoc
+process-resources
+
+copy-resources
+
+
+
${basedir}/target/javadoc-temp
+
+
+
${basedir}/target/site/apidocs
+true
+
+
+
+
+
+copy-java-doc-back
+process-resources
+
+copy-resources
+
+
+
${basedir}/target/site/apidocs
+
+
+
${basedir}/target/javadoc-temp
+
+
+
+
+
+
 
 
 



[08/21] tinkerpop git commit: Added javadoc/reference docs for label/id steps CTR

2017-02-17 Thread davebshow
Added javadoc/reference docs for label/id steps CTR


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

Branch: refs/heads/TINKERPOP-1599
Commit: 4215f3aa64234c786a2cdeab163c6c304940065d
Parents: 1780823
Author: Stephen Mallette 
Authored: Thu Feb 16 16:58:13 2017 -0500
Committer: Stephen Mallette 
Committed: Thu Feb 16 16:58:13 2017 -0500

--
 docs/src/reference/the-traversal.asciidoc   | 27 
 .../traversal/dsl/graph/GraphTraversal.java |  2 ++
 2 files changed, 29 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/4215f3aa/docs/src/reference/the-traversal.asciidoc
--
diff --git a/docs/src/reference/the-traversal.asciidoc 
b/docs/src/reference/the-traversal.asciidoc
index ed76a7a..b41cf4a 100644
--- a/docs/src/reference/the-traversal.asciidoc
+++ b/docs/src/reference/the-traversal.asciidoc
@@ -807,6 +807,20 @@ the key,value pairs for those verticies.
 TinkerPop does not support a regular expression predicate, although specific 
graph databases that leverage TinkerPop
 may provide a partial match extension.
 
+[[id-step]]
+Id Step
+~~~
+
+The `id()`-step (*map*) takes an `Element` and extracts its identifier from it.
+
+[gremlin-groovy,modern]
+
+g.V().id()
+g.V(1).out().id().is(2)
+g.V(1).outE().id()
+g.V(1).properties().id()
+
+
 [[inject-step]]
 Inject Step
 ~~~
@@ -855,6 +869,19 @@ g.V().where(__.in('created').values('age').
 <2> Find projects having two or more contributors.
 <3> Find projects whose contributors average age is between 30 and 35.
 
+[[label-step]]
+Label Step
+~~
+
+The `label()`-step (*map*) takes an `Element` and extracts its label from it.
+
+[gremlin-groovy,modern]
+
+g.V().label()
+g.V(1).outE().label()
+g.V(1).properties().label()
+
+
 [[limit-step]]
 Limit Step
 ~~

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/4215f3aa/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/dsl/graph/GraphTraversal.java
--
diff --git 
a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/dsl/graph/GraphTraversal.java
 
b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/dsl/graph/GraphTraversal.java
index 29f3b0a..1dcdd43 100644
--- 
a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/dsl/graph/GraphTraversal.java
+++ 
b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/dsl/graph/GraphTraversal.java
@@ -242,6 +242,7 @@ public interface GraphTraversal extends Traversal {
  * Map the {@link Element} to its {@link Element#id}.
  *
  * @return the traversal with an appended {@link IdStep}.
+ * @see http://tinkerpop.apache.org/docs/${project.version}/reference/#id-step;>Reference
 Documentation - Id Step
  */
 public default GraphTraversal id() {
 this.asAdmin().getBytecode().addStep(Symbols.id);
@@ -252,6 +253,7 @@ public interface GraphTraversal extends Traversal {
  * Map the {@link Element} to its {@link Element#label}.
  *
  * @return the traversal with an appended {@link LabelStep}.
+ * @see http://tinkerpop.apache.org/docs/${project.version}/reference/#label-step;>Reference
 Documentation - Label Step
  */
 public default GraphTraversal label() {
 this.asAdmin().getBytecode().addStep(Symbols.label);



[06/21] tinkerpop git commit: Added javadoc to GraphTraversal for all mutating steps. CTR

2017-02-17 Thread davebshow
Added javadoc to GraphTraversal for all mutating steps. CTR


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

Branch: refs/heads/TINKERPOP-1599
Commit: ff96e3c8754c6130e545636e1350d75252368bd3
Parents: a30dabc
Author: Stephen Mallette 
Authored: Thu Feb 16 16:31:02 2017 -0500
Committer: Stephen Mallette 
Committed: Thu Feb 16 16:31:02 2017 -0500

--
 .../traversal/dsl/graph/GraphTraversal.java | 62 
 1 file changed, 62 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/ff96e3c8/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/dsl/graph/GraphTraversal.java
--
diff --git 
a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/dsl/graph/GraphTraversal.java
 
b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/dsl/graph/GraphTraversal.java
index b00293d..d6e6cfd 100644
--- 
a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/dsl/graph/GraphTraversal.java
+++ 
b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/dsl/graph/GraphTraversal.java
@@ -745,11 +745,24 @@ public interface GraphTraversal extends 
Traversal {
 return this.asAdmin().addStep(new TreeStep<>(this.asAdmin()));
 }
 
+/**
+ * Adds a {@link Vertex}.
+ *
+ * @param vertexLabel the label of the {@link Vertex} to add
+ * @return the traversal with the {@link AddVertexStep} added
+ * @see http://tinkerpop.apache.org/docs/${project.version}/reference/#addvertex-step;>Reference
 Documentation - AddVertex Step
+ */
 public default GraphTraversal addV(final String vertexLabel) {
 this.asAdmin().getBytecode().addStep(Symbols.addV, vertexLabel);
 return this.asAdmin().addStep(new AddVertexStep<>(this.asAdmin(), 
vertexLabel));
 }
 
+/**
+ * Adds a {@link Vertex} with a default vertex label.
+ *
+ * @return the traversal with the {@link AddVertexStep} added
+ * @see http://tinkerpop.apache.org/docs/${project.version}/reference/#addvertex-step;>Reference
 Documentation - AddVertex Step
+ */
 public default GraphTraversal addV() {
 this.asAdmin().getBytecode().addStep(Symbols.addV);
 return this.asAdmin().addStep(new AddVertexStep<>(this.asAdmin(), 
null));
@@ -768,29 +781,68 @@ public interface GraphTraversal extends 
Traversal {
 return (GraphTraversal) this;
 }
 
+/**
+ * Adds an {@link Edge} with the specified edge label.
+ *
+ * @param edgeLabel the label of the newly added edge
+ * @return the traversal with the {@link AddEdgeStep} added
+ * @see http://tinkerpop.apache.org/docs/${project.version}/reference/#addedge-step;>Reference
 Documentation - AddEdge Step
+ */
 public default GraphTraversal addE(final String edgeLabel) {
 this.asAdmin().getBytecode().addStep(Symbols.addE, edgeLabel);
 return this.asAdmin().addStep(new AddEdgeStep<>(this.asAdmin(), 
edgeLabel));
 }
 
+/**
+ * When used as a modifier to {@link #addE(String)} this method specifies 
the step label to use for selecting the
+ * incoming vertex of the newly added {@link Edge}.
+ *
+ * @param toStepLabel the step label of the incoming vertex
+ * @return the traversal with the modified {@link AddEdgeStep}
+ * @see http://tinkerpop.apache.org/docs/${project.version}/reference/#addedge-step;>Reference
 Documentation - AddEdge Step
+ */
 public default GraphTraversal to(final String toStepLabel) {
 this.asAdmin().getBytecode().addStep(Symbols.to, toStepLabel);
 ((AddEdgeStep) 
this.asAdmin().getEndStep()).addTo(__.select(toStepLabel));
 return this;
 }
 
+/**
+ * When used as a modifier to {@link #addE(String)} this method specifies 
the step label to use for selecting the
+ * outgoing vertex of the newly added {@link Edge}.
+ *
+ * @param fromStepLabel the step label of the outgoing vertex
+ * @return the traversal with the modified {@link AddEdgeStep}
+ * @see http://tinkerpop.apache.org/docs/${project.version}/reference/#addedge-step;>Reference
 Documentation - AddEdge Step
+ */
 public default GraphTraversal from(final String fromStepLabel) {
 this.asAdmin().getBytecode().addStep(Symbols.from, fromStepLabel);
 ((AddEdgeStep) 
this.asAdmin().getEndStep()).addFrom(__.select(fromStepLabel));
 return 

[21/21] tinkerpop git commit: updated changlog, added docs

2017-02-17 Thread davebshow
updated changlog, added docs


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

Branch: refs/heads/TINKERPOP-1599
Commit: af1c579a8b99db1512d3714e94beda501b69d23e
Parents: b711b5e
Author: davebshow <davebs...@gmail.com>
Authored: Wed Feb 15 18:26:08 2017 -0500
Committer: davebshow <davebs...@gmail.com>
Committed: Fri Feb 17 11:42:24 2017 -0500

--
 CHANGELOG.asciidoc  |  5 ++
 .../src/reference/gremlin-applications.asciidoc | 71 
 .../upgrade/release-3.2.x-incubating.asciidoc   | 30 -
 3 files changed, 103 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/af1c579a/CHANGELOG.asciidoc
--
diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc
index de78d24..744ffee 100644
--- a/CHANGELOG.asciidoc
+++ b/CHANGELOG.asciidoc
@@ -29,6 +29,11 @@ TinkerPop 3.2.5 (Release Date: NOT OFFICIALLY RELEASED YET)
 * Refactor `SparkContext` handler to support external kill and stop operations.
 * Fixed an optimization bug in `LazyBarrierStrategy` around appending barriers 
to the end of a `Traversal`.
 * `TraverserIterator` in GremlinServer is smart to try and bulk traversers 
prior to network I/O.
+* Improved Gremlin-Python Driver implementation by adding a threaded client 
with basic connection pooling and support for pluggable websocket clients.
+
+Improvements
+
+TINKERPOP-1599 implement real gremlin-python driver
 
 [[release-3-2-4]]
 TinkerPop 3.2.4 (Release Date: February 8, 2017)

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/af1c579a/docs/src/reference/gremlin-applications.asciidoc
--
diff --git a/docs/src/reference/gremlin-applications.asciidoc 
b/docs/src/reference/gremlin-applications.asciidoc
index 7ca4efd..ece0a82 100644
--- a/docs/src/reference/gremlin-applications.asciidoc
+++ b/docs/src/reference/gremlin-applications.asciidoc
@@ -762,6 +762,77 @@ The above code demonstrates using the `TitanIoRegistry` 
which is an `IoRegistry`
 what classes (from Titan in this case) to auto-register during serialization.  
Gremlin Server roughly uses this same
 approach when it configures it's serializers, so using this same model will 
ensure compatibility when making requests.
 
+[[connecting-via-python]]
+Connecting via Python
+~
+
+[source,python]
+
+pip install gremlinpython
+
+
+TinkerPop3 also includes a client for Python-based applications.  It is 
referred to as Gremlin-Python Driver.
+The `Client` class implementation/interface is based on the Java Driver, with 
some restrictions. Most notably,
+Gremlin-Python does not yet implement the `Cluster` class. Instead, `Client` 
is instantiated directly.
+Usage is as follows:
+
+[source,python]
+
+from gremlin_python.driver import client <1>
+client = client.Client('ws://localhost:8182/gremlin', 'g') <2>
+
+
+<1> Import the Gremlin-Python `client` module.
+<2> Opens a reference to `localhost` - note that there are various 
configuration options that can be passed
+to the `Client` object upon instantiation as keyword arguments.
+
+Once a `Client` instance is ready, it is possible to issue some Gremlin:
+
+[source,python]
+
+result_set = client.submit("[1,2,3,4]")  <1>
+future_results = result_set.all()  <2>
+results = future_results.result() <3>
+assert results == [1, 2, 3, 4] <4>
+
+future_result_set = client.submitAsync("[1,2,3,4]") <5>
+result_set = future_result_set.result() <6>
+result = result_set.one() <7>
+assert results == [1, 2, 3, 4] <8>
+assert result_set.done.done() <9>
+
+
+<1> Submit a script that simply returns a `List` of integers.  This method 
blocks until the request is written to
+the server and a `ResultSet` is constructed.
+<2> Even though the `ResultSet` is constructed, it does not mean that the 
server has sent back the results (or even
+evaluated the script potentially).  The `ResultSet` is just a holder that is 
awaiting the results from the server. The `all` method
+returns a `concurrent.futures.Future` that resolves to a list when it is 
complete.
+<3> Block until the the script is evaluated and results are sent back by the 
server.
+<4> Verify the result.
+<5> Submit the same script to the server but don't block.
+<6> Wait until request is written to the server and `ResultSet` is constructed.
+<7> Read a single result off the result stream.
+&l

[18/21] tinkerpop git commit: added standard message processor

2017-02-17 Thread davebshow
added standard message processor


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

Branch: refs/heads/TINKERPOP-1599
Commit: 07d2064677db405493c7963a937dcbcd4f502b20
Parents: 949ed56
Author: davebshow <davebs...@gmail.com>
Authored: Wed Feb 15 14:25:28 2017 -0500
Committer: davebshow <davebs...@gmail.com>
Committed: Fri Feb 17 11:36:57 2017 -0500

--
 .../src/main/jython/gremlin_python/driver/client.py  |  5 +
 .../main/jython/gremlin_python/driver/serializer.py  | 10 ++
 .../src/main/jython/tests/driver/test_client.py  | 15 ++-
 3 files changed, 29 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/07d20646/gremlin-python/src/main/jython/gremlin_python/driver/client.py
--
diff --git a/gremlin-python/src/main/jython/gremlin_python/driver/client.py 
b/gremlin-python/src/main/jython/gremlin_python/driver/client.py
index dec39bf..fcbdf07 100644
--- a/gremlin-python/src/main/jython/gremlin_python/driver/client.py
+++ b/gremlin-python/src/main/jython/gremlin_python/driver/client.py
@@ -110,5 +110,10 @@ class Client:
 processor='traversal', op='bytecode',
 args={'gremlin': message,
   'aliases': {'g': self._traversal_source}})
+elif isinstance(message, str):
+message = request.RequestMessage(
+processor='', op='eval',
+args={'gremlin': message,
+  'aliases': {'g': self._traversal_source}})
 conn = self._pool.get(True)
 return conn.write(message)

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/07d20646/gremlin-python/src/main/jython/gremlin_python/driver/serializer.py
--
diff --git a/gremlin-python/src/main/jython/gremlin_python/driver/serializer.py 
b/gremlin-python/src/main/jython/gremlin_python/driver/serializer.py
index 10dcfd3..2db7374 100644
--- a/gremlin-python/src/main/jython/gremlin_python/driver/serializer.py
+++ b/gremlin-python/src/main/jython/gremlin_python/driver/serializer.py
@@ -48,6 +48,16 @@ class GraphSONMessageSerializer:
 
 _graphson_reader = graphson.GraphSONReader()
 
+
+class standard(Processor):
+
+def authentication(self, args):
+return args
+
+def eval(self, args):
+return args
+
+
 class traversal(Processor):
 
 def authentication(self, args):

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/07d20646/gremlin-python/src/main/jython/tests/driver/test_client.py
--
diff --git a/gremlin-python/src/main/jython/tests/driver/test_client.py 
b/gremlin-python/src/main/jython/tests/driver/test_client.py
index 2e0e96c..02582a1 100644
--- a/gremlin-python/src/main/jython/tests/driver/test_client.py
+++ b/gremlin-python/src/main/jython/tests/driver/test_client.py
@@ -35,13 +35,23 @@ def test_connection(connection):
 assert len(results) == 6
 assert isinstance(results, list)
 
-def test_client(client):
+
+def test_client_simple_eval(client):
+assert client.submit('1 + 1').all().result()[0] == 2
+
+
+def test_client_eval_traversal(client):
+assert len(client.submit('g.V()').all().result()) == 6
+
+
+def test_client_bytecode(client):
 g = Graph().traversal()
 t = g.V()
 message = RequestMessage('traversal', 'bytecode', {'gremlin': t.bytecode})
 result_set = client.submit(message)
 assert len(result_set.all().result()) == 6
 
+
 def test_iterate_result_set(client):
 g = Graph().traversal()
 t = g.V()
@@ -52,6 +62,7 @@ def test_iterate_result_set(client):
 results += result
 assert len(results) == 6
 
+
 def test_client_async(client):
 g = Graph().traversal()
 t = g.V()
@@ -61,6 +72,7 @@ def test_client_async(client):
 result_set = future.result()
 assert len(result_set.all().result()) == 6
 
+
 def test_connection_share(client):
 # Overwrite fixture with pool_size=1 client
 client = Client('ws://localhost:45940/gremlin', 'g', pool_size=1)
@@ -78,6 +90,7 @@ def test_connection_share(client):
 result_set = future.result()
 assert len(result_set.all().result()) == 6
 
+
 def test_multi_conn_pool(client):
 g = Graph().traversal()
 t = g.V()



[15/21] tinkerpop git commit: allow client users to pass bindings as a second arg

2017-02-17 Thread davebshow
allow client users to pass bindings as a second arg


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

Branch: refs/heads/TINKERPOP-1599
Commit: b711b5e667c53328aed1c5fe9baad51fde5dc0b1
Parents: e3067e9
Author: davebshow <davebs...@gmail.com>
Authored: Wed Feb 15 17:57:32 2017 -0500
Committer: davebshow <davebs...@gmail.com>
Committed: Fri Feb 17 11:36:57 2017 -0500

--
 .../src/main/jython/gremlin_python/driver/client.py  | 8 +---
 gremlin-python/src/main/jython/tests/driver/test_client.py   | 4 
 2 files changed, 9 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/b711b5e6/gremlin-python/src/main/jython/gremlin_python/driver/client.py
--
diff --git a/gremlin-python/src/main/jython/gremlin_python/driver/client.py 
b/gremlin-python/src/main/jython/gremlin_python/driver/client.py
index 0314a44..c7c7037 100644
--- a/gremlin-python/src/main/jython/gremlin_python/driver/client.py
+++ b/gremlin-python/src/main/jython/gremlin_python/driver/client.py
@@ -103,10 +103,10 @@ class Client:
 self._url, self._traversal_source, protocol,
 self._transport_factory, self._executor, self._pool)
 
-def submit(self, message):
-return self.submitAsync(message).result()
+def submit(self, message, bindings=None):
+return self.submitAsync(message, bindings=bindings).result()
 
-def submitAsync(self, message):
+def submitAsync(self, message, bindings=None):
 if isinstance(message, traversal.Bytecode):
 message = request.RequestMessage(
 processor='traversal', op='bytecode',
@@ -117,5 +117,7 @@ class Client:
 processor='', op='eval',
 args={'gremlin': message,
   'aliases': {'g': self._traversal_source}})
+if bindings:
+message.args.update(bindings)
 conn = self._pool.get(True)
 return conn.write(message)

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/b711b5e6/gremlin-python/src/main/jython/tests/driver/test_client.py
--
diff --git a/gremlin-python/src/main/jython/tests/driver/test_client.py 
b/gremlin-python/src/main/jython/tests/driver/test_client.py
index 02582a1..416caab 100644
--- a/gremlin-python/src/main/jython/tests/driver/test_client.py
+++ b/gremlin-python/src/main/jython/tests/driver/test_client.py
@@ -40,6 +40,10 @@ def test_client_simple_eval(client):
 assert client.submit('1 + 1').all().result()[0] == 2
 
 
+def test_client_simple_eval_bindings(client):
+assert client.submit('x + x', {'x': 2}).all().result()[0] == 4
+
+
 def test_client_eval_traversal(client):
 assert len(client.submit('g.V()').all().result()) == 6
 



[09/21] tinkerpop git commit: More javadocs in GraphTraversal for mean/min/max/order CTR

2017-02-17 Thread davebshow
More javadocs in GraphTraversal for mean/min/max/order CTR


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

Branch: refs/heads/TINKERPOP-1599
Commit: 14c7df95a4254625986837fbcf2842beaf415da3
Parents: 4215f3a
Author: Stephen Mallette 
Authored: Thu Feb 16 17:13:12 2017 -0500
Committer: Stephen Mallette 
Committed: Thu Feb 16 17:13:12 2017 -0500

--
 .../traversal/dsl/graph/GraphTraversal.java | 60 +++-
 1 file changed, 58 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/14c7df95/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/dsl/graph/GraphTraversal.java
--
diff --git 
a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/dsl/graph/GraphTraversal.java
 
b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/dsl/graph/GraphTraversal.java
index 1dcdd43..c5a65e0 100644
--- 
a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/dsl/graph/GraphTraversal.java
+++ 
b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/dsl/graph/GraphTraversal.java
@@ -444,6 +444,7 @@ public interface GraphTraversal extends Traversal {
  * Order all the objects in the traversal up to this point and then emit 
them one-by-one in their ordered sequence.
  *
  * @return the traversal with an appended {@link OrderGlobalStep}.
+ * @see http://tinkerpop.apache.org/docs/${project.version}/reference/#order-step;>Reference
 Documentation - Order Step
  */
 public default GraphTraversal order() {
 this.asAdmin().getBytecode().addStep(Symbols.order);
@@ -455,6 +456,7 @@ public interface GraphTraversal extends Traversal {
  *
  * @param scope whether the ordering is the current local object or the 
entire global stream.
  * @return the traversal with an appended {@link OrderGlobalStep} or 
{@link OrderLocalStep}.
+ * @see http://tinkerpop.apache.org/docs/${project.version}/reference/#order-step;>Reference
 Documentation - Order Step
  */
 public default GraphTraversal order(final Scope scope) {
 this.asAdmin().getBytecode().addStep(Symbols.order, scope);
@@ -677,60 +679,114 @@ public interface GraphTraversal extends 
Traversal {
 }
 
 /**
- * Map the traversal stream to its reduction as a sum of the {@link 
Traverser#bulk} values (i.e. count the number of traversers up to this point).
+ * Map the traversal stream to its reduction as a sum of the {@link 
Traverser#bulk} values (i.e. count the number
+ * of traversers up to this point).
  *
  * @return the traversal with an appended {@link CountGlobalStep}.
+ * @see http://tinkerpop.apache.org/docs/${project.version}/reference/#count-step;>Reference
 Documentation - Count Step
  */
 public default GraphTraversal count() {
 this.asAdmin().getBytecode().addStep(Symbols.count);
 return this.asAdmin().addStep(new CountGlobalStep<>(this.asAdmin()));
 }
 
+/**
+ * Map the traversal stream to its reduction as a sum of the {@link 
Traverser#bulk} values given the specified
+ * {@link Scope} (i.e. count the number of traversers up to this point).
+ *
+ * @return the traversal with an appended {@link CountGlobalStep} or 
{@link CountLocalStep} depending on the {@link Scope}
+ * @see http://tinkerpop.apache.org/docs/${project.version}/reference/#count-step;>Reference
 Documentation - Count Step
+ */
 public default GraphTraversal count(final Scope scope) {
 this.asAdmin().getBytecode().addStep(Symbols.count, scope);
 return this.asAdmin().addStep(scope.equals(Scope.global) ? new 
CountGlobalStep<>(this.asAdmin()) : new CountLocalStep<>(this.asAdmin()));
 }
 
 /**
- * Map the traversal stream to its reduction as a sum of the {@link 
Traverser#get} values multiplied by their {@link Traverser#bulk} (i.e. sum the 
traverser values up to this point).
+ * Map the traversal stream to its reduction as a sum of the {@link 
Traverser#get} values multiplied by their
+ * {@link Traverser#bulk} (i.e. sum the traverser values up to this point).
  *
  * @return the traversal with an appended {@link SumGlobalStep}.
+ * @see http://tinkerpop.apache.org/docs/${project.version}/reference/#sum-step;>Reference
 Documentation - Sum Step
  */
 public default  GraphTraversal sum() {
 

[20/21] tinkerpop git commit: close client in documentation examples

2017-02-17 Thread davebshow
close client in documentation examples


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

Branch: refs/heads/TINKERPOP-1599
Commit: 629b5c17a46f4eb828507eb5db8b8303af6aa49d
Parents: af1c579
Author: davebshow <davebs...@gmail.com>
Authored: Fri Feb 17 11:34:56 2017 -0500
Committer: davebshow <davebs...@gmail.com>
Committed: Fri Feb 17 11:42:24 2017 -0500

--
 docs/src/reference/gremlin-applications.asciidoc   | 3 +++
 docs/src/upgrade/release-3.2.x-incubating.asciidoc | 1 +
 2 files changed, 4 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/629b5c17/docs/src/reference/gremlin-applications.asciidoc
--
diff --git a/docs/src/reference/gremlin-applications.asciidoc 
b/docs/src/reference/gremlin-applications.asciidoc
index ece0a82..8e0edc2 100644
--- a/docs/src/reference/gremlin-applications.asciidoc
+++ b/docs/src/reference/gremlin-applications.asciidoc
@@ -800,6 +800,8 @@ result_set = future_result_set.result() <6>
 result = result_set.one() <7>
 assert results == [1, 2, 3, 4] <8>
 assert result_set.done.done() <9>
+
+client.close() <10>
 
 
 <1> Submit a script that simply returns a `List` of integers.  This method 
blocks until the request is written to
@@ -814,6 +816,7 @@ returns a `concurrent.futures.Future` that resolves to a 
list when it is complet
 <7> Read a single result off the result stream.
 <8> Again, verify the result.
 <9> Verify that the all results have been read and stream is closed.
+<10> Close client and underlying pool connections.
 
 Configuration
 ^

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/629b5c17/docs/src/upgrade/release-3.2.x-incubating.asciidoc
--
diff --git a/docs/src/upgrade/release-3.2.x-incubating.asciidoc 
b/docs/src/upgrade/release-3.2.x-incubating.asciidoc
index 6bfc028..78c276b 100644
--- a/docs/src/upgrade/release-3.2.x-incubating.asciidoc
+++ b/docs/src/upgrade/release-3.2.x-incubating.asciidoc
@@ -55,6 +55,7 @@ result_set = client.submit('1 + 1')
 future_results = result_set.all()  # returns a concurrent.futures.Future
 results = future_results.result()  # returns a list
 assert results == [2]
+client.close()  # don't forget to close underlying connections
 
 
 See: link:https://issues.apache.org/jira/browse/TINKERPOP-1599[TINKERPOP-1599]



[13/21] tinkerpop git commit: make sure to close manually created (not fixture) remote connection

2017-02-17 Thread davebshow
make sure to close manually created (not fixture) remote connection


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

Branch: refs/heads/TINKERPOP-1599
Commit: b5069ffab000fdb34f5fcb588c10452c6ea1a7bb
Parents: aa848c1
Author: davebshow <davebs...@gmail.com>
Authored: Mon Jan 30 20:07:03 2017 -0500
Committer: davebshow <davebs...@gmail.com>
Committed: Fri Feb 17 11:36:57 2017 -0500

--
 .../tests/driver/test_driver_remote_connection_threaded.py | 6 ++
 1 file changed, 6 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/b5069ffa/gremlin-python/src/main/jython/tests/driver/test_driver_remote_connection_threaded.py
--
diff --git 
a/gremlin-python/src/main/jython/tests/driver/test_driver_remote_connection_threaded.py
 
b/gremlin-python/src/main/jython/tests/driver/test_driver_remote_connection_threaded.py
index d5efc0d..dffd442 100644
--- 
a/gremlin-python/src/main/jython/tests/driver/test_driver_remote_connection_threaded.py
+++ 
b/gremlin-python/src/main/jython/tests/driver/test_driver_remote_connection_threaded.py
@@ -54,7 +54,10 @@ def test_conn_in_threads(remote_connection):
 child2.join()
 
 def _executor(q, conn):
+close = False
 if not conn:
+# This isn't a fixture so close manually
+close = True
 conn = DriverRemoteConnection(
 'ws://localhost:45940/gremlin', 'g', pool_size=4)
 try:
@@ -66,3 +69,6 @@ def _executor(q, conn):
 q.put(sys.exc_info()[0])
 else:
 q.put('success!')
+# Close conn
+if close:
+conn.close()



[05/21] tinkerpop git commit: Add javadoc for general steps on GraphTraversal CTR

2017-02-17 Thread davebshow
Add javadoc for general steps on GraphTraversal CTR


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

Branch: refs/heads/TINKERPOP-1599
Commit: a30dabc7c5eb93e644c3f706a2f33786a156a465
Parents: 7d173c8
Author: Stephen Mallette 
Authored: Thu Feb 16 16:10:43 2017 -0500
Committer: Stephen Mallette 
Committed: Thu Feb 16 16:10:43 2017 -0500

--
 .../traversal/dsl/graph/GraphTraversal.java | 56 +++-
 1 file changed, 55 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/a30dabc7/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/dsl/graph/GraphTraversal.java
--
diff --git 
a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/dsl/graph/GraphTraversal.java
 
b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/dsl/graph/GraphTraversal.java
index 2e5858a..b00293d 100644
--- 
a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/dsl/graph/GraphTraversal.java
+++ 
b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/dsl/graph/GraphTraversal.java
@@ -187,16 +187,24 @@ public interface GraphTraversal extends 
Traversal {
 / MAP STEPS /
 
 /**
- * Map a traverser referencing an object of type E to an 
object of type E2.
+ * Map a {@link Traverser} referencing an object of type E to 
an object of type E2.
  *
  * @param function the lambda expression that does the functional mapping
  * @return the traversal with an appended {@link LambdaMapStep}.
+ * @see http://tinkerpop.apache.org/docs/${project.version}/reference/#general-steps;>Reference
 Documentation - General Steps
  */
 public default  GraphTraversal map(final Function function) {
 this.asAdmin().getBytecode().addStep(Symbols.map, function);
 return this.asAdmin().addStep(new LambdaMapStep<>(this.asAdmin(), 
function));
 }
 
+/**
+ * Map a {@link Traverser} referencing an object of type E to 
an object of type E2.
+ *
+ * @param mapTraversal the traversal expression that does the functional 
mapping
+ * @return the traversal with an appended {@link LambdaMapStep}.
+ * @see http://tinkerpop.apache.org/docs/${project.version}/reference/#general-steps;>Reference
 Documentation - General Steps
+ */
 public default  GraphTraversal map(final Traversal 
mapTraversal) {
 this.asAdmin().getBytecode().addStep(Symbols.map, mapTraversal);
 return this.asAdmin().addStep(new TraversalMapStep<>(this.asAdmin(), 
mapTraversal));
@@ -209,6 +217,7 @@ public interface GraphTraversal extends Traversal {
  * @param function the lambda expression that does the functional mapping
  * @param  the type of the returned iterator objects
  * @return the traversal with an appended {@link LambdaFlatMapStep}.
+ * @see http://tinkerpop.apache.org/docs/${project.version}/reference/#general-steps;>Reference
 Documentation - General Steps
  */
 public default  GraphTraversal flatMap(final 
Function function) {
 this.asAdmin().getBytecode().addStep(Symbols.flatMap, function);
@@ -222,6 +231,7 @@ public interface GraphTraversal extends Traversal {
  * @param flatMapTraversal the traversal generating objects of type 
E2
  * @param  the end type of the internal traversal
  * @return the traversal with an appended {@link TraversalFlatMapStep}.
+ * @see http://tinkerpop.apache.org/docs/${project.version}/reference/#general-steps;>Reference
 Documentation - General Steps
  */
 public default  GraphTraversal flatMap(final Traversal 
flatMapTraversal) {
 this.asAdmin().getBytecode().addStep(Symbols.flatMap, 
flatMapTraversal);
@@ -839,11 +849,27 @@ public interface GraphTraversal extends 
Traversal {
 
 / FILTER STEPS /
 
+/**
+ * Map the {@link Traverser} to either {@code true} or {@code false}, 
where {@code false} will not pass the
+ * traverser to the next step.
+ *
+ * @param predicate the filter function to apply
+ * @return the traversal with the {@link LambdaFilterStep} added
+ * @see http://tinkerpop.apache.org/docs/${project.version}/reference/#general-steps;>Reference
 Documentation - General Steps
+ */
 public default GraphTraversal 

[14/21] tinkerpop git commit: fixtures should test for subclasses of OSError (ConnectionError, ConnectionRefusedError etc.)

2017-02-17 Thread davebshow
fixtures should test for subclasses of OSError (ConnectionError, 
ConnectionRefusedError etc.)


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

Branch: refs/heads/TINKERPOP-1599
Commit: 949ed56ee91e1fd6af38ea45f9702f6fb8883ad2
Parents: b5069ff
Author: davebshow <davebs...@gmail.com>
Authored: Tue Jan 31 10:43:59 2017 -0500
Committer: davebshow <davebs...@gmail.com>
Committed: Fri Feb 17 11:36:57 2017 -0500

--
 gremlin-python/src/main/jython/tests/conftest.py | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/949ed56e/gremlin-python/src/main/jython/tests/conftest.py
--
diff --git a/gremlin-python/src/main/jython/tests/conftest.py 
b/gremlin-python/src/main/jython/tests/conftest.py
index 49779ac..3425266 100644
--- a/gremlin-python/src/main/jython/tests/conftest.py
+++ b/gremlin-python/src/main/jython/tests/conftest.py
@@ -38,7 +38,7 @@ def connection(request):
 try:
 conn = Connection('ws://localhost:45940/gremlin', 'g', protocol,
   lambda: TornadoTransport(), executor, pool)
-except:
+except OSError:
 executor.shutdown()
 pytest.skip('Gremlin Server is not running')
 else:
@@ -52,7 +52,7 @@ def connection(request):
 def client(request):
 try:
 client = Client('ws://localhost:45940/gremlin', 'g')
-except:
+except OSError:
 pytest.skip('Gremlin Server is not running')
 else:
 def fin():
@@ -64,7 +64,7 @@ def client(request):
 def remote_connection(request):
 try:
 remote_conn = DriverRemoteConnection('ws://localhost:45940/gremlin', 
'g')
-except:
+except OSError:
 pytest.skip('Gremlin Server is not running')
 else:
 def fin():



[19/21] tinkerpop git commit: added code for new driver, updated driver tests

2017-02-17 Thread davebshow
added code for new driver, updated driver tests


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

Branch: refs/heads/TINKERPOP-1599
Commit: 1d203b7494432a5296e04581c9903f138753e964
Parents: 0a08bf9
Author: davebshow <davebs...@gmail.com>
Authored: Mon Jan 30 17:22:36 2017 -0500
Committer: davebshow <davebs...@gmail.com>
Committed: Fri Feb 17 11:36:57 2017 -0500

--
 gremlin-python/pom.xml  |   1 +
 .../python/TraversalSourceGenerator.groovy  |  11 +-
 .../main/jython/gremlin_python/driver/client.py | 114 
 .../jython/gremlin_python/driver/connection.py  |  78 ++
 .../driver/driver_remote_connection.py  | 260 +++
 .../jython/gremlin_python/driver/protocol.py| 103 
 .../gremlin_python/driver/remote_connection.py  |  98 ---
 .../jython/gremlin_python/driver/request.py |  25 ++
 .../jython/gremlin_python/driver/resultset.py   |  91 +++
 .../jython/gremlin_python/driver/serializer.py  | 117 +
 .../gremlin_python/driver/tornado/__init__.py   |  18 ++
 .../gremlin_python/driver/tornado/transport.py  |  48 
 .../jython/gremlin_python/driver/transport.py   |  46 
 .../jython/gremlin_python/process/traversal.py  |  11 +-
 gremlin-python/src/main/jython/setup.py |  18 +-
 .../src/main/jython/tests/conftest.py   |  72 +
 .../src/main/jython/tests/driver/test_client.py |  98 +++
 .../driver/test_driver_remote_connection.py | 150 ---
 .../test_driver_remote_connection_threaded.py   |  77 +++---
 .../jython/tests/structure/io/test_graphson.py  |  21 +-
 20 files changed, 1039 insertions(+), 418 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/1d203b74/gremlin-python/pom.xml
--
diff --git a/gremlin-python/pom.xml b/gremlin-python/pom.xml
index c9d6c65..2b4a80e 100644
--- a/gremlin-python/pom.xml
+++ b/gremlin-python/pom.xml
@@ -314,6 +314,7 @@
 aenum==1.4.5
 tornado==4.4.1
 six==1.10.0
+futures==3.0.5
 
 
 

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/1d203b74/gremlin-python/src/main/groovy/org/apache/tinkerpop/gremlin/python/TraversalSourceGenerator.groovy
--
diff --git 
a/gremlin-python/src/main/groovy/org/apache/tinkerpop/gremlin/python/TraversalSourceGenerator.groovy
 
b/gremlin-python/src/main/groovy/org/apache/tinkerpop/gremlin/python/TraversalSourceGenerator.groovy
index fc76b71..995fe80 100644
--- 
a/gremlin-python/src/main/groovy/org/apache/tinkerpop/gremlin/python/TraversalSourceGenerator.groovy
+++ 
b/gremlin-python/src/main/groovy/org/apache/tinkerpop/gremlin/python/TraversalSourceGenerator.groovy
@@ -116,15 +116,16 @@ class Traversal(object):
 return tempList
 def promise(self, cb=None):
 self.traversal_strategies.apply_async_strategies(self)
-future_traversers = self.traversers
-future = type(future_traversers)()
+future_traversal = self.remote_results
+future = type(future_traversal)()
 def process(f):
 try:
-traversers = f.result()
+traversal = f.result()
 except Exception as e:
 future.set_exception(e)
 else:
-self.traversers = iter(traversers)
+self.traversers = iter(traversal.traversers)
+self.side_effects = traversal.side_effects
 if cb:
 try:
 result = cb(self)
@@ -134,7 +135,7 @@ class Traversal(object):
 future.set_result(result)
 else:
 future.set_result(self)
-future_traversers.add_done_callback(process)
+future_traversal.add_done_callback(process)
 return future
 
 

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/1d203b74/gremlin-python/src/main/jython/gremlin_python/driver/client.py
--
diff --git a/gremlin-python/src/main/jython/gremlin_python/driver/client.py 
b/gremlin-python/src/main/jython/gremlin_python/driver/client.py
new file mode 100644
index 000..dec39bf
--- /dev/null
+++ b/gremlin-python/src/main/jython/gremlin_python/driver/client.py
@@

[03/21] tinkerpop git commit: Merge branch 'TINKERPOP-1627' into tp32

2017-02-17 Thread davebshow
Merge branch 'TINKERPOP-1627' into tp32


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

Branch: refs/heads/TINKERPOP-1599
Commit: b717615dfe6176413f223316f925c975d81ba1c1
Parents: 4a328b9 b635c80
Author: Marko A. Rodriguez 
Authored: Thu Feb 16 11:09:32 2017 -0700
Committer: Marko A. Rodriguez 
Committed: Thu Feb 16 11:09:32 2017 -0700

--
 CHANGELOG.asciidoc  |  3 ++-
 .../upgrade/release-3.2.x-incubating.asciidoc   | 26 
 .../strategy/decoration/RemoteStrategy.java |  1 -
 .../optimization/LazyBarrierStrategy.java   |  2 +-
 .../optimization/LazyBarrierStrategyTest.java   | 19 +++---
 .../gremlin/server/util/TraverserIterator.java  | 21 +---
 .../Neo4jGraphStepStrategyTest.java |  2 +-
 .../TinkerGraphStepStrategyTest.java|  2 +-
 8 files changed, 58 insertions(+), 18 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/b717615d/CHANGELOG.asciidoc
--
diff --cc CHANGELOG.asciidoc
index e3c78f9,30fb41e..de78d24
--- a/CHANGELOG.asciidoc
+++ b/CHANGELOG.asciidoc
@@@ -26,8 -26,8 +26,9 @@@ image::https://raw.githubusercontent.co
  TinkerPop 3.2.5 (Release Date: NOT OFFICIALLY RELEASED YET)
  ~~~
  
 +* Refactor `SparkContext` handler to support external kill and stop 
operations.
- 
+ * Fixed an optimization bug in `LazyBarrierStrategy` around appending 
barriers to the end of a `Traversal`.
+ * `TraverserIterator` in GremlinServer is smart to try and bulk traversers 
prior to network I/O.
  
  [[release-3-2-4]]
  TinkerPop 3.2.4 (Release Date: February 8, 2017)



tinkerpop git commit: close client in documentation examples

2017-02-17 Thread davebshow
Repository: tinkerpop
Updated Branches:
  refs/heads/TINKERPOP-1599 44a20fdcf -> 7ca1c4de9


close client in documentation examples


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

Branch: refs/heads/TINKERPOP-1599
Commit: 7ca1c4de959410e873fb90b29793a051ba730d37
Parents: 44a20fd
Author: davebshow <davebs...@gmail.com>
Authored: Fri Feb 17 11:34:56 2017 -0500
Committer: davebshow <davebs...@gmail.com>
Committed: Fri Feb 17 11:34:56 2017 -0500

--
 docs/src/reference/gremlin-applications.asciidoc   | 3 +++
 docs/src/upgrade/release-3.2.x-incubating.asciidoc | 1 +
 2 files changed, 4 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/7ca1c4de/docs/src/reference/gremlin-applications.asciidoc
--
diff --git a/docs/src/reference/gremlin-applications.asciidoc 
b/docs/src/reference/gremlin-applications.asciidoc
index ece0a82..8e0edc2 100644
--- a/docs/src/reference/gremlin-applications.asciidoc
+++ b/docs/src/reference/gremlin-applications.asciidoc
@@ -800,6 +800,8 @@ result_set = future_result_set.result() <6>
 result = result_set.one() <7>
 assert results == [1, 2, 3, 4] <8>
 assert result_set.done.done() <9>
+
+client.close() <10>
 
 
 <1> Submit a script that simply returns a `List` of integers.  This method 
blocks until the request is written to
@@ -814,6 +816,7 @@ returns a `concurrent.futures.Future` that resolves to a 
list when it is complet
 <7> Read a single result off the result stream.
 <8> Again, verify the result.
 <9> Verify that the all results have been read and stream is closed.
+<10> Close client and underlying pool connections.
 
 Configuration
 ^

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/7ca1c4de/docs/src/upgrade/release-3.2.x-incubating.asciidoc
--
diff --git a/docs/src/upgrade/release-3.2.x-incubating.asciidoc 
b/docs/src/upgrade/release-3.2.x-incubating.asciidoc
index c3c43e8..7b1e8d8 100644
--- a/docs/src/upgrade/release-3.2.x-incubating.asciidoc
+++ b/docs/src/upgrade/release-3.2.x-incubating.asciidoc
@@ -53,6 +53,7 @@ result_set = client.submit('1 + 1')
 future_results = result_set.all()  # returns a concurrent.futures.Future
 results = future_results.result()  # returns a list
 assert results == [2]
+client.close()  # don't forget to close underlying connections
 
 
 See: link:https://issues.apache.org/jira/browse/TINKERPOP-1599[TINKERPOP-1599]



[05/11] tinkerpop git commit: a couple small fixes in tests

2017-02-15 Thread davebshow
a couple small fixes in tests


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

Branch: refs/heads/TINKERPOP-1599
Commit: dce23a7641973a33c4033902582854a4c143e61e
Parents: 4e4bc57
Author: davebshow <davebs...@gmail.com>
Authored: Mon Jan 30 20:02:25 2017 -0500
Committer: davebshow <davebs...@gmail.com>
Committed: Wed Feb 15 18:28:20 2017 -0500

--
 .../src/main/jython/gremlin_python/driver/protocol.py   | 1 -
 gremlin-python/src/main/jython/tests/conftest.py| 9 +
 gremlin-python/src/main/jython/tests/driver/test_client.py  | 5 -
 3 files changed, 5 insertions(+), 10 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/dce23a76/gremlin-python/src/main/jython/gremlin_python/driver/protocol.py
--
diff --git a/gremlin-python/src/main/jython/gremlin_python/driver/protocol.py 
b/gremlin-python/src/main/jython/gremlin_python/driver/protocol.py
index 2ace35e..279a8f5 100644
--- a/gremlin-python/src/main/jython/gremlin_python/driver/protocol.py
+++ b/gremlin-python/src/main/jython/gremlin_python/driver/protocol.py
@@ -95,7 +95,6 @@ class GremlinServerWSProtocol(AbstractBaseProtocol):
 data = self._transport.read()
 self.data_received(data, results_dict)
 else:
-# result_set.done.set_result(None)
 del results_dict[request_id]
 else:
 del results_dict[request_id]

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/dce23a76/gremlin-python/src/main/jython/tests/conftest.py
--
diff --git a/gremlin-python/src/main/jython/tests/conftest.py 
b/gremlin-python/src/main/jython/tests/conftest.py
index 3ab64a8..49779ac 100644
--- a/gremlin-python/src/main/jython/tests/conftest.py
+++ b/gremlin-python/src/main/jython/tests/conftest.py
@@ -31,14 +31,15 @@ from gremlin_python.driver.tornado.transport import 
TornadoTransport
 
 @pytest.fixture
 def connection(request):
+protocol = GremlinServerWSProtocol(
+username='stephen', password='password')
+executor = concurrent.futures.ThreadPoolExecutor(5)
+pool = queue.Queue()
 try:
-protocol = GremlinServerWSProtocol(
-username='stephen', password='password')
-executor = concurrent.futures.ThreadPoolExecutor(5)
-pool = queue.Queue()
 conn = Connection('ws://localhost:45940/gremlin', 'g', protocol,
   lambda: TornadoTransport(), executor, pool)
 except:
+executor.shutdown()
 pytest.skip('Gremlin Server is not running')
 else:
 def fin():

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/dce23a76/gremlin-python/src/main/jython/tests/driver/test_client.py
--
diff --git a/gremlin-python/src/main/jython/tests/driver/test_client.py 
b/gremlin-python/src/main/jython/tests/driver/test_client.py
index 6395d7b..2e0e96c 100644
--- a/gremlin-python/src/main/jython/tests/driver/test_client.py
+++ b/gremlin-python/src/main/jython/tests/driver/test_client.py
@@ -41,7 +41,6 @@ def test_client(client):
 message = RequestMessage('traversal', 'bytecode', {'gremlin': t.bytecode})
 result_set = client.submit(message)
 assert len(result_set.all().result()) == 6
-client.close()
 
 def test_iterate_result_set(client):
 g = Graph().traversal()
@@ -52,7 +51,6 @@ def test_iterate_result_set(client):
 for result in result_set:
 results += result
 assert len(results) == 6
-client.close()
 
 def test_client_async(client):
 g = Graph().traversal()
@@ -62,7 +60,6 @@ def test_client_async(client):
 assert not future.done()
 result_set = future.result()
 assert len(result_set.all().result()) == 6
-client.close()
 
 def test_connection_share(client):
 # Overwrite fixture with pool_size=1 client
@@ -80,7 +77,6 @@ def test_connection_share(client):
 assert future.done()
 result_set = future.result()
 assert len(result_set.all().result()) == 6
-client.close()
 
 def test_multi_conn_pool(client):
 g = Graph().traversal()
@@ -95,4 +91,3 @@ def test_multi_conn_pool(client):
 # with connection pool `future` may or may not be done here
 result_set = future.result()
 assert len(result_set.all().result()) == 6
-client.close()



[10/11] tinkerpop git commit: allow client users to pass bindings as a second arg

2017-02-15 Thread davebshow
allow client users to pass bindings as a second arg


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

Branch: refs/heads/TINKERPOP-1599
Commit: 351513e43fe6495c6e1d47b957e6d5d35123326d
Parents: c2da0c3
Author: davebshow <davebs...@gmail.com>
Authored: Wed Feb 15 17:57:32 2017 -0500
Committer: davebshow <davebs...@gmail.com>
Committed: Wed Feb 15 18:28:20 2017 -0500

--
 .../src/main/jython/gremlin_python/driver/client.py  | 8 +---
 gremlin-python/src/main/jython/tests/driver/test_client.py   | 4 
 2 files changed, 9 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/351513e4/gremlin-python/src/main/jython/gremlin_python/driver/client.py
--
diff --git a/gremlin-python/src/main/jython/gremlin_python/driver/client.py 
b/gremlin-python/src/main/jython/gremlin_python/driver/client.py
index 0314a44..c7c7037 100644
--- a/gremlin-python/src/main/jython/gremlin_python/driver/client.py
+++ b/gremlin-python/src/main/jython/gremlin_python/driver/client.py
@@ -103,10 +103,10 @@ class Client:
 self._url, self._traversal_source, protocol,
 self._transport_factory, self._executor, self._pool)
 
-def submit(self, message):
-return self.submitAsync(message).result()
+def submit(self, message, bindings=None):
+return self.submitAsync(message, bindings=bindings).result()
 
-def submitAsync(self, message):
+def submitAsync(self, message, bindings=None):
 if isinstance(message, traversal.Bytecode):
 message = request.RequestMessage(
 processor='traversal', op='bytecode',
@@ -117,5 +117,7 @@ class Client:
 processor='', op='eval',
 args={'gremlin': message,
   'aliases': {'g': self._traversal_source}})
+if bindings:
+message.args.update(bindings)
 conn = self._pool.get(True)
 return conn.write(message)

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/351513e4/gremlin-python/src/main/jython/tests/driver/test_client.py
--
diff --git a/gremlin-python/src/main/jython/tests/driver/test_client.py 
b/gremlin-python/src/main/jython/tests/driver/test_client.py
index 02582a1..416caab 100644
--- a/gremlin-python/src/main/jython/tests/driver/test_client.py
+++ b/gremlin-python/src/main/jython/tests/driver/test_client.py
@@ -40,6 +40,10 @@ def test_client_simple_eval(client):
 assert client.submit('1 + 1').all().result()[0] == 2
 
 
+def test_client_simple_eval_bindings(client):
+assert client.submit('x + x', {'x': 2}).all().result()[0] == 4
+
+
 def test_client_eval_traversal(client):
 assert len(client.submit('g.V()').all().result()) == 6
 



[07/11] tinkerpop git commit: make sure to close manually created (not fixture) remote connection

2017-02-15 Thread davebshow
make sure to close manually created (not fixture) remote connection


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

Branch: refs/heads/TINKERPOP-1599
Commit: 360511560c090574a4f92e4984b7c39bbe28c5ea
Parents: dce23a7
Author: davebshow <davebs...@gmail.com>
Authored: Mon Jan 30 20:07:03 2017 -0500
Committer: davebshow <davebs...@gmail.com>
Committed: Wed Feb 15 18:28:20 2017 -0500

--
 .../tests/driver/test_driver_remote_connection_threaded.py | 6 ++
 1 file changed, 6 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/36051156/gremlin-python/src/main/jython/tests/driver/test_driver_remote_connection_threaded.py
--
diff --git 
a/gremlin-python/src/main/jython/tests/driver/test_driver_remote_connection_threaded.py
 
b/gremlin-python/src/main/jython/tests/driver/test_driver_remote_connection_threaded.py
index d5efc0d..dffd442 100644
--- 
a/gremlin-python/src/main/jython/tests/driver/test_driver_remote_connection_threaded.py
+++ 
b/gremlin-python/src/main/jython/tests/driver/test_driver_remote_connection_threaded.py
@@ -54,7 +54,10 @@ def test_conn_in_threads(remote_connection):
 child2.join()
 
 def _executor(q, conn):
+close = False
 if not conn:
+# This isn't a fixture so close manually
+close = True
 conn = DriverRemoteConnection(
 'ws://localhost:45940/gremlin', 'g', pool_size=4)
 try:
@@ -66,3 +69,6 @@ def _executor(q, conn):
 q.put(sys.exc_info()[0])
 else:
 q.put('success!')
+# Close conn
+if close:
+conn.close()



[08/11] tinkerpop git commit: fixtures should test for subclasses of OSError (ConnectionError, ConnectionRefusedError etc.)

2017-02-15 Thread davebshow
fixtures should test for subclasses of OSError (ConnectionError, 
ConnectionRefusedError etc.)


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

Branch: refs/heads/TINKERPOP-1599
Commit: 5299460b214044dca479e3b48e8a08a9651e1c2e
Parents: 3605115
Author: davebshow <davebs...@gmail.com>
Authored: Tue Jan 31 10:43:59 2017 -0500
Committer: davebshow <davebs...@gmail.com>
Committed: Wed Feb 15 18:28:20 2017 -0500

--
 gremlin-python/src/main/jython/tests/conftest.py | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/5299460b/gremlin-python/src/main/jython/tests/conftest.py
--
diff --git a/gremlin-python/src/main/jython/tests/conftest.py 
b/gremlin-python/src/main/jython/tests/conftest.py
index 49779ac..3425266 100644
--- a/gremlin-python/src/main/jython/tests/conftest.py
+++ b/gremlin-python/src/main/jython/tests/conftest.py
@@ -38,7 +38,7 @@ def connection(request):
 try:
 conn = Connection('ws://localhost:45940/gremlin', 'g', protocol,
   lambda: TornadoTransport(), executor, pool)
-except:
+except OSError:
 executor.shutdown()
 pytest.skip('Gremlin Server is not running')
 else:
@@ -52,7 +52,7 @@ def connection(request):
 def client(request):
 try:
 client = Client('ws://localhost:45940/gremlin', 'g')
-except:
+except OSError:
 pytest.skip('Gremlin Server is not running')
 else:
 def fin():
@@ -64,7 +64,7 @@ def client(request):
 def remote_connection(request):
 try:
 remote_conn = DriverRemoteConnection('ws://localhost:45940/gremlin', 
'g')
-except:
+except OSError:
 pytest.skip('Gremlin Server is not running')
 else:
 def fin():



[02/11] tinkerpop git commit: TINKERPOP-1271: update change log

2017-02-15 Thread davebshow
TINKERPOP-1271: update change log


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

Branch: refs/heads/TINKERPOP-1599
Commit: dce840495def5a6b3aacda1baf38c544bde2a5dc
Parents: 6bea8a5
Author: artemaliev 
Authored: Thu Feb 2 17:34:49 2017 +0300
Committer: artemaliev 
Committed: Thu Feb 2 17:34:49 2017 +0300

--
 CHANGELOG.asciidoc | 1 +
 1 file changed, 1 insertion(+)
--


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/dce84049/CHANGELOG.asciidoc
--
diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc
index 6e7d456..bf5a49f 100644
--- a/CHANGELOG.asciidoc
+++ b/CHANGELOG.asciidoc
@@ -26,6 +26,7 @@ 
image::https://raw.githubusercontent.com/apache/tinkerpop/master/docs/static/ima
 TinkerPop 3.2.4 (Release Date: NOT OFFICIALLY RELEASED YET)
 ~~~
 
+* Refactor SparkContext handler to support external kill and stop operations
 * Fixed a bug where `PathProcessor.keepLabels` were not being pushed down into 
child traversals by `PathRetractionStrategy`.
 * Added default `MessagePassingReductionStrategy` for `GraphComputer` that can 
reduce the number of message passing iterations.
 * Fixed a bug associated with user-provided maps and `GroupSideEffectStep`.



[09/11] tinkerpop git commit: added standard message processor

2017-02-15 Thread davebshow
added standard message processor


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

Branch: refs/heads/TINKERPOP-1599
Commit: 2e69765b13dc03516ebda44a2db52da277c4e5bc
Parents: 5299460
Author: davebshow <davebs...@gmail.com>
Authored: Wed Feb 15 14:25:28 2017 -0500
Committer: davebshow <davebs...@gmail.com>
Committed: Wed Feb 15 18:28:20 2017 -0500

--
 .../src/main/jython/gremlin_python/driver/client.py  |  5 +
 .../main/jython/gremlin_python/driver/serializer.py  | 10 ++
 .../src/main/jython/tests/driver/test_client.py  | 15 ++-
 3 files changed, 29 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/2e69765b/gremlin-python/src/main/jython/gremlin_python/driver/client.py
--
diff --git a/gremlin-python/src/main/jython/gremlin_python/driver/client.py 
b/gremlin-python/src/main/jython/gremlin_python/driver/client.py
index dec39bf..fcbdf07 100644
--- a/gremlin-python/src/main/jython/gremlin_python/driver/client.py
+++ b/gremlin-python/src/main/jython/gremlin_python/driver/client.py
@@ -110,5 +110,10 @@ class Client:
 processor='traversal', op='bytecode',
 args={'gremlin': message,
   'aliases': {'g': self._traversal_source}})
+elif isinstance(message, str):
+message = request.RequestMessage(
+processor='', op='eval',
+args={'gremlin': message,
+  'aliases': {'g': self._traversal_source}})
 conn = self._pool.get(True)
 return conn.write(message)

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/2e69765b/gremlin-python/src/main/jython/gremlin_python/driver/serializer.py
--
diff --git a/gremlin-python/src/main/jython/gremlin_python/driver/serializer.py 
b/gremlin-python/src/main/jython/gremlin_python/driver/serializer.py
index 10dcfd3..2db7374 100644
--- a/gremlin-python/src/main/jython/gremlin_python/driver/serializer.py
+++ b/gremlin-python/src/main/jython/gremlin_python/driver/serializer.py
@@ -48,6 +48,16 @@ class GraphSONMessageSerializer:
 
 _graphson_reader = graphson.GraphSONReader()
 
+
+class standard(Processor):
+
+def authentication(self, args):
+return args
+
+def eval(self, args):
+return args
+
+
 class traversal(Processor):
 
 def authentication(self, args):

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/2e69765b/gremlin-python/src/main/jython/tests/driver/test_client.py
--
diff --git a/gremlin-python/src/main/jython/tests/driver/test_client.py 
b/gremlin-python/src/main/jython/tests/driver/test_client.py
index 2e0e96c..02582a1 100644
--- a/gremlin-python/src/main/jython/tests/driver/test_client.py
+++ b/gremlin-python/src/main/jython/tests/driver/test_client.py
@@ -35,13 +35,23 @@ def test_connection(connection):
 assert len(results) == 6
 assert isinstance(results, list)
 
-def test_client(client):
+
+def test_client_simple_eval(client):
+assert client.submit('1 + 1').all().result()[0] == 2
+
+
+def test_client_eval_traversal(client):
+assert len(client.submit('g.V()').all().result()) == 6
+
+
+def test_client_bytecode(client):
 g = Graph().traversal()
 t = g.V()
 message = RequestMessage('traversal', 'bytecode', {'gremlin': t.bytecode})
 result_set = client.submit(message)
 assert len(result_set.all().result()) == 6
 
+
 def test_iterate_result_set(client):
 g = Graph().traversal()
 t = g.V()
@@ -52,6 +62,7 @@ def test_iterate_result_set(client):
 results += result
 assert len(results) == 6
 
+
 def test_client_async(client):
 g = Graph().traversal()
 t = g.V()
@@ -61,6 +72,7 @@ def test_client_async(client):
 result_set = future.result()
 assert len(result_set.all().result()) == 6
 
+
 def test_connection_share(client):
 # Overwrite fixture with pool_size=1 client
 client = Client('ws://localhost:45940/gremlin', 'g', pool_size=1)
@@ -78,6 +90,7 @@ def test_connection_share(client):
 result_set = future.result()
 assert len(result_set.all().result()) == 6
 
+
 def test_multi_conn_pool(client):
 g = Graph().traversal()
 t = g.V()



[01/11] tinkerpop git commit: TINKERPOP-1271: Refactor SparkContext creation and handling of external sc.stop() org.apache.tinkerpop.gremlin.spark.structure.Spark is a SparkContext holder for SparkGra

2017-02-15 Thread davebshow
Repository: tinkerpop
Updated Branches:
  refs/heads/TINKERPOP-1599 5fd4dfa8d -> 44a20fdcf (forced update)


TINKERPOP-1271: Refactor SparkContext creation and handling of external 
sc.stop()
org.apache.tinkerpop.gremlin.spark.structure.Spark is a SparkContext holder 
for SparkGraphComputer.
It was refactored do detect external stop calls and recreate SparkContext 
in that case.
Context creation process was reordered to make all configuration options to 
take effect.
Spark.create() methods return created context now.
The external stop also requires SPARK-18751 fix, that was integrated into 
Spark 2.1.
By the way the refactoring and configuration loading part gives effect on 
all versions.


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

Branch: refs/heads/TINKERPOP-1599
Commit: 6bea8a562a7d2d2a940a5cb7db3f2a4ce09f3dac
Parents: 8282a12
Author: artemaliev 
Authored: Thu Feb 2 15:15:04 2017 +0300
Committer: artemaliev 
Committed: Thu Feb 2 15:15:04 2017 +0300

--
 .../process/computer/SparkGraphComputer.java| 52 ++--
 .../gremlin/spark/structure/Spark.java  | 46 ++---
 .../spark/structure/io/InputRDDFormat.java  |  3 +-
 .../spark/structure/io/PersistedInputRDD.java   |  2 +-
 4 files changed, 66 insertions(+), 37 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/6bea8a56/spark-gremlin/src/main/java/org/apache/tinkerpop/gremlin/spark/process/computer/SparkGraphComputer.java
--
diff --git 
a/spark-gremlin/src/main/java/org/apache/tinkerpop/gremlin/spark/process/computer/SparkGraphComputer.java
 
b/spark-gremlin/src/main/java/org/apache/tinkerpop/gremlin/spark/process/computer/SparkGraphComputer.java
index 40598c0..6d2742b 100644
--- 
a/spark-gremlin/src/main/java/org/apache/tinkerpop/gremlin/spark/process/computer/SparkGraphComputer.java
+++ 
b/spark-gremlin/src/main/java/org/apache/tinkerpop/gremlin/spark/process/computer/SparkGraphComputer.java
@@ -140,27 +140,27 @@ public final class SparkGraphComputer extends 
AbstractHadoopGraphComputer {
 
graphComputerConfiguration.setProperty(Constants.GREMLIN_HADOOP_GRAPH_WRITER_HAS_EDGES,
 this.persist.equals(GraphComputer.Persist.EDGES));
 final Configuration hadoopConfiguration = 
ConfUtil.makeHadoopConfiguration(graphComputerConfiguration);
 final Storage fileSystemStorage = 
FileSystemStorage.open(hadoopConfiguration);
-final Storage sparkContextStorage = 
SparkContextStorage.open(graphComputerConfiguration);
 final boolean inputFromHDFS = 
FileInputFormat.class.isAssignableFrom(hadoopConfiguration.getClass(Constants.GREMLIN_HADOOP_GRAPH_READER,
 Object.class));
 final boolean inputFromSpark = 
PersistedInputRDD.class.isAssignableFrom(hadoopConfiguration.getClass(Constants.GREMLIN_HADOOP_GRAPH_READER,
 Object.class));
 final boolean outputToHDFS = 
FileOutputFormat.class.isAssignableFrom(hadoopConfiguration.getClass(Constants.GREMLIN_HADOOP_GRAPH_WRITER,
 Object.class));
 final boolean outputToSpark = 
PersistedOutputRDD.class.isAssignableFrom(hadoopConfiguration.getClass(Constants.GREMLIN_HADOOP_GRAPH_WRITER,
 Object.class));
 final boolean skipPartitioner = 
graphComputerConfiguration.getBoolean(Constants.GREMLIN_SPARK_SKIP_PARTITIONER, 
false);
 final boolean skipPersist = 
graphComputerConfiguration.getBoolean(Constants.GREMLIN_SPARK_SKIP_GRAPH_CACHE, 
false);
-String inputLocation = null;
-if (inputFromSpark)
-inputLocation = 
Constants.getSearchGraphLocation(hadoopConfiguration.get(Constants.GREMLIN_HADOOP_INPUT_LOCATION),
 sparkContextStorage).orElse(null);
-else if (inputFromHDFS)
-inputLocation = 
Constants.getSearchGraphLocation(hadoopConfiguration.get(Constants.GREMLIN_HADOOP_INPUT_LOCATION),
 fileSystemStorage).orElse(null);
-if (null == inputLocation)
-inputLocation = 
hadoopConfiguration.get(Constants.GREMLIN_HADOOP_INPUT_LOCATION);
-
-if (null != inputLocation && inputFromHDFS) {
-try {
-
graphComputerConfiguration.setProperty(Constants.MAPREDUCE_INPUT_FILEINPUTFORMAT_INPUTDIR,
 FileSystem.get(hadoopConfiguration).getFileStatus(new 
Path(inputLocation)).getPath().toString());
-
hadoopConfiguration.set(Constants.MAPREDUCE_INPUT_FILEINPUTFORMAT_INPUTDIR, 
FileSystem.get(hadoopConfiguration).getFileStatus(new 

[06/11] tinkerpop git commit: added code for new driver, updated driver tests

2017-02-15 Thread davebshow
added code for new driver, updated driver tests


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

Branch: refs/heads/TINKERPOP-1599
Commit: 4e4bc57f8849614cfdb316d5b7c6d68e1b4a3010
Parents: 4a328b9
Author: davebshow <davebs...@gmail.com>
Authored: Mon Jan 30 17:22:36 2017 -0500
Committer: davebshow <davebs...@gmail.com>
Committed: Wed Feb 15 18:28:20 2017 -0500

--
 gremlin-python/pom.xml  |   1 +
 .../python/TraversalSourceGenerator.groovy  |  11 +-
 .../main/jython/gremlin_python/driver/client.py | 114 
 .../jython/gremlin_python/driver/connection.py  |  78 ++
 .../driver/driver_remote_connection.py  | 260 +++
 .../jython/gremlin_python/driver/protocol.py| 103 
 .../gremlin_python/driver/remote_connection.py  |  98 ---
 .../jython/gremlin_python/driver/request.py |  25 ++
 .../jython/gremlin_python/driver/resultset.py   |  91 +++
 .../jython/gremlin_python/driver/serializer.py  | 117 +
 .../gremlin_python/driver/tornado/__init__.py   |  18 ++
 .../gremlin_python/driver/tornado/transport.py  |  48 
 .../jython/gremlin_python/driver/transport.py   |  46 
 .../jython/gremlin_python/process/traversal.py  |  11 +-
 gremlin-python/src/main/jython/setup.py |  18 +-
 .../src/main/jython/tests/conftest.py   |  72 +
 .../src/main/jython/tests/driver/test_client.py |  98 +++
 .../driver/test_driver_remote_connection.py | 150 ---
 .../test_driver_remote_connection_threaded.py   |  77 +++---
 .../jython/tests/structure/io/test_graphson.py  |  21 +-
 20 files changed, 1039 insertions(+), 418 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/4e4bc57f/gremlin-python/pom.xml
--
diff --git a/gremlin-python/pom.xml b/gremlin-python/pom.xml
index c9d6c65..2b4a80e 100644
--- a/gremlin-python/pom.xml
+++ b/gremlin-python/pom.xml
@@ -314,6 +314,7 @@
 aenum==1.4.5
 tornado==4.4.1
 six==1.10.0
+futures==3.0.5
 
 
 

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/4e4bc57f/gremlin-python/src/main/groovy/org/apache/tinkerpop/gremlin/python/TraversalSourceGenerator.groovy
--
diff --git 
a/gremlin-python/src/main/groovy/org/apache/tinkerpop/gremlin/python/TraversalSourceGenerator.groovy
 
b/gremlin-python/src/main/groovy/org/apache/tinkerpop/gremlin/python/TraversalSourceGenerator.groovy
index fc76b71..995fe80 100644
--- 
a/gremlin-python/src/main/groovy/org/apache/tinkerpop/gremlin/python/TraversalSourceGenerator.groovy
+++ 
b/gremlin-python/src/main/groovy/org/apache/tinkerpop/gremlin/python/TraversalSourceGenerator.groovy
@@ -116,15 +116,16 @@ class Traversal(object):
 return tempList
 def promise(self, cb=None):
 self.traversal_strategies.apply_async_strategies(self)
-future_traversers = self.traversers
-future = type(future_traversers)()
+future_traversal = self.remote_results
+future = type(future_traversal)()
 def process(f):
 try:
-traversers = f.result()
+traversal = f.result()
 except Exception as e:
 future.set_exception(e)
 else:
-self.traversers = iter(traversers)
+self.traversers = iter(traversal.traversers)
+self.side_effects = traversal.side_effects
 if cb:
 try:
 result = cb(self)
@@ -134,7 +135,7 @@ class Traversal(object):
 future.set_result(result)
 else:
 future.set_result(self)
-future_traversers.add_done_callback(process)
+future_traversal.add_done_callback(process)
 return future
 
 

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/4e4bc57f/gremlin-python/src/main/jython/gremlin_python/driver/client.py
--
diff --git a/gremlin-python/src/main/jython/gremlin_python/driver/client.py 
b/gremlin-python/src/main/jython/gremlin_python/driver/client.py
new file mode 100644
index 000..dec39bf
--- /dev/null
+++ b/gremlin-python/src/main/jython/gremlin_python/driver/client.py
@@

[04/11] tinkerpop git commit: allow user to pass graphson reader/writer

2017-02-15 Thread davebshow
allow user to pass graphson reader/writer


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

Branch: refs/heads/TINKERPOP-1599
Commit: c2da0c361ec441318d1c04c5748590b4b6f93c50
Parents: 2e69765
Author: davebshow <davebs...@gmail.com>
Authored: Wed Feb 15 16:27:46 2017 -0500
Committer: davebshow <davebs...@gmail.com>
Committed: Wed Feb 15 18:28:20 2017 -0500

--
 .../main/jython/gremlin_python/driver/client.py |  6 +-
 .../driver/driver_remote_connection.py  | 20 +++--
 .../jython/gremlin_python/driver/protocol.py|  9 +-
 .../jython/gremlin_python/driver/serializer.py  | 86 ++--
 .../src/main/jython/tests/conftest.py   |  2 +
 5 files changed, 70 insertions(+), 53 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/c2da0c36/gremlin-python/src/main/jython/gremlin_python/driver/client.py
--
diff --git a/gremlin-python/src/main/jython/gremlin_python/driver/client.py 
b/gremlin-python/src/main/jython/gremlin_python/driver/client.py
index fcbdf07..0314a44 100644
--- a/gremlin-python/src/main/jython/gremlin_python/driver/client.py
+++ b/gremlin-python/src/main/jython/gremlin_python/driver/client.py
@@ -23,7 +23,7 @@ from concurrent.futures import ThreadPoolExecutor
 
 from six.moves import queue
 
-from gremlin_python.driver import connection, protocol, request
+from gremlin_python.driver import connection, protocol, request, serializer
 from gremlin_python.process import traversal
 
 # This is until concurrent.futures backport 3.1.0 release
@@ -44,6 +44,8 @@ class Client:
  message_serializer=None, username="", password=""):
 self._url = url
 self._traversal_source = traversal_source
+if message_serializer is None:
+message_serializer = serializer.GraphSONMessageSerializer()
 self._message_serializer = message_serializer
 self._username = username
 self._password = password
@@ -59,7 +61,7 @@ class Client:
 self._transport_factory = transport_factory
 if protocol_factory is None:
 protocol_factory = lambda: protocol.GremlinServerWSProtocol(
-message_serializer=self._message_serializer,
+self._message_serializer,
 username=self._username,
 password=self._password)
 self._protocol_factory = protocol_factory

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/c2da0c36/gremlin-python/src/main/jython/gremlin_python/driver/driver_remote_connection.py
--
diff --git 
a/gremlin-python/src/main/jython/gremlin_python/driver/driver_remote_connection.py
 
b/gremlin-python/src/main/jython/gremlin_python/driver/driver_remote_connection.py
index fb0e4ba..1f08e2b 100644
--- 
a/gremlin-python/src/main/jython/gremlin_python/driver/driver_remote_connection.py
+++ 
b/gremlin-python/src/main/jython/gremlin_python/driver/driver_remote_connection.py
@@ -18,7 +18,7 @@ under the License.
 """
 from concurrent.futures import Future
 
-from gremlin_python.driver import client
+from gremlin_python.driver import client, serializer
 from gremlin_python.driver.remote_connection import (
 RemoteConnection, RemoteTraversal, RemoteTraversalSideEffects)
 
@@ -29,10 +29,20 @@ class DriverRemoteConnection(RemoteConnection):
 
 def __init__(self, url, traversal_source, protocol_factory=None,
  transport_factory=None, pool_size=None, max_workers=None,
- username="", password=""):
-self._client = client.Client(url, traversal_source, protocol_factory,
- transport_factory, pool_size, max_workers,
- None, username, password)
+ username="", password="", message_serializer=None,
+ graphson_reader=None, graphson_writer=None):
+if message_serializer is None:
+message_serializer = serializer.GraphSONMessageSerializer(
+reader=graphson_reader,
+writer=graphson_writer)
+self._client = client.Client(url, traversal_source,
+ protocol_factory=protocol_factory,
+ transport_factory=transport_factory,
+ pool_size=pool_size,
+ max_workers=max_workers,
+ message

[03/11] tinkerpop git commit: Merge branch 'TINKERPOP-1271' of https://github.com/artem-aliev/tinkerpop into tp32

2017-02-15 Thread davebshow
Merge branch 'TINKERPOP-1271' of https://github.com/artem-aliev/tinkerpop into 
tp32


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

Branch: refs/heads/TINKERPOP-1599
Commit: 4a328b92c7aaf12cba59365ad0f7a2f93a95ad3d
Parents: 9d74372 dce8404
Author: Marko A. Rodriguez 
Authored: Wed Feb 15 15:25:41 2017 -0700
Committer: Marko A. Rodriguez 
Committed: Wed Feb 15 15:25:41 2017 -0700

--
 CHANGELOG.asciidoc  |  1 +
 .../process/computer/SparkGraphComputer.java| 52 ++--
 .../gremlin/spark/structure/Spark.java  | 46 ++---
 .../spark/structure/io/InputRDDFormat.java  |  3 +-
 .../spark/structure/io/PersistedInputRDD.java   |  2 +-
 5 files changed, 67 insertions(+), 37 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/4a328b92/CHANGELOG.asciidoc
--
diff --cc CHANGELOG.asciidoc
index b550fe4,bf5a49f..e3c78f9
--- a/CHANGELOG.asciidoc
+++ b/CHANGELOG.asciidoc
@@@ -22,18 -22,11 +22,19 @@@ TinkerPop 3.2.0 (Nine Inch Gremlins
  
  
image::https://raw.githubusercontent.com/apache/tinkerpop/master/docs/static/images/nine-inch-gremlins.png[width=185]
  
 -[[release-3-2-4]]
 -TinkerPop 3.2.4 (Release Date: NOT OFFICIALLY RELEASED YET)
 +[[release-3-2-5]]
 +TinkerPop 3.2.5 (Release Date: NOT OFFICIALLY RELEASED YET)
  ~~~
  
 -* Refactor SparkContext handler to support external kill and stop operations
++* Refactor `SparkContext` handler to support external kill and stop 
operations.
 +
 +
 +[[release-3-2-4]]
 +TinkerPop 3.2.4 (Release Date: February 8, 2017)
 +
 +
 +This release also includes changes from <>.
 +
  * Fixed a bug where `PathProcessor.keepLabels` were not being pushed down 
into child traversals by `PathRetractionStrategy`.
  * Added default `MessagePassingReductionStrategy` for `GraphComputer` that 
can reduce the number of message passing iterations.
  * Fixed a bug associated with user-provided maps and `GroupSideEffectStep`.



[11/11] tinkerpop git commit: updated changlog, added docs

2017-02-15 Thread davebshow
updated changlog, added docs


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

Branch: refs/heads/TINKERPOP-1599
Commit: 44a20fdcf31b4eb9db5d30b25e8712b160bc3603
Parents: 351513e
Author: davebshow <davebs...@gmail.com>
Authored: Wed Feb 15 18:26:08 2017 -0500
Committer: davebshow <davebs...@gmail.com>
Committed: Wed Feb 15 18:30:39 2017 -0500

--
 CHANGELOG.asciidoc  |  4 ++
 .../src/reference/gremlin-applications.asciidoc | 71 
 .../upgrade/release-3.2.x-incubating.asciidoc   | 35 ++
 3 files changed, 110 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/44a20fdc/CHANGELOG.asciidoc
--
diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc
index e3c78f9..f678cb9 100644
--- a/CHANGELOG.asciidoc
+++ b/CHANGELOG.asciidoc
@@ -27,7 +27,11 @@ TinkerPop 3.2.5 (Release Date: NOT OFFICIALLY RELEASED YET)
 ~~~
 
 * Refactor `SparkContext` handler to support external kill and stop operations.
+* Improved Gremlin-Python driver implementation by adding a threaded client 
with basic connection pooling and support for pluggable websocket clients.
 
+Improvements
+
+TINKERPOP-1599 implement real gremlin-python driver
 
 [[release-3-2-4]]
 TinkerPop 3.2.4 (Release Date: February 8, 2017)

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/44a20fdc/docs/src/reference/gremlin-applications.asciidoc
--
diff --git a/docs/src/reference/gremlin-applications.asciidoc 
b/docs/src/reference/gremlin-applications.asciidoc
index 7ca4efd..ece0a82 100644
--- a/docs/src/reference/gremlin-applications.asciidoc
+++ b/docs/src/reference/gremlin-applications.asciidoc
@@ -762,6 +762,77 @@ The above code demonstrates using the `TitanIoRegistry` 
which is an `IoRegistry`
 what classes (from Titan in this case) to auto-register during serialization.  
Gremlin Server roughly uses this same
 approach when it configures it's serializers, so using this same model will 
ensure compatibility when making requests.
 
+[[connecting-via-python]]
+Connecting via Python
+~
+
+[source,python]
+
+pip install gremlinpython
+
+
+TinkerPop3 also includes a client for Python-based applications.  It is 
referred to as Gremlin-Python Driver.
+The `Client` class implementation/interface is based on the Java Driver, with 
some restrictions. Most notably,
+Gremlin-Python does not yet implement the `Cluster` class. Instead, `Client` 
is instantiated directly.
+Usage is as follows:
+
+[source,python]
+
+from gremlin_python.driver import client <1>
+client = client.Client('ws://localhost:8182/gremlin', 'g') <2>
+
+
+<1> Import the Gremlin-Python `client` module.
+<2> Opens a reference to `localhost` - note that there are various 
configuration options that can be passed
+to the `Client` object upon instantiation as keyword arguments.
+
+Once a `Client` instance is ready, it is possible to issue some Gremlin:
+
+[source,python]
+
+result_set = client.submit("[1,2,3,4]")  <1>
+future_results = result_set.all()  <2>
+results = future_results.result() <3>
+assert results == [1, 2, 3, 4] <4>
+
+future_result_set = client.submitAsync("[1,2,3,4]") <5>
+result_set = future_result_set.result() <6>
+result = result_set.one() <7>
+assert results == [1, 2, 3, 4] <8>
+assert result_set.done.done() <9>
+
+
+<1> Submit a script that simply returns a `List` of integers.  This method 
blocks until the request is written to
+the server and a `ResultSet` is constructed.
+<2> Even though the `ResultSet` is constructed, it does not mean that the 
server has sent back the results (or even
+evaluated the script potentially).  The `ResultSet` is just a holder that is 
awaiting the results from the server. The `all` method
+returns a `concurrent.futures.Future` that resolves to a list when it is 
complete.
+<3> Block until the the script is evaluated and results are sent back by the 
server.
+<4> Verify the result.
+<5> Submit the same script to the server but don't block.
+<6> Wait until request is written to the server and `ResultSet` is constructed.
+<7> Read a single result off the result stream.
+<8> Again, verify the result.
+<9> Verify that the all results have been read and stream is closed.
+
+Configuration
+^
+
+The following table 

[2/3] tinkerpop git commit: allow client users to pass bindings as a second arg

2017-02-15 Thread davebshow
allow client users to pass bindings as a second arg


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

Branch: refs/heads/TINKERPOP-1599
Commit: d521d5b48d987fedf3a849b520a03b741576787d
Parents: a794f50
Author: davebshow <davebs...@gmail.com>
Authored: Wed Feb 15 17:57:32 2017 -0500
Committer: davebshow <davebs...@gmail.com>
Committed: Wed Feb 15 17:57:32 2017 -0500

--
 .../src/main/jython/gremlin_python/driver/client.py  | 8 +---
 gremlin-python/src/main/jython/tests/driver/test_client.py   | 4 
 2 files changed, 9 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/d521d5b4/gremlin-python/src/main/jython/gremlin_python/driver/client.py
--
diff --git a/gremlin-python/src/main/jython/gremlin_python/driver/client.py 
b/gremlin-python/src/main/jython/gremlin_python/driver/client.py
index 0314a44..c7c7037 100644
--- a/gremlin-python/src/main/jython/gremlin_python/driver/client.py
+++ b/gremlin-python/src/main/jython/gremlin_python/driver/client.py
@@ -103,10 +103,10 @@ class Client:
 self._url, self._traversal_source, protocol,
 self._transport_factory, self._executor, self._pool)
 
-def submit(self, message):
-return self.submitAsync(message).result()
+def submit(self, message, bindings=None):
+return self.submitAsync(message, bindings=bindings).result()
 
-def submitAsync(self, message):
+def submitAsync(self, message, bindings=None):
 if isinstance(message, traversal.Bytecode):
 message = request.RequestMessage(
 processor='traversal', op='bytecode',
@@ -117,5 +117,7 @@ class Client:
 processor='', op='eval',
 args={'gremlin': message,
   'aliases': {'g': self._traversal_source}})
+if bindings:
+message.args.update(bindings)
 conn = self._pool.get(True)
 return conn.write(message)

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/d521d5b4/gremlin-python/src/main/jython/tests/driver/test_client.py
--
diff --git a/gremlin-python/src/main/jython/tests/driver/test_client.py 
b/gremlin-python/src/main/jython/tests/driver/test_client.py
index 02582a1..416caab 100644
--- a/gremlin-python/src/main/jython/tests/driver/test_client.py
+++ b/gremlin-python/src/main/jython/tests/driver/test_client.py
@@ -40,6 +40,10 @@ def test_client_simple_eval(client):
 assert client.submit('1 + 1').all().result()[0] == 2
 
 
+def test_client_simple_eval_bindings(client):
+assert client.submit('x + x', {'x': 2}).all().result()[0] == 4
+
+
 def test_client_eval_traversal(client):
 assert len(client.submit('g.V()').all().result()) == 6
 



[1/3] tinkerpop git commit: allow user to pass graphson reader/writer

2017-02-15 Thread davebshow
Repository: tinkerpop
Updated Branches:
  refs/heads/TINKERPOP-1599 5eff6398b -> 5fd4dfa8d


allow user to pass graphson reader/writer


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

Branch: refs/heads/TINKERPOP-1599
Commit: a794f50689ee90c1905e829dee53b27b6e301141
Parents: 5eff639
Author: davebshow <davebs...@gmail.com>
Authored: Wed Feb 15 16:27:46 2017 -0500
Committer: davebshow <davebs...@gmail.com>
Committed: Wed Feb 15 16:27:46 2017 -0500

--
 .../main/jython/gremlin_python/driver/client.py |  6 +-
 .../driver/driver_remote_connection.py  | 20 +++--
 .../jython/gremlin_python/driver/protocol.py|  9 +-
 .../jython/gremlin_python/driver/serializer.py  | 86 ++--
 .../src/main/jython/tests/conftest.py   |  2 +
 5 files changed, 70 insertions(+), 53 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/a794f506/gremlin-python/src/main/jython/gremlin_python/driver/client.py
--
diff --git a/gremlin-python/src/main/jython/gremlin_python/driver/client.py 
b/gremlin-python/src/main/jython/gremlin_python/driver/client.py
index fcbdf07..0314a44 100644
--- a/gremlin-python/src/main/jython/gremlin_python/driver/client.py
+++ b/gremlin-python/src/main/jython/gremlin_python/driver/client.py
@@ -23,7 +23,7 @@ from concurrent.futures import ThreadPoolExecutor
 
 from six.moves import queue
 
-from gremlin_python.driver import connection, protocol, request
+from gremlin_python.driver import connection, protocol, request, serializer
 from gremlin_python.process import traversal
 
 # This is until concurrent.futures backport 3.1.0 release
@@ -44,6 +44,8 @@ class Client:
  message_serializer=None, username="", password=""):
 self._url = url
 self._traversal_source = traversal_source
+if message_serializer is None:
+message_serializer = serializer.GraphSONMessageSerializer()
 self._message_serializer = message_serializer
 self._username = username
 self._password = password
@@ -59,7 +61,7 @@ class Client:
 self._transport_factory = transport_factory
 if protocol_factory is None:
 protocol_factory = lambda: protocol.GremlinServerWSProtocol(
-message_serializer=self._message_serializer,
+self._message_serializer,
 username=self._username,
 password=self._password)
 self._protocol_factory = protocol_factory

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/a794f506/gremlin-python/src/main/jython/gremlin_python/driver/driver_remote_connection.py
--
diff --git 
a/gremlin-python/src/main/jython/gremlin_python/driver/driver_remote_connection.py
 
b/gremlin-python/src/main/jython/gremlin_python/driver/driver_remote_connection.py
index fb0e4ba..1f08e2b 100644
--- 
a/gremlin-python/src/main/jython/gremlin_python/driver/driver_remote_connection.py
+++ 
b/gremlin-python/src/main/jython/gremlin_python/driver/driver_remote_connection.py
@@ -18,7 +18,7 @@ under the License.
 """
 from concurrent.futures import Future
 
-from gremlin_python.driver import client
+from gremlin_python.driver import client, serializer
 from gremlin_python.driver.remote_connection import (
 RemoteConnection, RemoteTraversal, RemoteTraversalSideEffects)
 
@@ -29,10 +29,20 @@ class DriverRemoteConnection(RemoteConnection):
 
 def __init__(self, url, traversal_source, protocol_factory=None,
  transport_factory=None, pool_size=None, max_workers=None,
- username="", password=""):
-self._client = client.Client(url, traversal_source, protocol_factory,
- transport_factory, pool_size, max_workers,
- None, username, password)
+ username="", password="", message_serializer=None,
+ graphson_reader=None, graphson_writer=None):
+if message_serializer is None:
+message_serializer = serializer.GraphSONMessageSerializer(
+reader=graphson_reader,
+writer=graphson_writer)
+self._client = client.Client(url, traversal_source,
+ protocol_factory=protocol_factory,
+ transport_factory=transport_factory,
+ pool_size=pool_size,
+

[3/3] tinkerpop git commit: updated changlog, added docs

2017-02-15 Thread davebshow
updated changlog, added docs


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

Branch: refs/heads/TINKERPOP-1599
Commit: 5fd4dfa8d4d049ad5dada6da8bb13d5a1d67ee71
Parents: d521d5b
Author: davebshow <davebs...@gmail.com>
Authored: Wed Feb 15 18:26:08 2017 -0500
Committer: davebshow <davebs...@gmail.com>
Committed: Wed Feb 15 18:26:08 2017 -0500

--
 CHANGELOG.asciidoc  |  5 ++
 .../src/reference/gremlin-applications.asciidoc | 71 
 .../upgrade/release-3.2.x-incubating.asciidoc   | 35 ++
 3 files changed, 111 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/5fd4dfa8/CHANGELOG.asciidoc
--
diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc
index b550fe4..cef509c 100644
--- a/CHANGELOG.asciidoc
+++ b/CHANGELOG.asciidoc
@@ -26,6 +26,11 @@ 
image::https://raw.githubusercontent.com/apache/tinkerpop/master/docs/static/ima
 TinkerPop 3.2.5 (Release Date: NOT OFFICIALLY RELEASED YET)
 ~~~
 
+* Improved Gremlin-Python driver implementation by adding a threaded client 
with basic connection pooling and support for pluggable websocket clients.
+
+Improvements
+
+TINKERPOP-1599 implement real gremlin-python driver
 
 
 [[release-3-2-4]]

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/5fd4dfa8/docs/src/reference/gremlin-applications.asciidoc
--
diff --git a/docs/src/reference/gremlin-applications.asciidoc 
b/docs/src/reference/gremlin-applications.asciidoc
index 7ca4efd..ece0a82 100644
--- a/docs/src/reference/gremlin-applications.asciidoc
+++ b/docs/src/reference/gremlin-applications.asciidoc
@@ -762,6 +762,77 @@ The above code demonstrates using the `TitanIoRegistry` 
which is an `IoRegistry`
 what classes (from Titan in this case) to auto-register during serialization.  
Gremlin Server roughly uses this same
 approach when it configures it's serializers, so using this same model will 
ensure compatibility when making requests.
 
+[[connecting-via-python]]
+Connecting via Python
+~
+
+[source,python]
+
+pip install gremlinpython
+
+
+TinkerPop3 also includes a client for Python-based applications.  It is 
referred to as Gremlin-Python Driver.
+The `Client` class implementation/interface is based on the Java Driver, with 
some restrictions. Most notably,
+Gremlin-Python does not yet implement the `Cluster` class. Instead, `Client` 
is instantiated directly.
+Usage is as follows:
+
+[source,python]
+
+from gremlin_python.driver import client <1>
+client = client.Client('ws://localhost:8182/gremlin', 'g') <2>
+
+
+<1> Import the Gremlin-Python `client` module.
+<2> Opens a reference to `localhost` - note that there are various 
configuration options that can be passed
+to the `Client` object upon instantiation as keyword arguments.
+
+Once a `Client` instance is ready, it is possible to issue some Gremlin:
+
+[source,python]
+
+result_set = client.submit("[1,2,3,4]")  <1>
+future_results = result_set.all()  <2>
+results = future_results.result() <3>
+assert results == [1, 2, 3, 4] <4>
+
+future_result_set = client.submitAsync("[1,2,3,4]") <5>
+result_set = future_result_set.result() <6>
+result = result_set.one() <7>
+assert results == [1, 2, 3, 4] <8>
+assert result_set.done.done() <9>
+
+
+<1> Submit a script that simply returns a `List` of integers.  This method 
blocks until the request is written to
+the server and a `ResultSet` is constructed.
+<2> Even though the `ResultSet` is constructed, it does not mean that the 
server has sent back the results (or even
+evaluated the script potentially).  The `ResultSet` is just a holder that is 
awaiting the results from the server. The `all` method
+returns a `concurrent.futures.Future` that resolves to a list when it is 
complete.
+<3> Block until the the script is evaluated and results are sent back by the 
server.
+<4> Verify the result.
+<5> Submit the same script to the server but don't block.
+<6> Wait until request is written to the server and `ResultSet` is constructed.
+<7> Read a single result off the result stream.
+<8> Again, verify the result.
+<9> Verify that the all results have been read and stream is closed.
+
+Configuration
+^
+
+The following table describes the various conf

tinkerpop git commit: added standard message processor

2017-02-15 Thread davebshow
Repository: tinkerpop
Updated Branches:
  refs/heads/TINKERPOP-1599 f09baf54e -> 5eff6398b


added standard message processor


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

Branch: refs/heads/TINKERPOP-1599
Commit: 5eff6398bb961c8b9dfc1ae73702c3ea647a63b4
Parents: f09baf5
Author: davebshow <davebs...@gmail.com>
Authored: Wed Feb 15 14:25:28 2017 -0500
Committer: davebshow <davebs...@gmail.com>
Committed: Wed Feb 15 14:25:28 2017 -0500

--
 .../src/main/jython/gremlin_python/driver/client.py  |  5 +
 .../main/jython/gremlin_python/driver/serializer.py  | 10 ++
 .../src/main/jython/tests/driver/test_client.py  | 15 ++-
 3 files changed, 29 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/5eff6398/gremlin-python/src/main/jython/gremlin_python/driver/client.py
--
diff --git a/gremlin-python/src/main/jython/gremlin_python/driver/client.py 
b/gremlin-python/src/main/jython/gremlin_python/driver/client.py
index dec39bf..fcbdf07 100644
--- a/gremlin-python/src/main/jython/gremlin_python/driver/client.py
+++ b/gremlin-python/src/main/jython/gremlin_python/driver/client.py
@@ -110,5 +110,10 @@ class Client:
 processor='traversal', op='bytecode',
 args={'gremlin': message,
   'aliases': {'g': self._traversal_source}})
+elif isinstance(message, str):
+message = request.RequestMessage(
+processor='', op='eval',
+args={'gremlin': message,
+  'aliases': {'g': self._traversal_source}})
 conn = self._pool.get(True)
 return conn.write(message)

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/5eff6398/gremlin-python/src/main/jython/gremlin_python/driver/serializer.py
--
diff --git a/gremlin-python/src/main/jython/gremlin_python/driver/serializer.py 
b/gremlin-python/src/main/jython/gremlin_python/driver/serializer.py
index 10dcfd3..2db7374 100644
--- a/gremlin-python/src/main/jython/gremlin_python/driver/serializer.py
+++ b/gremlin-python/src/main/jython/gremlin_python/driver/serializer.py
@@ -48,6 +48,16 @@ class GraphSONMessageSerializer:
 
 _graphson_reader = graphson.GraphSONReader()
 
+
+class standard(Processor):
+
+def authentication(self, args):
+return args
+
+def eval(self, args):
+return args
+
+
 class traversal(Processor):
 
 def authentication(self, args):

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/5eff6398/gremlin-python/src/main/jython/tests/driver/test_client.py
--
diff --git a/gremlin-python/src/main/jython/tests/driver/test_client.py 
b/gremlin-python/src/main/jython/tests/driver/test_client.py
index 2e0e96c..02582a1 100644
--- a/gremlin-python/src/main/jython/tests/driver/test_client.py
+++ b/gremlin-python/src/main/jython/tests/driver/test_client.py
@@ -35,13 +35,23 @@ def test_connection(connection):
 assert len(results) == 6
 assert isinstance(results, list)
 
-def test_client(client):
+
+def test_client_simple_eval(client):
+assert client.submit('1 + 1').all().result()[0] == 2
+
+
+def test_client_eval_traversal(client):
+assert len(client.submit('g.V()').all().result()) == 6
+
+
+def test_client_bytecode(client):
 g = Graph().traversal()
 t = g.V()
 message = RequestMessage('traversal', 'bytecode', {'gremlin': t.bytecode})
 result_set = client.submit(message)
 assert len(result_set.all().result()) == 6
 
+
 def test_iterate_result_set(client):
 g = Graph().traversal()
 t = g.V()
@@ -52,6 +62,7 @@ def test_iterate_result_set(client):
 results += result
 assert len(results) == 6
 
+
 def test_client_async(client):
 g = Graph().traversal()
 t = g.V()
@@ -61,6 +72,7 @@ def test_client_async(client):
 result_set = future.result()
 assert len(result_set.all().result()) == 6
 
+
 def test_connection_share(client):
 # Overwrite fixture with pool_size=1 client
 client = Client('ws://localhost:45940/gremlin', 'g', pool_size=1)
@@ -78,6 +90,7 @@ def test_connection_share(client):
 result_set = future.result()
 assert len(result_set.all().result()) == 6
 
+
 def test_multi_conn_pool(client):
 g = Graph().traversal()
 t = g.V()



[35/40] tinkerpop git commit: Drop jitpack repo for jbcrypt now that it's in central CTR

2017-02-15 Thread davebshow
Drop jitpack repo for jbcrypt now that it's in central CTR


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

Branch: refs/heads/TINKERPOP-1599
Commit: 9750750d5c97594587fd5e16f63f144dae00f809
Parents: ebbcd3f
Author: Stephen Mallette 
Authored: Wed Feb 15 11:04:20 2017 -0500
Committer: Stephen Mallette 
Committed: Wed Feb 15 11:04:20 2017 -0500

--
 gremlin-groovy/pom.xml  | 5 -
 .../gremlin/groovy/plugin/dsl/credential/CredentialGraph.java   | 2 +-
 .../tinkerpop/gremlin/server/auth/SimpleAuthenticator.java  | 2 +-
 3 files changed, 2 insertions(+), 7 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/9750750d/gremlin-groovy/pom.xml
--
diff --git a/gremlin-groovy/pom.xml b/gremlin-groovy/pom.xml
index a81a56b..511952a 100644
--- a/gremlin-groovy/pom.xml
+++ b/gremlin-groovy/pom.xml
@@ -61,11 +61,6 @@ limitations under the License.
 indy
 
 
-com.github.jeremyh
-jBCrypt
-jbcrypt-0.4
-
-
 org.apache.commons
 commons-lang3
 ${commons.lang3.version}

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/9750750d/gremlin-groovy/src/main/java/org/apache/tinkerpop/gremlin/groovy/plugin/dsl/credential/CredentialGraph.java
--
diff --git 
a/gremlin-groovy/src/main/java/org/apache/tinkerpop/gremlin/groovy/plugin/dsl/credential/CredentialGraph.java
 
b/gremlin-groovy/src/main/java/org/apache/tinkerpop/gremlin/groovy/plugin/dsl/credential/CredentialGraph.java
index 564c573..6a90587 100644
--- 
a/gremlin-groovy/src/main/java/org/apache/tinkerpop/gremlin/groovy/plugin/dsl/credential/CredentialGraph.java
+++ 
b/gremlin-groovy/src/main/java/org/apache/tinkerpop/gremlin/groovy/plugin/dsl/credential/CredentialGraph.java
@@ -23,7 +23,7 @@ import 
org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversalSo
 import org.apache.tinkerpop.gremlin.structure.Graph;
 import org.apache.tinkerpop.gremlin.structure.T;
 import org.apache.tinkerpop.gremlin.structure.Vertex;
-import org.mindrot.jbcrypt.BCrypt;
+import org.mindrot.BCrypt;
 
 import static org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.__.drop;
 

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/9750750d/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/auth/SimpleAuthenticator.java
--
diff --git 
a/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/auth/SimpleAuthenticator.java
 
b/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/auth/SimpleAuthenticator.java
index 10c3531..2fd8b4e 100644
--- 
a/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/auth/SimpleAuthenticator.java
+++ 
b/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/auth/SimpleAuthenticator.java
@@ -24,7 +24,7 @@ import org.apache.tinkerpop.gremlin.structure.Vertex;
 import org.apache.tinkerpop.gremlin.structure.io.IoCore;
 import org.apache.tinkerpop.gremlin.structure.util.GraphFactory;
 import org.apache.tinkerpop.gremlin.tinkergraph.structure.TinkerGraph;
-import org.mindrot.jbcrypt.BCrypt;
+import org.mindrot.BCrypt;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 



[14/40] tinkerpop git commit: Merge branch 'pr-548' into tp32

2017-02-15 Thread davebshow
Merge branch 'pr-548' into tp32


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

Branch: refs/heads/TINKERPOP-1599
Commit: ed1cc29f599eabd9ac1394f9a9d1f0211c9000c5
Parents: 9aacdea 0203176
Author: Stephen Mallette 
Authored: Thu Feb 2 09:48:31 2017 -0500
Committer: Stephen Mallette 
Committed: Thu Feb 2 09:48:31 2017 -0500

--
 .../process/traversal/step/map/EdgeVertexStep.java   |  7 ++-
 .../gremlin/process/traversal/step/map/FlatMapStep.java  |  7 +++
 .../gremlin/process/traversal/step/map/GraphStep.java|  8 +++-
 .../process/traversal/step/map/PropertiesStep.java   |  7 ++-
 .../gremlin/process/traversal/step/map/VertexStep.java   |  7 ++-
 .../gremlin/structure/util/CloseableIterator.java| 11 +++
 6 files changed, 39 insertions(+), 8 deletions(-)
--




[28/40] tinkerpop git commit: Fixed bad version in CHANGELOG CTR

2017-02-15 Thread davebshow
Fixed bad version in CHANGELOG CTR


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

Branch: refs/heads/TINKERPOP-1599
Commit: 4c9a503ba8aa50035c2f19dd3807c19c48ce68ee
Parents: 6d8e809
Author: Stephen Mallette 
Authored: Tue Feb 14 15:05:05 2017 -0500
Committer: Stephen Mallette 
Committed: Tue Feb 14 15:05:05 2017 -0500

--
 CHANGELOG.asciidoc | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/4c9a503b/CHANGELOG.asciidoc
--
diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc
index 07b9c0b..18e64c6 100644
--- a/CHANGELOG.asciidoc
+++ b/CHANGELOG.asciidoc
@@ -22,8 +22,8 @@ TinkerPop 3.2.0 (Nine Inch Gremlins)
 
 
image::https://raw.githubusercontent.com/apache/tinkerpop/master/docs/static/images/nine-inch-gremlins.png[width=185]
 
-[[release-3-2-4]]
-TinkerPop 3.2.4 (Release Date: NOT OFFICIALLY RELEASED YET)
+[[release-3-2-5]]
+TinkerPop 3.2.5 (Release Date: NOT OFFICIALLY RELEASED YET)
 ~~~
 
 



[27/40] tinkerpop git commit: Merge branch 'tp31' into tp32

2017-02-15 Thread davebshow
Merge branch 'tp31' into tp32

Conflicts:
giraph-gremlin/pom.xml
gremlin-archetype/gremlin-archetype-server/pom.xml
gremlin-archetype/gremlin-archetype-tinkergraph/pom.xml
gremlin-archetype/pom.xml
gremlin-console/bin/gremlin.sh
gremlin-console/pom.xml
gremlin-core/pom.xml
gremlin-driver/pom.xml
gremlin-groovy-test/pom.xml
gremlin-groovy/pom.xml
gremlin-server/pom.xml
gremlin-shaded/pom.xml
gremlin-test/pom.xml
hadoop-gremlin/pom.xml
neo4j-gremlin/pom.xml
pom.xml
spark-gremlin/pom.xml
tinkergraph-gremlin/pom.xml


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

Branch: refs/heads/TINKERPOP-1599
Commit: 6d8e809f85f65752a4afe0ee40af29eb3e71ac0b
Parents: fb7b1bb 2decc81
Author: Stephen Mallette 
Authored: Tue Feb 14 10:52:03 2017 -0500
Committer: Stephen Mallette 
Committed: Tue Feb 14 10:52:03 2017 -0500

--
 CHANGELOG.asciidoc | 10 ++
 docs/src/upgrade/release-3.1.x-incubating.asciidoc |  7 +++
 2 files changed, 17 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/6d8e809f/CHANGELOG.asciidoc
--



[20/40] tinkerpop git commit: TinkerPop 3.2.4 release

2017-02-15 Thread davebshow
TinkerPop 3.2.4 release


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

Branch: refs/heads/TINKERPOP-1599
Commit: 2e719e218db31fc03b158f1c66b138c0e197612d
Parents: f680599
Author: Jason Plurad 
Authored: Mon Feb 6 22:58:23 2017 +
Committer: Jason Plurad 
Committed: Mon Feb 6 22:58:23 2017 +

--
 CHANGELOG.asciidoc  | 62 +++-
 .../upgrade/release-3.2.x-incubating.asciidoc   |  2 +-
 giraph-gremlin/pom.xml  |  2 +-
 .../gremlin-archetype-server/pom.xml|  2 +-
 .../gremlin-archetype-tinkergraph/pom.xml   |  2 +-
 gremlin-archetype/pom.xml   |  2 +-
 gremlin-benchmark/pom.xml   |  2 +-
 gremlin-console/bin/gremlin.sh  |  2 +-
 gremlin-console/pom.xml |  2 +-
 gremlin-core/pom.xml|  2 +-
 gremlin-driver/pom.xml  |  2 +-
 gremlin-groovy-test/pom.xml |  2 +-
 gremlin-groovy/pom.xml  |  2 +-
 gremlin-python/pom.xml  |  2 +-
 gremlin-server/pom.xml  |  2 +-
 gremlin-shaded/pom.xml  |  2 +-
 gremlin-test/pom.xml|  2 +-
 hadoop-gremlin/pom.xml  |  2 +-
 neo4j-gremlin/pom.xml   |  2 +-
 pom.xml |  2 +-
 spark-gremlin/pom.xml   |  2 +-
 tinkergraph-gremlin/pom.xml |  2 +-
 22 files changed, 82 insertions(+), 22 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/2e719e21/CHANGELOG.asciidoc
--
diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc
index 6e7d456..c707b68 100644
--- a/CHANGELOG.asciidoc
+++ b/CHANGELOG.asciidoc
@@ -23,7 +23,7 @@ TinkerPop 3.2.0 (Nine Inch Gremlins)
 
image::https://raw.githubusercontent.com/apache/tinkerpop/master/docs/static/images/nine-inch-gremlins.png[width=185]
 
 [[release-3-2-4]]
-TinkerPop 3.2.4 (Release Date: NOT OFFICIALLY RELEASED YET)
+TinkerPop 3.2.4 (Release Date: February 6, 2017)
 ~~~
 
 * Fixed a bug where `PathProcessor.keepLabels` were not being pushed down into 
child traversals by `PathRetractionStrategy`.
@@ -105,6 +105,66 @@ TinkerPop 3.2.4 (Release Date: NOT OFFICIALLY RELEASED YET)
 * Added a short sleep to prevent traversal from finishing before it can be 
interrupted during `TraversalInterruptionComputerTest`.
 * Added support for SSL client authentication
 
+Bugs
+
+
+TINKERPOP-1380  dedup() doesn't dedup in rare cases
+TINKERPOP-1384  Description of filter function in traversal documentation
+TINKERPOP-1428  profile() throws NPE for union(group, group)
+TINKERPOP-1521  Mutating steps don't recognize side-effects
+TINKERPOP-1525  Plug VertexProgram iteration leak on empty Spark RDD partitions
+TINKERPOP-1534  Gremlin Server instances leaking in tests
+TINKERPOP-1537  Python tests should not use hard-coded number of workers
+TINKERPOP-1547  Two bugs found associated with MatchStep: Path retraction and 
range count.
+TINKERPOP-1548  Traversals can complete before interrupted in 
TraversalInterruptionComputerTest
+TINKERPOP-1560  Cache in GroovyClassLoader may continue to grow
+TINKERPOP-1561  gremiln-python GraphSONWriter doesn't properly serialize long 
in Python 3.5
+TINKERPOP-1567  GraphSON deserialization fails with within('a')
+TINKERPOP-1573  Bindings don't work in coalesce
+TINKERPOP-1576  gremlin-python calls non-existent methods
+TINKERPOP-1581  Gremlin-Python driver connection is not thread safe.
+TINKERPOP-1583  PathRetractionStrategy retracts keys that are actually needed
+TINKERPOP-1585  OLAP dedup over non elements
+TINKERPOP-1587  Gremlin Server Subgraph Cardinality Not Respected
+TINKERPOP-1594  LazyBarrierStrategy does not activate with ProfileStep
+TINKERPOP-1605  gremlin-console 3.2.3 -e can no longer take paths relative to 
current working directory
+
+Improvements
+
+
+TINKERPOP-887   FastNoSuchElementException hides stack trace in client code
+TINKERPOP-919   Features needs to specify whether 2 vertex properties with 
same key/value is allowed.
+TINKERPOP-932   Add ability to cancel script execution associated with a 
Gremlin Server Session
+TINKERPOP-1248  OrderGlobalStep should use local star graph to compute sorts, 
prior to reduction.
+TINKERPOP-1261  Side-effect group().by() can't handle 

[40/40] tinkerpop git commit: added code for new driver, updated driver tests

2017-02-15 Thread davebshow
added code for new driver, updated driver tests


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

Branch: refs/heads/TINKERPOP-1599
Commit: c2136cd7b1a9d47733caf3d610aa6b47c25db399
Parents: 9d74372
Author: davebshow <davebs...@gmail.com>
Authored: Mon Jan 30 17:22:36 2017 -0500
Committer: davebshow <davebs...@gmail.com>
Committed: Wed Feb 15 13:22:01 2017 -0500

--
 gremlin-python/pom.xml  |   1 +
 .../python/TraversalSourceGenerator.groovy  |  11 +-
 .../main/jython/gremlin_python/driver/client.py | 114 
 .../jython/gremlin_python/driver/connection.py  |  78 ++
 .../driver/driver_remote_connection.py  | 260 +++
 .../jython/gremlin_python/driver/protocol.py| 103 
 .../gremlin_python/driver/remote_connection.py  |  98 ---
 .../jython/gremlin_python/driver/request.py |  25 ++
 .../jython/gremlin_python/driver/resultset.py   |  91 +++
 .../jython/gremlin_python/driver/serializer.py  | 117 +
 .../gremlin_python/driver/tornado/__init__.py   |  18 ++
 .../gremlin_python/driver/tornado/transport.py  |  48 
 .../jython/gremlin_python/driver/transport.py   |  46 
 .../jython/gremlin_python/process/traversal.py  |  11 +-
 gremlin-python/src/main/jython/setup.py |  18 +-
 .../src/main/jython/tests/conftest.py   |  72 +
 .../src/main/jython/tests/driver/test_client.py |  98 +++
 .../driver/test_driver_remote_connection.py | 150 ---
 .../test_driver_remote_connection_threaded.py   |  77 +++---
 .../jython/tests/structure/io/test_graphson.py  |  21 +-
 20 files changed, 1039 insertions(+), 418 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/c2136cd7/gremlin-python/pom.xml
--
diff --git a/gremlin-python/pom.xml b/gremlin-python/pom.xml
index c9d6c65..2b4a80e 100644
--- a/gremlin-python/pom.xml
+++ b/gremlin-python/pom.xml
@@ -314,6 +314,7 @@
 aenum==1.4.5
 tornado==4.4.1
 six==1.10.0
+futures==3.0.5
 
 
 

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/c2136cd7/gremlin-python/src/main/groovy/org/apache/tinkerpop/gremlin/python/TraversalSourceGenerator.groovy
--
diff --git 
a/gremlin-python/src/main/groovy/org/apache/tinkerpop/gremlin/python/TraversalSourceGenerator.groovy
 
b/gremlin-python/src/main/groovy/org/apache/tinkerpop/gremlin/python/TraversalSourceGenerator.groovy
index fc76b71..995fe80 100644
--- 
a/gremlin-python/src/main/groovy/org/apache/tinkerpop/gremlin/python/TraversalSourceGenerator.groovy
+++ 
b/gremlin-python/src/main/groovy/org/apache/tinkerpop/gremlin/python/TraversalSourceGenerator.groovy
@@ -116,15 +116,16 @@ class Traversal(object):
 return tempList
 def promise(self, cb=None):
 self.traversal_strategies.apply_async_strategies(self)
-future_traversers = self.traversers
-future = type(future_traversers)()
+future_traversal = self.remote_results
+future = type(future_traversal)()
 def process(f):
 try:
-traversers = f.result()
+traversal = f.result()
 except Exception as e:
 future.set_exception(e)
 else:
-self.traversers = iter(traversers)
+self.traversers = iter(traversal.traversers)
+self.side_effects = traversal.side_effects
 if cb:
 try:
 result = cb(self)
@@ -134,7 +135,7 @@ class Traversal(object):
 future.set_result(result)
 else:
 future.set_result(self)
-future_traversers.add_done_callback(process)
+future_traversal.add_done_callback(process)
 return future
 
 

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/c2136cd7/gremlin-python/src/main/jython/gremlin_python/driver/client.py
--
diff --git a/gremlin-python/src/main/jython/gremlin_python/driver/client.py 
b/gremlin-python/src/main/jython/gremlin_python/driver/client.py
new file mode 100644
index 000..dec39bf
--- /dev/null
+++ b/gremlin-python/src/main/jython/gremlin_python/driver/client.py
@@

[07/40] tinkerpop git commit: TINKERPOP-1589 Re-introduced CloseableIterator

2017-02-15 Thread davebshow
TINKERPOP-1589 Re-introduced CloseableIterator

https://issues.apache.org/jira/browse/TINKERPOP-1589
Add support for the closing of Iterators returned from
`Vertex.vertices()` and `Vertex.edges()`.
Make `FlatMapStep` close iterator after read to completion.
Make `EdgeVertexStep`, `PropertiesStep`, `VertexStep`
`AutoCloseable` in case iterator is not read to completion
to ensure closed when Traversal is closed.
OLTP mode support only. More extensive changes required for OLAP.
Add unchecked `close()` helper method to `CloseableIterator`


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

Branch: refs/heads/TINKERPOP-1599
Commit: 494496681b57cd9f4f72c5c1a7e5abd13e8ccb91
Parents: 30bad4b
Author: PaulJackson123 
Authored: Fri Jan 27 18:54:28 2017 -0500
Committer: PaulJackson123 
Committed: Fri Jan 27 18:54:28 2017 -0500

--
 .../traversal/step/map/EdgeVertexStep.java  |  7 +-
 .../process/traversal/step/map/FlatMapStep.java | 23 +---
 .../traversal/step/map/PropertiesStep.java  |  7 +-
 .../process/traversal/step/map/VertexStep.java  |  7 +-
 .../structure/util/CloseableIterator.java   | 11 ++
 5 files changed, 34 insertions(+), 21 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/49449668/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/EdgeVertexStep.java
--
diff --git 
a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/EdgeVertexStep.java
 
b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/EdgeVertexStep.java
index df20587..87c1561 100644
--- 
a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/EdgeVertexStep.java
+++ 
b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/EdgeVertexStep.java
@@ -33,7 +33,7 @@ import java.util.Set;
 /**
  * @author Marko A. Rodriguez (http://markorodriguez.com)
  */
-public final class EdgeVertexStep extends FlatMapStep {
+public final class EdgeVertexStep extends FlatMapStep implements 
AutoCloseable {
 
 private Direction direction;
 
@@ -69,4 +69,9 @@ public final class EdgeVertexStep extends FlatMapStep {
 public Set getRequirements() {
 return Collections.singleton(TraverserRequirement.OBJECT);
 }
+
+@Override
+public void close() throws Exception {
+closeIterator();
+}
 }

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/49449668/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/FlatMapStep.java
--
diff --git 
a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/FlatMapStep.java
 
b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/FlatMapStep.java
index ce79bdf..59fc4e7 100644
--- 
a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/FlatMapStep.java
+++ 
b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/FlatMapStep.java
@@ -21,6 +21,7 @@ package 
org.apache.tinkerpop.gremlin.process.traversal.step.map;
 import org.apache.tinkerpop.gremlin.process.traversal.Traversal;
 import org.apache.tinkerpop.gremlin.process.traversal.Traverser;
 import org.apache.tinkerpop.gremlin.process.traversal.step.util.AbstractStep;
+import org.apache.tinkerpop.gremlin.structure.util.CloseableIterator;
 import org.apache.tinkerpop.gremlin.util.iterator.EmptyIterator;
 
 import java.util.Iterator;
@@ -28,7 +29,7 @@ import java.util.Iterator;
 /**
  * @author Marko A. Rodriguez (http://markorodriguez.com)
  */
-public abstract class FlatMapStep extends AbstractStep implements 
AutoCloseable {
+public abstract class FlatMapStep extends AbstractStep {
 
 private Traverser.Admin head = null;
 private Iterator iterator = EmptyIterator.instance();
@@ -56,24 +57,10 @@ public abstract class FlatMapStep extends 
AbstractStep implements Au
 public void reset() {
 super.reset();
 closeIterator();
+this.iterator = EmptyIterator.instance();
 }
 
-@Override
-public void close() {
-closeIterator();
-}
-
-private void closeIterator() {
-try {
-if (this.iterator instanceof AutoCloseable) {
-((AutoCloseable) this.iterator).close();
-}
-  

  1   2   3   >