Skip to content

Commit 1594261

Browse files
author
Jesse
authored
SQLAlchemy 2: Bump dependency version and update e2e tests for existing behaviour (#236)
Signed-off-by: Jesse Whitehouse <jesse.whitehouse@databricks.com>
1 parent e064e25 commit 1594261

File tree

6 files changed

+141
-93
lines changed

6 files changed

+141
-93
lines changed

poetry.lock

Lines changed: 57 additions & 50 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ numpy = [
2626
{ version = ">=1.16.6", python = ">=3.7,<3.11" },
2727
{ version = ">=1.23.4", python = ">=3.11" },
2828
]
29-
sqlalchemy = "^1.3.24"
29+
sqlalchemy = "2.0.21"
3030
openpyxl = "^3.0.10"
3131
alembic = "^1.0.11"
3232
urllib3 = ">=1.0"
@@ -60,5 +60,5 @@ exclude = '/(\.eggs|\.git|\.hg|\.mypy_cache|\.nox|\.tox|\.venv|\.svn|_build|buck
6060
minversion = "6.0"
6161
log_cli = "false"
6262
log_cli_level = "INFO"
63-
testpaths = ["tests"]
63+
testpaths = ["tests", "src/databricks/sqlalchemy/test_local"]
6464
env_files = ["test.env"]

src/databricks/sqlalchemy/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,7 @@ def has_table(
283283

284284
try:
285285
res = connection.execute(
286-
f"DESCRIBE TABLE {_catalog}.{_schema}.{table_name}"
286+
sqlalchemy.text(f"DESCRIBE TABLE {_catalog}.{_schema}.{table_name}")
287287
)
288288
return True
289289
except DatabaseError as e:
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
"""
2+
This module contains tests entirely maintained by Databricks.
3+
4+
These tests do not rely on SQLAlchemy's custom test runner.
5+
"""
File renamed without changes.

0 commit comments

Comments
 (0)