From 2611758216555ea868a0a447577dbefe4ed4c306 Mon Sep 17 00:00:00 2001 From: Elliana May Date: Mon, 21 Oct 2024 16:28:19 +0800 Subject: [PATCH 1/4] build: update motherduck test --- duckdb_engine/tests/test_integration.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/duckdb_engine/tests/test_integration.py b/duckdb_engine/tests/test_integration.py index 21509acf..4d861f18 100644 --- a/duckdb_engine/tests/test_integration.py +++ b/duckdb_engine/tests/test_integration.py @@ -31,7 +31,7 @@ def test_plain_register(conn: Connection) -> None: "dev" in duckdb_version, reason="md extension not available for dev builds" ) @mark.skipif( - duckdb_version != "0.9.2", reason="md extension not available for this version" + duckdb_version != "1.1.1", reason="md extension not available for this version" ) def test_motherduck() -> None: engine = create_engine( From 3da5f136d9eceab1290d25749beb82f73873395e Mon Sep 17 00:00:00 2001 From: Elliana May Date: Mon, 21 Oct 2024 08:33:21 +0000 Subject: [PATCH 2/4] build: pin sqlalchemy to 2.0.35 --- noxfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/noxfile.py b/noxfile.py index ce3f3a6a..eb856b49 100644 --- a/noxfile.py +++ b/noxfile.py @@ -25,7 +25,7 @@ def group(title: str) -> Generator[None, None, None]: # TODO: 3.11, 3.12, 3.13 @nox.session(py=["3.8", "3.9", "3.10"]) @nox.parametrize("duckdb", ["0.9.2", "1.0.0"]) -@nox.parametrize("sqlalchemy", ["1.3", "1.4", "2.0"]) +@nox.parametrize("sqlalchemy", ["1.3", "1.4", "2.0.35"]) def tests(session: nox.Session, duckdb: str, sqlalchemy: str) -> None: tests_core(session, duckdb, sqlalchemy) From 9462233330ccebf1ffc499c69f76401e30426c3d Mon Sep 17 00:00:00 2001 From: Elliana May Date: Mon, 21 Oct 2024 08:43:56 +0000 Subject: [PATCH 3/4] correct installation operator --- noxfile.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/noxfile.py b/noxfile.py index eb856b49..36c61160 100644 --- a/noxfile.py +++ b/noxfile.py @@ -38,7 +38,8 @@ def nightly(session: nox.Session) -> None: def tests_core(session: nox.Session, duckdb: str, sqlalchemy: str) -> None: with group(f"{session.name} - Install"): poetry(session) - session.install(f"sqlalchemy~={sqlalchemy}") + operator = "==" if sqlalchemy.count(".") == 2 else f"~=" + session.install(f"sqlalchemy{operator}{sqlalchemy}") if duckdb == "master": session.install("duckdb", "--pre", "-U") else: From 220c18f310d113bbfffa9c82379eca6c7cf7f95b Mon Sep 17 00:00:00 2001 From: Elliana May Date: Mon, 21 Oct 2024 08:52:31 +0000 Subject: [PATCH 4/4] fix: add varint type --- duckdb_engine/datatypes.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/duckdb_engine/datatypes.py b/duckdb_engine/datatypes.py index c5554751..6037395f 100644 --- a/duckdb_engine/datatypes.py +++ b/duckdb_engine/datatypes.py @@ -82,6 +82,10 @@ class UInteger(Integer): pass +class VarInt(Integer): + pass + + def compile_uint(element: Integer, compiler: PGTypeCompiler, **kw: Any) -> str: return getattr(element, "name", type(element).__name__) @@ -199,6 +203,7 @@ def __init__(self, fields: Dict[str, TV]): "enum": sqltypes.Enum, "bool": sqltypes.BOOLEAN, "varchar": String, + "varint": VarInt, }