Skip to content

Commit

Permalink
chore(python): Minor updates to prepare for Python 3.12 support (#12314)
Browse files Browse the repository at this point in the history
  • Loading branch information
stinodego authored Nov 8, 2023
1 parent 5d0656b commit b392e83
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 14 deletions.
3 changes: 1 addition & 2 deletions py-polars/polars/io/database.py
Original file line number Diff line number Diff line change
Expand Up @@ -718,8 +718,7 @@ def _read_sql_connectorx(
import connectorx as cx
except ModuleNotFoundError:
raise ModuleNotFoundError(
"connectorx is not installed"
"\n\nPlease run: pip install connectorx>=0.3.2"
"connectorx is not installed" "\n\nPlease run: pip install connectorx"
) from None

try:
Expand Down
2 changes: 1 addition & 1 deletion py-polars/polars/io/delta.py
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@ def _get_delta_lake_table(
def _check_if_delta_available() -> None:
if not _DELTALAKE_AVAILABLE:
raise ModuleNotFoundError(
"deltalake is not installed\n\nPlease run: pip install deltalake>=0.9.0"
"deltalake is not installed" "\n\nPlease run: pip install deltalake"
)


Expand Down
7 changes: 4 additions & 3 deletions py-polars/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ Changelog = "https://github.com/pola-rs/polars/releases"
# NOTE: keep this list in sync with show_versions() and requirements-dev.txt
adbc = ["adbc_driver_sqlite"]
cloudpickle = ["cloudpickle"]
connectorx = ["connectorx"]
connectorx = ["connectorx >= 0.3.2"]
deltalake = ["deltalake >= 0.13.0"]
fsspec = ["fsspec"]
gevent = ["gevent"]
Expand Down Expand Up @@ -207,10 +207,11 @@ markers = [
"docs: Documentation code snippets",
]
filterwarnings = [
# Fail on warnings...
# Fail on warnings
"error",
# ...except where it prevents test debugging in an IPython console
# Allow debugging in an IPython console
"ignore:.*unrecognized arguments.*PyDevIPCompleter:DeprecationWarning",
# Ignore warnings issued by dependency internals
"ignore:.*is_sparse is deprecated.*:FutureWarning",
"ignore:FigureCanvasAgg is non-interactive:UserWarning",
]
Expand Down
10 changes: 2 additions & 8 deletions py-polars/tests/unit/test_queries.py
Original file line number Diff line number Diff line change
Expand Up @@ -352,14 +352,8 @@ def test_none_comparison_4773() -> None:
def test_datetime_supertype_5236() -> None:
df = pd.DataFrame(
{
"StartDateTime": [
pd.Timestamp(datetime.utcnow(), tz="UTC"),
pd.Timestamp(datetime.utcnow(), tz="UTC"),
],
"EndDateTime": [
pd.Timestamp(datetime.utcnow(), tz="UTC"),
pd.Timestamp(datetime.utcnow(), tz="UTC"),
],
"StartDateTime": [pd.Timestamp.now(tz="UTC"), pd.Timestamp.now(tz="UTC")],
"EndDateTime": [pd.Timestamp.now(tz="UTC"), pd.Timestamp.now(tz="UTC")],
}
)
out = pl.from_pandas(df).filter(
Expand Down

0 comments on commit b392e83

Please sign in to comment.