We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 512d37c commit ff0ec64Copy full SHA for ff0ec64
src/databricks/sql/auth/retry.py
@@ -17,6 +17,8 @@
17
from urllib3 import HTTPResponse as BaseHTTPResponse
18
from urllib3 import Retry
19
from urllib3.util.retry import RequestHistory
20
+from packaging import version
21
+
22
23
24
from databricks.sql.exc import (
@@ -312,9 +314,7 @@ def get_backoff_time(self) -> float:
312
314
313
315
current_attempt = self.stop_after_attempts_count - int(self.total or 0)
316
proposed_backoff = (2**current_attempt) * self.delay_min
-
- library_version = version("urllib3")
317
- if int(library_version.split(".")[0]) >= 2:
+ if version.parse(urllib3.__version__) >= version.parse("2.0.0"):
318
if self.backoff_jitter != 0.0:
319
proposed_backoff += random.random() * self.backoff_jitter
320
0 commit comments