From 64de75dec9382b12d1d9e35a4b9c118632dd6ca5 Mon Sep 17 00:00:00 2001 From: Dave Date: Thu, 7 Nov 2024 19:04:33 +0100 Subject: [PATCH] fix dependencies and typing --- dlt/common/libs/ibis.py | 2 - dlt/destinations/dataset.py | 3 -- poetry.lock | 82 ++++++++++++++++++++++++++++++++++++- pyproject.toml | 1 + 4 files changed, 81 insertions(+), 7 deletions(-) diff --git a/dlt/common/libs/ibis.py b/dlt/common/libs/ibis.py index 918e5c19c6..294706bb70 100644 --- a/dlt/common/libs/ibis.py +++ b/dlt/common/libs/ibis.py @@ -7,8 +7,6 @@ try: import ibis # type: ignore[import-untyped] - from ibis import Table - from ibis import memtable from ibis import BaseBackend except ModuleNotFoundError: raise MissingDependencyException("dlt ibis Helpers", ["ibis"]) diff --git a/dlt/destinations/dataset.py b/dlt/destinations/dataset.py index b6e1cfaef2..b0ab6f7108 100644 --- a/dlt/destinations/dataset.py +++ b/dlt/destinations/dataset.py @@ -24,13 +24,10 @@ if TYPE_CHECKING: try: - from dlt.common.libs.ibis import Table as IbisTable from dlt.common.libs.ibis import BaseBackend as IbisBackend except MissingDependencyException: - IbisTable = Any IbisBackend = Any else: - IbisTable = Any IbisBackend = Any diff --git a/poetry.lock b/poetry.lock index bdd20e7dac..0b58265f7f 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1,4 +1,4 @@ -# This file is automatically @generated by Poetry 1.8.4 and should not be changed by hand. +# This file is automatically @generated by Poetry 1.8.2 and should not be changed by hand. [[package]] name = "about-time" @@ -757,6 +757,17 @@ files = [ {file = "async_timeout-4.0.3-py3-none-any.whl", hash = "sha256:7405140ff1230c310e51dc27b3145b9092d659ce68ff733fb0cefe3ee42be028"}, ] +[[package]] +name = "atpublic" +version = "5.0" +description = "Keep all y'all's __all__'s in sync" +optional = false +python-versions = ">=3.8" +files = [ + {file = "atpublic-5.0-py3-none-any.whl", hash = "sha256:b651dcd886666b1042d1e38158a22a4f2c267748f4e97fde94bc492a4a28a3f3"}, + {file = "atpublic-5.0.tar.gz", hash = "sha256:d5cb6cbabf00ec1d34e282e8ce7cbc9b74ba4cb732e766c24e2d78d1ad7f723f"}, +] + [[package]] name = "attrs" version = "23.1.0" @@ -4448,6 +4459,51 @@ files = [ {file = "hyperframe-6.0.1.tar.gz", hash = "sha256:ae510046231dc8e9ecb1a6586f63d2347bf4c8905914aa84ba585ae85f28a914"}, ] +[[package]] +name = "ibis-framework" +version = "10.0.0.dev231" +description = "The portable Python dataframe library" +optional = false +python-versions = "<4.0,>=3.10" +files = [ + {file = "ibis_framework-10.0.0.dev231-py3-none-any.whl", hash = "sha256:8689cbcd55c3680bdb5fd51ff0d2a10260372c1b15661c123b0460087cfdbda2"}, + {file = "ibis_framework-10.0.0.dev231.tar.gz", hash = "sha256:199142243d1a6a0eba3bbbe0debba910fc8087dffe4eac9e3d61823f6988f421"}, +] + +[package.dependencies] +atpublic = ">=2.3,<6" +parsy = ">=2,<3" +python-dateutil = ">=2.8.2,<3" +pytz = ">=2022.7" +sqlglot = ">=23.4,<25.29" +toolz = ">=0.11,<2" +typing-extensions = ">=4.3.0,<5" + +[package.extras] +bigquery = ["db-dtypes (>=0.3,<2)", "google-cloud-bigquery (>=3,<4)", "google-cloud-bigquery-storage (>=2,<3)", "numpy (>=1.23.2,<3)", "pandas (>=1.5.3,<3)", "pyarrow (>=10.0.1,<19)", "pyarrow-hotfix (>=0.4,<1)", "pydata-google-auth (>=1.4.0,<2)", "rich (>=12.4.4,<14)"] +clickhouse = ["clickhouse-connect[arrow,numpy,pandas] (>=0.5.23,<1)", "numpy (>=1.23.2,<3)", "pandas (>=1.5.3,<3)", "pyarrow (>=10.0.1,<19)", "pyarrow-hotfix (>=0.4,<1)", "rich (>=12.4.4,<14)"] +datafusion = ["datafusion (>=0.6,<43)", "numpy (>=1.23.2,<3)", "pandas (>=1.5.3,<3)", "pyarrow (>=10.0.1,<19)", "pyarrow-hotfix (>=0.4,<1)", "rich (>=12.4.4,<14)"] +decompiler = ["black (>=22.1.0,<25)"] +deltalake = ["deltalake (>=0.9.0,<1)"] +druid = ["numpy (>=1.23.2,<3)", "pandas (>=1.5.3,<3)", "pyarrow (>=10.0.1,<19)", "pyarrow-hotfix (>=0.4,<1)", "pydruid (>=0.6.7,<1)", "rich (>=12.4.4,<14)"] +duckdb = ["duckdb (>=0.10,<1.2)", "numpy (>=1.23.2,<3)", "packaging (>=21.3,<25)", "pandas (>=1.5.3,<3)", "pyarrow (>=10.0.1,<19)", "pyarrow-hotfix (>=0.4,<1)", "rich (>=12.4.4,<14)"] +examples = ["pins[gcs] (>=0.8.3,<1)"] +exasol = ["numpy (>=1.23.2,<3)", "pandas (>=1.5.3,<3)", "pyarrow (>=10.0.1,<19)", "pyarrow-hotfix (>=0.4,<1)", "pyexasol[pandas] (>=0.25.2,<1)", "rich (>=12.4.4,<14)"] +flink = ["numpy (>=1.23.2,<3)", "pandas (>=1.5.3,<3)", "pyarrow (>=10.0.1,<19)", "pyarrow-hotfix (>=0.4,<1)", "rich (>=12.4.4,<14)"] +geospatial = ["geoarrow-types (>=0.2,<1)", "geopandas (>=0.6,<2)", "pyproj (>=3.3.0,<4)", "shapely (>=2,<3)"] +impala = ["impyla (>=0.17,<1)", "numpy (>=1.23.2,<3)", "pandas (>=1.5.3,<3)", "pyarrow (>=10.0.1,<19)", "pyarrow-hotfix (>=0.4,<1)", "rich (>=12.4.4,<14)"] +mssql = ["numpy (>=1.23.2,<3)", "pandas (>=1.5.3,<3)", "pyarrow (>=10.0.1,<19)", "pyarrow-hotfix (>=0.4,<1)", "pyodbc (>=4.0.39,<6)", "rich (>=12.4.4,<14)"] +mysql = ["mysqlclient (>=2.2.4,<3)", "numpy (>=1.23.2,<3)", "pandas (>=1.5.3,<3)", "pyarrow (>=10.0.1,<19)", "pyarrow-hotfix (>=0.4,<1)", "rich (>=12.4.4,<14)"] +oracle = ["numpy (>=1.23.2,<3)", "oracledb (>=1.3.1,<3)", "packaging (>=21.3,<25)", "pandas (>=1.5.3,<3)", "pyarrow (>=10.0.1,<19)", "pyarrow-hotfix (>=0.4,<1)", "rich (>=12.4.4,<14)"] +polars = ["numpy (>=1.23.2,<3)", "packaging (>=21.3,<25)", "pandas (>=1.5.3,<3)", "polars (>=1,<2)", "pyarrow (>=10.0.1,<19)", "pyarrow-hotfix (>=0.4,<1)", "rich (>=12.4.4,<14)"] +postgres = ["numpy (>=1.23.2,<3)", "pandas (>=1.5.3,<3)", "psycopg2 (>=2.8.4,<3)", "pyarrow (>=10.0.1,<19)", "pyarrow-hotfix (>=0.4,<1)", "rich (>=12.4.4,<14)"] +pyspark = ["numpy (>=1.23.2,<3)", "packaging (>=21.3,<25)", "pandas (>=1.5.3,<3)", "pyarrow (>=10.0.1,<19)", "pyarrow-hotfix (>=0.4,<1)", "pyspark (>=3.3.3,<4)", "rich (>=12.4.4,<14)"] +risingwave = ["numpy (>=1.23.2,<3)", "pandas (>=1.5.3,<3)", "psycopg2 (>=2.8.4,<3)", "pyarrow (>=10.0.1,<19)", "pyarrow-hotfix (>=0.4,<1)", "rich (>=12.4.4,<14)"] +snowflake = ["numpy (>=1.23.2,<3)", "pandas (>=1.5.3,<3)", "pyarrow (>=10.0.1,<19)", "pyarrow-hotfix (>=0.4,<1)", "rich (>=12.4.4,<14)", "snowflake-connector-python (>=3.0.2,!=3.3.0b1,<4)"] +sqlite = ["numpy (>=1.23.2,<3)", "pandas (>=1.5.3,<3)", "pyarrow (>=10.0.1,<19)", "pyarrow-hotfix (>=0.4,<1)", "regex (>=2021.7.6)", "rich (>=12.4.4,<14)"] +trino = ["numpy (>=1.23.2,<3)", "pandas (>=1.5.3,<3)", "pyarrow (>=10.0.1,<19)", "pyarrow-hotfix (>=0.4,<1)", "rich (>=12.4.4,<14)", "trino (>=0.321,<1)"] +visualization = ["graphviz (>=0.16,<1)"] + [[package]] name = "idna" version = "3.4" @@ -6526,6 +6582,17 @@ files = [ [package.dependencies] future = "*" +[[package]] +name = "parsy" +version = "2.1" +description = "Easy-to-use parser combinators, for parsing in pure Python" +optional = false +python-versions = ">=3.7" +files = [ + {file = "parsy-2.1-py3-none-any.whl", hash = "sha256:8f18e7b11985e7802e7e3ecbd8291c6ca243d29820b1186e4c84605db4efffa0"}, + {file = "parsy-2.1.tar.gz", hash = "sha256:fd5dd18d7b0b61f8275ee88665f430a20c02cf5a82d88557f35330530186d7ac"}, +] + [[package]] name = "pathspec" version = "0.11.2" @@ -9310,6 +9377,17 @@ files = [ {file = "tomlkit-0.12.1.tar.gz", hash = "sha256:38e1ff8edb991273ec9f6181244a6a391ac30e9f5098e7535640ea6be97a7c86"}, ] +[[package]] +name = "toolz" +version = "1.0.0" +description = "List processing tools and functional utilities" +optional = false +python-versions = ">=3.8" +files = [ + {file = "toolz-1.0.0-py3-none-any.whl", hash = "sha256:292c8f1c4e7516bf9086f8850935c799a874039c8bcf959d47b600e4c44a6236"}, + {file = "toolz-1.0.0.tar.gz", hash = "sha256:2c86e3d9a04798ac556793bced838816296a2f085017664e4995cb40a1047a02"}, +] + [[package]] name = "tqdm" version = "4.66.1" @@ -10245,4 +10323,4 @@ weaviate = ["weaviate-client"] [metadata] lock-version = "2.0" python-versions = ">=3.8.1,<3.13" -content-hash = "3484ef539c834f9eab3af4c393e9c118966900914154605b49c21d12924f34cc" +content-hash = "18cd8f3bd2a10b5cc206e6b12fc9fe6d7af20d92891ada7080751856149439a4" diff --git a/pyproject.toml b/pyproject.toml index 5675033a08..6ab296dfc8 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -166,6 +166,7 @@ pytest-mock = "^3.14.0" types-regex = "^2024.5.15.20240519" flake8-print = "^5.0.0" mimesis = "^7.0.0" +ibis-framework = { version = ">=9.0.0", markers = "python_version >= '3.10'"} [tool.poetry.group.sources] optional = true