Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitd28a692

Browse files
author
Jesse
authored
Make backwards compatible with urllib3~=1.0 (databricks#197)
Signed-off-by: Jesse Whitehouse <jesse.whitehouse@databricks.com>
1 parent7aaa014 commitd28a692

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

‎pyproject.toml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ numpy = [
2929
sqlalchemy ="^1.3.24"
3030
openpyxl ="^3.0.10"
3131
alembic ="^1.0.11"
32-
urllib3 ="^2.0.0"
32+
urllib3 =">=1.0"
3333

3434
[tool.poetry.dev-dependencies]
3535
pytest ="^7.1.2"

‎src/databricks/sql/auth/retry.py‎

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,13 @@
44
fromenumimportEnum
55
fromtypingimportList,Optional,Tuple,Union
66

7-
fromurllib3importBaseHTTPResponse# type: ignore
7+
# We only use this import for type hinting
8+
try:
9+
# If urllib3~=2.0 is installed
10+
fromurllib3importBaseHTTPResponse# type: ignore
11+
exceptImportError:
12+
# If urllib3~=1.0 is installed
13+
fromurllib3importHTTPResponseasBaseHTTPResponse
814
fromurllib3importRetry
915
fromurllib3.util.retryimportRequestHistory
1016

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp