Skip to content

Commit baabbf4

Browse files
authored
ci: Unpin DuckDB version (#3211)
1 parent c25d3f0 commit baabbf4

File tree

11 files changed

+14
-30
lines changed

11 files changed

+14
-30
lines changed

.github/workflows/pytest.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,7 @@ jobs:
5353
cache-dependency-glob: "pyproject.toml"
5454
- name: install-reqs
5555
# we are not testing pyspark on Windows here because it is very slow
56-
# TODO(FBruzzesi): Unpin duckdb version once ibis makes a new release
57-
run: uv pip install -e ".[dask, modin, ibis]" --group core-tests --group extra "duckdb<1.4" --system
56+
run: uv pip install -e ".[dask, modin, ibis]" --group core-tests --group extra --system
5857
- name: show-deps
5958
run: uv pip freeze
6059
- name: Run pytest
@@ -84,8 +83,7 @@ jobs:
8483
cache-suffix: pytest-full-coverage-${{ matrix.python-version }}
8584
cache-dependency-glob: "pyproject.toml"
8685
- name: install-reqs
87-
# TODO(FBruzzesi): Unpin duckdb version once ibis makes a new release
88-
run: uv pip install -e ".[dask, modin, ibis]" --group core-tests --group extra "duckdb<1.4" --system
86+
run: uv pip install -e ".[dask, modin, ibis]" --group core-tests --group extra --system
8987
- name: show-deps
9088
run: uv pip freeze
9189
- name: Run pytest

narwhals/_dask/group_by.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
else:
2828
try:
2929
import dask.dataframe.dask_expr as dx
30-
except ModuleNotFoundError: # pragma: no cover
30+
except ModuleNotFoundError:
3131
import dask_expr as dx
3232
_DaskGroupBy = dx._groupby.GroupBy
3333

narwhals/_dask/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
else:
2020
try:
2121
import dask.dataframe.dask_expr as dx
22-
except ModuleNotFoundError: # pragma: no cover
22+
except ModuleNotFoundError:
2323
import dask_expr as dx
2424

2525

narwhals/_duckdb/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ def lambda_expr(
6464
"""
6565
try:
6666
from duckdb import LambdaExpression
67-
except ModuleNotFoundError as exc: # pragma: no cover
67+
except ModuleNotFoundError as exc:
6868
msg = f"DuckDB>=1.2.0 is required for this operation. Found: DuckDB {duckdb.__version__}"
6969
raise NotImplementedError(msg) from exc
7070
args = (params,) if isinstance(params, Expression) else params

narwhals/_pandas_like/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -552,7 +552,7 @@ def narwhals_to_native_dtype( # noqa: C901, PLR0912
552552
if isinstance_or_issubclass(dtype, dtypes.Date):
553553
try:
554554
import pyarrow as pa # ignore-banned-import
555-
except ModuleNotFoundError as exc: # pragma: no cover
555+
except ModuleNotFoundError as exc:
556556
# BUG: Never re-raised?
557557
msg = "'pyarrow>=13.0.0' is required for `Date` dtype."
558558
raise ModuleNotFoundError(msg) from exc

narwhals/dataframe.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -772,7 +772,7 @@ def __arrow_c_stream__(self, requested_schema: object | None = None) -> object:
772772
return native_frame.__arrow_c_stream__(requested_schema=requested_schema)
773773
try:
774774
pa_version = Implementation.PYARROW._backend_version()
775-
except ModuleNotFoundError as exc: # pragma: no cover
775+
except ModuleNotFoundError as exc:
776776
msg = f"'pyarrow>=14.0.0' is required for `DataFrame.__arrow_c_stream__` for object of type {type(native_frame)}"
777777
raise ModuleNotFoundError(msg) from exc
778778
if pa_version < (14, 0): # pragma: no cover

narwhals/series.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -345,7 +345,7 @@ def __arrow_c_stream__(self, requested_schema: object | None = None) -> object:
345345
return native_series.__arrow_c_stream__(requested_schema=requested_schema)
346346
try:
347347
pa_version = Implementation.PYARROW._backend_version()
348-
except ModuleNotFoundError as exc: # pragma: no cover
348+
except ModuleNotFoundError as exc:
349349
msg = f"'pyarrow>=16.0.0' is required for `Series.__arrow_c_stream__` for object of type {type(native_series)}"
350350
raise ModuleNotFoundError(msg) from exc
351351
if pa_version < (16, 0): # pragma: no cover

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -300,6 +300,7 @@ exclude_also = [
300300
"if .*implementation.is_modin",
301301
"if .*implementation.is_pyspark",
302302
"if .*implementation.is_pyspark_connect",
303+
"except ModuleNotFoundError",
303304
'request.applymarker\(pytest.mark.xfail',
304305
'backend_version <',
305306
'.*._backend_version\(\) <',

tests/expr_and_series/reduction_test.py

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
from __future__ import annotations
22

3+
from itertools import chain
34
from typing import Any
45

56
import pytest
@@ -91,17 +92,9 @@ def test_empty_scalar_reduction_select(constructor: Constructor) -> None:
9192
assert_equal_data(result, expected)
9293

9394

94-
def test_empty_scalar_reduction_with_columns(
95-
constructor: Constructor, request: pytest.FixtureRequest
96-
) -> None:
95+
def test_empty_scalar_reduction_with_columns(constructor: Constructor) -> None:
9796
if "duckdb" in str(constructor) and DUCKDB_VERSION < (1, 3):
9897
pytest.skip()
99-
if any(x in str(constructor) for x in ("sqlframe", "ibis")) and DUCKDB_VERSION >= (
100-
1,
101-
4,
102-
):
103-
request.applymarker(pytest.mark.xfail)
104-
from itertools import chain
10598

10699
data = {
107100
"str": [*"abcde"],

tests/frame/collect_test.py

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
import narwhals as nw
88
from narwhals._utils import Implementation
99
from narwhals.dependencies import get_cudf, get_modin, get_polars
10-
from tests.utils import DUCKDB_VERSION, POLARS_VERSION, Constructor, assert_equal_data
10+
from tests.utils import POLARS_VERSION, Constructor, assert_equal_data
1111

1212
if TYPE_CHECKING:
1313
from narwhals._typing import Arrow, Dask, IntoBackend, Modin, Pandas, Polars
@@ -163,12 +163,7 @@ def test_collect_with_kwargs(constructor: Constructor) -> None:
163163
assert_equal_data(result, expected)
164164

165165

166-
def test_collect_empty(constructor: Constructor, request: pytest.FixtureRequest) -> None:
167-
if any(x in str(constructor) for x in ("sqlframe", "ibis")) and DUCKDB_VERSION >= (
168-
1,
169-
4,
170-
):
171-
request.applymarker(pytest.mark.xfail)
166+
def test_collect_empty(constructor: Constructor) -> None:
172167
df = nw.from_native(constructor({"a": [1, 2, 3]}))
173168
lf = df.filter(nw.col("a").is_null()).with_columns(b=nw.lit(None)).lazy()
174169
result = lf.collect()

0 commit comments

Comments
 (0)