xiazcy commented on code in PR #2702:
URL: https://github.com/apache/tinkerpop/pull/2702#discussion_r1709852294
##########
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:
I'm fairly certain that bindings should be sent within request_options, but
python has been having it separated. I'm not sure if we should change the API
with this PR yet, so I've updated the `request_options['params']` to add to the
`bindings` dict instead.
--
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]