diff --git a/pkgs/development/python-modules/vegafusion/default.nix b/pkgs/development/python-modules/vegafusion/default.nix index c53d97e00fdc..1feb046ad299 100644 --- a/pkgs/development/python-modules/vegafusion/default.nix +++ b/pkgs/development/python-modules/vegafusion/default.nix @@ -37,6 +37,10 @@ buildPythonPackage rec { hash = "sha256-yiECw9WGd+03KFOWa+bwR10gQFqzx4Riy6uw2zwdc3s="; }; + patches = [ + ./fix-test_transformer.patch + ]; + cargoDeps = rustPlatform.fetchCargoVendor { inherit src; name = "${pname}-${version}"; diff --git a/pkgs/development/python-modules/vegafusion/fix-test_transformer.patch b/pkgs/development/python-modules/vegafusion/fix-test_transformer.patch new file mode 100644 index 000000000000..71c14c2bf78d --- /dev/null +++ b/pkgs/development/python-modules/vegafusion/fix-test_transformer.patch @@ -0,0 +1,47 @@ +From 5ba473229913031b2b3053371db7887d23b45ff8 Mon Sep 17 00:00:00 2001 +From: Mario <191101255+wariuccio@users.noreply.github.com> +Date: Tue, 14 Jul 2026 20:10:05 +0100 +Subject: [PATCH] Relax data type checks in `test_transformer.py` + +https://github.com/vega/vegafusion/issues/591 +--- + vegafusion-python/tests/test_transformer.py | 14 ++++++++++---- + 1 file changed, 10 insertions(+), 4 deletions(-) + +diff --git a/vegafusion-python/tests/test_transformer.py b/vegafusion-python/tests/test_transformer.py +index 8852bb068..fe7f87e1e 100644 +--- a/vegafusion-python/tests/test_transformer.py ++++ b/vegafusion-python/tests/test_transformer.py +@@ -17,7 +17,7 @@ def test_to_arrow_expands_categoricals(): + + # Check that pyarrow type is String (not Dictionary) + b_type = pa_table.column("b").type +- assert b_type == pa.string() ++ assert b_type == pa.string() or b_type == pa.large_string() + + + def test_to_table_converts_decimals(): +@@ -45,7 +45,7 @@ def test_to_table_with_mixed_string_int_column(): + + # Check that pyarrow type is float64 (not Decimal128) + b_type = pa_table.column("b").type +- assert b_type == pa.string() ++ assert b_type == pa.string() or b_type == pa.large_string() + + + def test_to_table_with_all_conversions(): +@@ -68,6 +68,12 @@ def test_to_table_with_all_conversions(): + pa_table = to_arrow_table(df) + + # Check pyarrow types +- assert pa_table.column("b").type == pa.string() ++ assert ( ++ pa_table.column("b").type == pa.string() ++ or pa_table.column("b").type == pa.large_string() ++ ) + assert pa_table.column("c").type == pa.float64() +- assert pa_table.column("d").type == pa.string() ++ assert ( ++ pa_table.column("d").type == pa.string() ++ or pa_table.column("d").type == pa.large_string() ++ )