[ 
https://issues.apache.org/jira/browse/TINKERPOP-3250?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18088118#comment-18088118
 ] 

ASF GitHub Bot commented on TINKERPOP-3250:
-------------------------------------------

Cole-Greer commented on code in PR #3447:
URL: https://github.com/apache/tinkerpop/pull/3447#discussion_r3391913134


##########
gremlin-python/src/main/python/gremlin_python/driver/connection.py:
##########
@@ -34,17 +35,23 @@ def __init__(self, status):
 class Connection:
 
     def __init__(self, url, traversal_source,
-                 executor, pool, request_serializer=None,
+                 executor, pool,
                  response_serializer=None, auth=None, interceptors=None,
                  headers=None, enable_user_agent_on_connect=True,
                  bulk_results=False, **transport_kwargs):
         if callable(interceptors):
             interceptors = [interceptors]
-        elif not (isinstance(interceptors, tuple)
-                  or isinstance(interceptors, list)
-                  or interceptors is None):
+        elif isinstance(interceptors, tuple):
+            interceptors = list(interceptors)
+        elif not (isinstance(interceptors, list) or interceptors is None):
             raise TypeError("interceptors must be a callable, tuple, list or 
None")
 
+        # Auth is just an interceptor. As a convenience (and for 
discoverability), the auth

Review Comment:
   Python is the only GLV which maintains a separate config for `auth` beyond 
the general `interceptor` configuration option. I think this is a good 
opportunity to simplify things and bring python inline with the other GLVs.





> Modify default request serialization to JSON
> --------------------------------------------
>
>                 Key: TINKERPOP-3250
>                 URL: https://issues.apache.org/jira/browse/TINKERPOP-3250
>             Project: TinkerPop
>          Issue Type: Improvement
>            Reporter: Ken Hu
>            Priority: Major
>
> Changing the default request serialization is more aligned to how most HTTP 
> APIs operate and will allow for easier debugging. This is especially true for 
> applications that will rely on interceptors as it is difficult to see what 
> the serialized bytes are for GraphBinary.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to