Skip to content

python-arango broken on Colab default environment #171

@cw00dw0rd

Description

@cw00dw0rd

Recently I discovered that in order to use python-arango with Colab the urllib3 version must be upgraded. Based on the error, I suspect this is due to the implementation of max_retries in the python-arango HTTP client.
Upgrading urllib3 requires restarting the runtime on Colab, which isn't ideal.

Currently, attempting to connect such as is done in this notebook, now fails with this error:

/usr/local/lib/python3.7/dist-packages/arango/http.py in create_session(self, host)
     83             backoff_factor=self.BACKOFF_FACTOR,
     84             status_forcelist=[429, 500, 502, 503, 504],
---> 85             allowed_methods=["HEAD", "GET", "OPTIONS"],
     86         )
     87         http_adapter = HTTPAdapter(max_retries=retry_strategy)

TypeError: __init__() got an unexpected keyword argument 'allowed_methods'

While this is a Colab problem, I was curious if there is a solution on the python-arango side that would fix this? As far as I can tell the default Colab environment has urllib3 version 1.24.3 and comparing this to the most recent version the only change with retry, that is obvious to me is this:
image

Any ideas? I suspect implementing a fix will be faster and more likely on the driver side than getting Google to change their default environment.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions