This is an automated email from the ASF dual-hosted git repository.

xiazcy pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/tinkerpop.git

commit 6a0f254510a6845c77d002a467924718b56729ac
Merge: 8ba85676aa 10d498f338
Author: Yang Xia <[email protected]>
AuthorDate: Fri Oct 20 12:21:26 2023 -0700

    Merge branch '3.6-dev'

 CHANGELOG.asciidoc                                 |   2 +
 .../traversal/translator/GroovyTranslator.java     |   2 +-
 .../traversal/translator/GroovyTranslatorTest.java |  15 +
 gremlin-python/docker-compose.yml                  |   2 +
 .../gremlin_python/driver/aiohttp/transport.py     |  98 +++++++
 .../main/python/gremlin_python/driver/client.py    |  33 ++-
 .../main/python/gremlin_python/driver/protocol.py  |  95 ++++++-
 .../python/gremlin_python/driver/serializer.py     |   7 +-
 .../python/gremlin_python/process/translator.py    | 200 ++++++++++---
 gremlin-python/src/main/python/tests/conftest.py   |  58 +++-
 .../driver/test_driver_remote_connection_http.py   | 232 +++++++++++++++
 .../main/python/tests/process/test_translator.py   | 312 ++++++++++++---------
 12 files changed, 874 insertions(+), 182 deletions(-)

diff --cc gremlin-python/docker-compose.yml
index dfb7f00f0e,02e693ee5b..5f9ef5dd4c
--- a/gremlin-python/docker-compose.yml
+++ b/gremlin-python/docker-compose.yml
@@@ -61,10 -58,10 +61,12 @@@ services
        - KRB5CCNAME=./test-tkt.cc
        - GREMLIN_SERVER_URL=ws://gremlin-server-test-python:{}/gremlin
        - 
GREMLIN_SERVER_BASIC_AUTH_URL=wss://gremlin-server-test-python:{}/gremlin
+       - GREMLIN_SERVER_URL_HTTP=http://gremlin-server-test-python:{}/
+       - 
GREMLIN_SERVER_BASIC_AUTH_URL_HTTP=https://gremlin-server-test-python:{}/
        - KRB_HOSTNAME=${KRB_HOSTNAME:-gremlin-server-test}
        - VERSION=${VERSION}
 +      - GREMLIN_SOCKET_SERVER_URL=ws://gremlin-socket-server-python:{}/gremlin
 +      - 
GREMLIN_SOCKET_SERVER_CONFIG_PATH=/python_app/gremlin-socket-server/conf/test-ws-gremlin.yaml
      working_dir: /python_app
      command: >
        bash -c "apt-get update && apt-get -y install libkrb5-dev krb5-user
diff --cc gremlin-python/src/main/python/tests/conftest.py
index 5c655fc8fa,c80d107d26..64fb16f82f
--- a/gremlin-python/src/main/python/tests/conftest.py
+++ b/gremlin-python/src/main/python/tests/conftest.py
@@@ -48,8 -42,11 +48,12 @@@ kerberos_hostname = os.environ.get('KRB
  anonymous_url = gremlin_server_url.format(45940)
  basic_url = gremlin_basic_auth_url.format(45941)
  kerberos_url = gremlin_server_url.format(45942)
 +
  kerberized_service = 'test-service@{}'.format(kerberos_hostname)
+ gremlin_server_url_http = os.environ.get('GREMLIN_SERVER_URL_HTTP', 
'http://localhost:{}/')
+ gremlin_basic_auth_url_http = 
os.environ.get('GREMLIN_SERVER_BASIC_AUTH_URL_HTTP', 'https://localhost:{}/')
+ anonymous_url_http = gremlin_server_url_http.format(45940)
+ basic_url_http = gremlin_basic_auth_url_http.format(45941)
  verbose_logging = False
  
  logging.basicConfig(format='%(asctime)s [%(levelname)8s] 
[%(filename)15s:%(lineno)d - %(funcName)10s()] - %(message)s',
diff --cc gremlin-python/src/main/python/tests/process/test_translator.py
index 867a2ae0a8,eb055e2543..14d8c22787
--- a/gremlin-python/src/main/python/tests/process/test_translator.py
+++ b/gremlin-python/src/main/python/tests/process/test_translator.py
@@@ -343,23 -349,18 +349,25 @@@ class TestTranslator(object)
                        "g.withStrategies(new 
OptionsStrategy(evaluationTimeout:500)).V().count()"])
          # 96
          tests.append([g.withStrategies(OptionsStrategy({'evaluationTimeout': 
500})).V().count(),
-                      "g.withStrategies(new 
OptionsStrategy(evaluationTimeout:500)).V().count()"])
+                       "g.withStrategies(new 
OptionsStrategy(evaluationTimeout:500)).V().count()"])
          # 97
-         
tests.append([g.withStrategies(PartitionStrategy(partition_key="partition", 
write_partition="a", read_partitions=["a"])).addV('test'),
-                      "g.withStrategies(new 
PartitionStrategy(partitionKey:'partition',writePartition:'a',readPartitions:['a'])).addV('test')"])
+         tests.append([g.withStrategies(
+             PartitionStrategy(partition_key="partition", write_partition="a", 
read_partitions=["a"])).addV('test'),
+                       "g.withStrategies(new 
PartitionStrategy(partitionKey:'partition',writePartition:'a',readPartitions:['a'])).addV('test')"])
          # 98
-         
tests.append([g.withComputer().V().shortestPath().with_(ShortestPath.target, 
__.has('name','peter')),
-                      "g.withStrategies(new 
VertexProgramStrategy()).V().shortestPath().with('~tinkerpop.shortestPath.target',__.has('name','peter'))"])
+         
tests.append([g.withComputer().V().shortestPath().with_(ShortestPath.target, 
__.has('name', 'peter')),
+                       
"g.withStrategies(VertexProgramStrategy).V().shortestPath().with('~tinkerpop.shortestPath.target',__.has('name','peter'))"])
+ 
 +        # 99
 +        tests.append([g.V().coalesce(__.E(),__.addE('person')),
 +                     "g.V().coalesce(__.E(),__.addE('person'))"])
 +        # 100
 +        tests.append([g.inject(1).E(),
 +                     "g.inject(1).E()"])
 +
          # 99
          tests.append([g.V().has("p1", starting_with("foo")),
-                      "g.V().has('p1',startingWith('foo'))"])
+                       "g.V().has('p1',startingWith('foo'))"])
  
          # 100
          tests.append([g.V().has("p1", ending_with("foo")),

Reply via email to