Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix api client by switching to replacements for deprecated urllib3 methods #637

Merged
merged 1 commit into from
May 5, 2023

Conversation

shreyas-goenka
Copy link
Contributor

@shreyas-goenka shreyas-goenka commented May 5, 2023

Recently with the release of urllib3 v2.0.0 some deprecated attributes were removed. This PR uses there new replacements and pins the urllib3 version to when the replacements became available

We need to bound the urllib3 version because this issue has not been resolved on the requests package side as well and the requests package enforces urllib3 v1.21 or greater which does not contain the methods we need

This should fix #636

Tested manually by:

  1. pip3 install requirements.txt
  2. python3 databricks_cli/cli.py fs ls dbfs:/

Before:

shreyas.goenka@THW32HFW6T databricks-cli % python3 databricks_cli/cli.py fs ls dbfs:/
Error: AttributeError: type object 'Retry' has no attribute 'DEFAULT_METHOD_WHITELIST'

After (expected response):

shreyas.goenka@THW32HFW6T databricks-cli % python3 databricks_cli/cli.py fs ls dbfs:/
dir1
dir2
dir3
...

@shreyas-goenka shreyas-goenka requested review from a team and removed request for a team May 5, 2023 12:43
@shreyas-goenka shreyas-goenka merged commit 2dd4755 into main May 5, 2023
@shreyas-goenka shreyas-goenka deleted the fix-urllib3-version branch May 5, 2023 13:06
@ViktorDronov
Copy link

this fix does not solve the issue, because no new releases are published

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

DEFAULT_METHOD_WHITELIST does not exist anymore
3 participants