From c650e8aa38d589d14f89a25e8552384ccd5781da Mon Sep 17 00:00:00 2001 From: MarcoGorelli <33491632+MarcoGorelli@users.noreply.github.com> Date: Tue, 21 Apr 2026 12:24:21 +0100 Subject: [PATCH 1/2] chore(python): pin pyarrow version in typing job --- Makefile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Makefile b/Makefile index ae4bfc244d..f9eae4f19d 100644 --- a/Makefile +++ b/Makefile @@ -25,6 +25,8 @@ typing: ## Run typing checks --editable test-plugin/. \ --editable . \ --group typing + # temporary pin due to https://github.com/narwhals-dev/narwhals/issues/3560 + $(VENV_BIN)/uv pip install "pyarrow<24" $(VENV_BIN)/uv run --no-sync pyright $(VENV_BIN)/uv run --no-sync mypy From 0192b71e896d0b41dc8bb380a5ca1eed0d6f1bf2 Mon Sep 17 00:00:00 2001 From: MarcoGorelli <33491632+MarcoGorelli@users.noreply.github.com> Date: Tue, 21 Apr 2026 14:41:09 +0100 Subject: [PATCH 2/2] pyarrow tzdata condition --- tests/expr_and_series/cast_test.py | 10 ++++------ tests/frame/to_numpy_test.py | 6 ++---- tests/selectors_test.py | 6 ++++-- tests/series_only/to_numpy_test.py | 7 ++----- 4 files changed, 12 insertions(+), 17 deletions(-) diff --git a/tests/expr_and_series/cast_test.py b/tests/expr_and_series/cast_test.py index 90282ea596..9c73bfb822 100644 --- a/tests/expr_and_series/cast_test.py +++ b/tests/expr_and_series/cast_test.py @@ -217,9 +217,8 @@ def test_cast_datetime_tz_aware( or "ibis" in str(constructor) ): request.applymarker(pytest.mark.xfail) - request.applymarker( - pytest.mark.xfail(is_pyarrow_windows_no_tzdata(constructor), reason="no tzdata") - ) + if is_pyarrow_windows_no_tzdata(constructor): + pytest.skip() data = { "date": [ @@ -247,9 +246,8 @@ def test_cast_datetime_utc( or "sqlframe" in str(constructor) ): request.applymarker(pytest.mark.xfail) - request.applymarker( - pytest.mark.xfail(is_pyarrow_windows_no_tzdata(constructor), reason="no tzdata") - ) + if is_pyarrow_windows_no_tzdata(constructor): + pytest.skip() data = { "date": [ diff --git a/tests/frame/to_numpy_test.py b/tests/frame/to_numpy_test.py index 9330a2c7b3..8ca9017f8d 100644 --- a/tests/frame/to_numpy_test.py +++ b/tests/frame/to_numpy_test.py @@ -24,13 +24,11 @@ def test_to_numpy(constructor_eager: ConstructorEager) -> None: assert result.dtype == "float64" -def test_to_numpy_tz_aware( - constructor_eager: ConstructorEager, request: pytest.FixtureRequest -) -> None: +def test_to_numpy_tz_aware(constructor_eager: ConstructorEager) -> None: if ("pandas_pyarrow" in str(constructor_eager) and PANDAS_VERSION < (2, 2)) or ( "pyarrow" in str(constructor_eager) and is_windows() ): - request.applymarker(pytest.mark.xfail) + pytest.skip() df = nw.from_native( constructor_eager({"a": [datetime(2020, 1, 1), datetime(2020, 1, 2)]}), eager_only=True, diff --git a/tests/selectors_test.py b/tests/selectors_test.py index 63c6b387e5..780eaf65c2 100644 --- a/tests/selectors_test.py +++ b/tests/selectors_test.py @@ -85,14 +85,16 @@ def test_datetime(constructor: Constructor, request: pytest.FixtureRequest) -> N "pyspark" in str(constructor) or "duckdb" in str(constructor) or "dask" in str(constructor) - or ("pyarrow" in str(constructor) and is_windows()) - or ("pandas" in str(constructor) and PANDAS_VERSION < (2,)) or "ibis" in str(constructor) # https://github.com/pola-rs/polars/issues/23767 # TODO(FBruzzesi): Manage polars version or ("polars" in str(constructor) and POLARS_VERSION >= (1, 32, 0)) ): request.applymarker(pytest.mark.xfail) + if ("pyarrow" in str(constructor) and is_windows()) or ( + "pandas" in str(constructor) and PANDAS_VERSION < (2,) + ): + pytest.skip() if "modin" in str(constructor): pytest.skip(reason="too slow") diff --git a/tests/series_only/to_numpy_test.py b/tests/series_only/to_numpy_test.py index 21873760cb..aa81126b6a 100644 --- a/tests/series_only/to_numpy_test.py +++ b/tests/series_only/to_numpy_test.py @@ -34,16 +34,13 @@ def test_to_numpy( assert_array_equal(s.to_numpy(), np.array(data, dtype=float)) -def test_to_numpy_tz_aware( - constructor_eager: ConstructorEager, request: pytest.FixtureRequest -) -> None: +def test_to_numpy_tz_aware(constructor_eager: ConstructorEager) -> None: if ( ("pandas_pyarrow" in str(constructor_eager) and PANDAS_VERSION < (2, 2)) or ("modin_pyarrow" in str(constructor_eager) and PANDAS_VERSION < (2, 2)) or ("pyarrow" in str(constructor_eager) and is_windows()) ): - request.applymarker(pytest.mark.xfail) - request.applymarker(pytest.mark.xfail) + pytest.skip() df = nw.from_native( constructor_eager({"a": [datetime(2020, 1, 1), datetime(2020, 1, 2)]}), eager_only=True,