Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(python): Align dependency versions #9661

Merged
merged 1 commit into from
Jul 1, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions py-polars/polars/dataframe/frame.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
9 changes: 6 additions & 3 deletions py-polars/polars/utils/show_versions.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
]
Expand Down
8 changes: 5 additions & 3 deletions py-polars/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down