From 2d4c3a05d73e2357c6265e8f3398bdbccd26aab5 Mon Sep 17 00:00:00 2001 From: Elliana May Date: Wed, 22 Jun 2022 00:22:37 +0800 Subject: [PATCH 1/2] fix: use modern dialect registration --- duckdb_engine/__init__.py | 4 ---- pyproject.toml | 2 +- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/duckdb_engine/__init__.py b/duckdb_engine/__init__.py index 1648de80..e73b1da4 100644 --- a/duckdb_engine/__init__.py +++ b/duckdb_engine/__init__.py @@ -7,8 +7,6 @@ from sqlalchemy.dialects.postgresql.base import PGExecutionContext, PGInspector from sqlalchemy.engine.url import URL -name = "duckdb" # TODO: find if sqlalchemy documents this field anywhere - class DBAPI: paramstyle = "qmark" @@ -197,5 +195,3 @@ def get_view_names( return [row[0] for row in rs] - -dialect = Dialect diff --git a/pyproject.toml b/pyproject.toml index 34272b46..bb1acd8d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -23,7 +23,7 @@ ipython-sql = "^0.4.1" sqlalchemy-stubs = "^0.4" [tool.poetry.plugins."sqlalchemy.dialects"] -duckdb = "duckdb_engine" +duckdb = "duckdb_engine:Dialect" [tool.pytest.ini_options] addopts = "--hypothesis-show-statistics" From 1aa817884d7a7c69d31549ea99e427ae35456f00 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Tue, 21 Jun 2022 16:24:14 +0000 Subject: [PATCH 2/2] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- duckdb_engine/__init__.py | 1 - 1 file changed, 1 deletion(-) diff --git a/duckdb_engine/__init__.py b/duckdb_engine/__init__.py index e73b1da4..7b541b1b 100644 --- a/duckdb_engine/__init__.py +++ b/duckdb_engine/__init__.py @@ -194,4 +194,3 @@ def get_view_names( rs = connection.exec_driver_sql(s) return [row[0] for row in rs] -