diff --git a/.github/workflows/pythonapp.yaml b/.github/workflows/pythonapp.yaml index f499dbcb..d2844cfb 100644 --- a/.github/workflows/pythonapp.yaml +++ b/.github/workflows/pythonapp.yaml @@ -22,7 +22,7 @@ jobs: - name: Remove cached duckdb extensions run: rm -rf ~/.duckdb - name: Install poetry - run: python -m pip install poetry pip -U + run: python -m pip install 'poetry<1.5.0' pip -U - name: Set up Python ${{ matrix.python }} uses: actions/setup-python@v4 with: diff --git a/duckdb_engine/datatypes.py b/duckdb_engine/datatypes.py index 0be83354..239b14fe 100644 --- a/duckdb_engine/datatypes.py +++ b/duckdb_engine/datatypes.py @@ -104,9 +104,6 @@ class Map(TypeEngine): "timestamp_ms": sqltypes.TIMESTAMP, "timestamp_ns": sqltypes.TIMESTAMP, "enum": sqltypes.Enum, - "list": lambda: sqltypes.ARRAY(sqltypes.NULLTYPE), - "struct": Struct, - "map": Map, } diff --git a/duckdb_engine/tests/test_datatypes.py b/duckdb_engine/tests/test_datatypes.py index 87f2c76c..9d47e3c1 100644 --- a/duckdb_engine/tests/test_datatypes.py +++ b/duckdb_engine/tests/test_datatypes.py @@ -106,7 +106,11 @@ def test_all_types_reflection(engine: Engine) -> None: conn.execute(text("create table t2 as select * from test_all_types()")) table = Table("t2", MetaData(), autoload_with=conn) for col in table.columns: - if col.name.endswith("_enum") and duckdb.__version__ < "0.7.1": # type: ignore[attr-defined] + name = col.name + if name.endswith("_enum") and duckdb.__version__ < "0.7.1": # type: ignore[attr-defined] continue - assert col.type != sqltypes.NULLTYPE, col.name + if "array" in name or "struct" in name or "map" in name: + assert col.type == sqltypes.NULLTYPE, name + else: + assert col.type != sqltypes.NULLTYPE, name assert not capture diff --git a/tox.ini b/tox.ini index 7b693edc..b9a59fdb 100644 --- a/tox.ini +++ b/tox.ini @@ -3,7 +3,8 @@ envlist = py{37,38,39,310}-{mypy,duckdb040,duckdb051,duckdb061,duckdb071}-sqlalc isolated_build = True requires = tox-gh-actions - tox-poetry-installer[poetry] + tox-poetry-installer + poetry<1.5.0 [gh-actions] python =