diff --git a/py-polars/polars/dataframe/frame.py b/py-polars/polars/dataframe/frame.py index 1c41995c11a6..4652c2bb9f53 100644 --- a/py-polars/polars/dataframe/frame.py +++ b/py-polars/polars/dataframe/frame.py @@ -3167,12 +3167,12 @@ def write_database( "'sqlalchemy' not found. Install polars with 'pip install polars[sqlalchemy]'." ) from exc - engine = create_engine(connection_uri) + engine_sa = create_engine(connection_uri) # this conversion to pandas as zero-copy # so we can utilize their sql utils for free self.to_pandas(use_pyarrow_extension_array=True).to_sql( - name=table_name, con=engine, if_exists=if_exists, index=False + name=table_name, con=engine_sa, if_exists=if_exists, index=False ) else: diff --git a/py-polars/polars/utils/show_versions.py b/py-polars/polars/utils/show_versions.py index 4d3ca258890c..70ba7939ba5a 100644 --- a/py-polars/polars/utils/show_versions.py +++ b/py-polars/polars/utils/show_versions.py @@ -58,13 +58,16 @@ def show_versions() -> None: def _get_dependency_info() -> dict[str, str]: # see the list of dependencies in pyproject.toml opt_deps = [ - "numpy", - "pandas", - "pyarrow", + "adbc_driver_sqlite", "connectorx", "deltalake", "fsspec", "matplotlib", + "numpy", + "pandas", + "pyarrow", + "pydantic", + "sqlalchemy", "xlsx2csv", "xlsxwriter", ] diff --git a/py-polars/pyproject.toml b/py-polars/pyproject.toml index 785760024ea8..efb3825d9c27 100644 --- a/py-polars/pyproject.toml +++ b/py-polars/pyproject.toml @@ -40,20 +40,22 @@ Repository = "https://github.com/pola-rs/polars" Changelog = "https://github.com/pola-rs/polars/releases" [project.optional-dependencies] -# NOTE: keep this list in sync with show_versions() +# NOTE: keep this list in sync with show_versions() and requirements-dev.txt pyarrow = ["pyarrow>=7.0.0"] pandas = ["pyarrow>=7.0.0", "pandas"] numpy = ["numpy >= 1.16.0"] fsspec = ["fsspec"] connectorx = ["connectorx"] xlsx2csv = ["xlsx2csv >= 0.8.0"] -deltalake = ["deltalake >= 0.8.0"] +deltalake = ["deltalake >= 0.10.0"] timezone = ["backports.zoneinfo; python_version < '3.9'", "tzdata; platform_system == 'Windows'"] matplotlib = ["matplotlib"] +pydantic = ["pydantic"] sqlalchemy = ["sqlalchemy", "pandas"] xlsxwriter = ["xlsxwriter"] +adbc = ["adbc_driver_sqlite"] all = [ - "polars[pyarrow,pandas,numpy,fsspec,connectorx,xlsx2csv,deltalake,timezone,matplotlib,sqlalchemy,xlsxwriter]", + "polars[pyarrow,pandas,numpy,fsspec,connectorx,xlsx2csv,deltalake,timezone,matplotlib,pydantic,sqlalchemy,xlsxwriter,adbc]", ] [tool.mypy]