Skip to content

TypeError: Retry.__init__() got an unexpected keyword argument 'backoff_max' #411

Closed

Description

@rth

In the latest version on main there seem to be a regression, where,

    import os
    from databricks import sql as databricks_sql

    db = databricks_sql.connect(
        server_hostname=os.getenv("DATABRICKS_SERVER_HOSTNAME"),
        http_path=os.getenv("DATABRICKS_HTTP_PATH"),
        access_token=os.getenv("DATABRICKS_TOKEN"),
    )

Produces

Traceback (most recent call last):
  File "", line 8, in main
    db = databricks_sql.connect(
  File "databricks/sql/__init__.py", line 88, in connect
    from .client import Connection
  File "databricks/sql/client.py", line 19, in <module>
    from databricks.sql.thrift_backend import ThriftBackend
  File "databricks/sql/thrift_backend.py", line 29, in <module>
    from databricks.sql.utils import (
  File "databricks/sql/utils.py", line 17, in <module>
    from databricks.sql.cloudfetch.download_manager import ResultFileDownloadManager
  File "databricks/sql/cloudfetch/download_manager.py", line 6, in <module>
    from databricks.sql.cloudfetch.downloader import (
  File "databricks/sql/cloudfetch/downloader.py", line 17, in <module>
    retryPolicy = Retry(
TypeError: Retry.__init__() got an unexpected keyword argument 'backoff_max'

Possibly introduced by 185ff3c cc @kravets-levko

I was trying to test it would help for #383

Activity

  1. kravets-levko commented on Jul 11, 2024

    @kravets-levko
    Contributor

    Hi @rth! What it the urllib3 version installed on your machine?

  2. kravets-levko commented on Jul 11, 2024

    @kravets-levko
    Contributor

    Yep, seems this parameter was added in urllib3 v2.0.0, while we allow >=1.21.1. Thank you for reporting, I'll fi this ASAP

  3. rth commented on Jul 11, 2024

    @rth
    Author

    What it the urllib3 version installed on your machine?

    Thanks! I had requests 2.28.2 and urllib3 1.26.19

    while we allow >=1.21.1.

    The minimal requests version should probably be increased as well, as they allow a narrow range of urllib3 version, so say requests 2.28.2 cannot be installed with urllib3 v2.0.0

    In any case I confirm that using a recent requests/urllib3 version fixes this particular error. Thanks!

  4. kravets-levko commented on Jul 11, 2024

    @kravets-levko
    Contributor

    Probably I will not restrict urllib3 version to >=2.0.0, but instead just omit that option - the default value looks reasonable enough

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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