vkagamlyk commented on code in PR #2702:
URL: https://github.com/apache/tinkerpop/pull/2702#discussion_r1709869595


##########
gremlin-python/src/main/python/gremlin_python/driver/client.py:
##########
@@ -154,20 +155,19 @@ def submit_async(self, message, bindings=None, 
request_options=None):
 
         log.debug("message '%s'", str(message))
         fields = {'g': self._traversal_source}
-        if isinstance(message, traversal.Bytecode):
-            fields['gremlinType'] = 'bytecode'
-        elif isinstance(message, str):
-            fields['gremlinType'] = 'eval'
 
         if isinstance(message, str) and bindings:
             fields['bindings'] = bindings
 
-        if isinstance(message, traversal.Bytecode) or isinstance(message, str):
+        if isinstance(message, str):
             log.debug("fields='%s', gremlin='%s'", str(fields), str(message))
             message = request.RequestMessageV4(fields=fields, gremlin=message)
 
         conn = self._pool.get(True)
         if request_options:
-            message.fields.update(request_options)
+            message.fields.update({token: request_options[token] for token in 
TokensV4
+                                   if token in request_options})
+            if 'params' in request_options:

Review Comment:
   good to have test for case when both `bindings` and request_options are 
present



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to