Support SQLAlchemy 2.0 (#3310)

With https://github.com/executablebooks/jupyter-cache/pull/93 merged and
`MyST-NB` updated, we can now support SQLAlchemy 2. Closes #1766
This commit is contained in:
Jon Luo 2023-04-25 00:10:56 -04:00 committed by GitHub
parent 7c2c73af5f
commit b765805964
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -180,7 +180,7 @@ class SQLDatabase:
def _get_sample_rows(self, table: Table) -> str:
# build the select command
command = select([table]).limit(self._sample_rows_in_table_info)
command = select(table).limit(self._sample_rows_in_table_info)
# save the columns in string format
columns_str = "\t".join([col.name for col in table.columns])

View File

@ -13,7 +13,7 @@ langchain-server = "langchain.server:main"
[tool.poetry.dependencies]
python = ">=3.8.1,<4.0"
pydantic = "^1"
SQLAlchemy = "^1"
SQLAlchemy = ">1.3,<3"
requests = "^2"
PyYAML = ">=5.4.1"
numpy = "^1"