From 655f41a47d95c857ef546e81cd652754e04cde97 Mon Sep 17 00:00:00 2001 From: Sarah Clark Date: Wed, 7 Jan 2026 15:40:39 -0800 Subject: [PATCH 1/2] python314Packages.altair: use finalAttrs --- pkgs/development/python-modules/altair/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/development/python-modules/altair/default.nix b/pkgs/development/python-modules/altair/default.nix index 9bf7c73401b1..538ba6b9a0cb 100644 --- a/pkgs/development/python-modules/altair/default.nix +++ b/pkgs/development/python-modules/altair/default.nix @@ -20,7 +20,7 @@ vega-datasets, }: -buildPythonPackage rec { +buildPythonPackage (finalAttrs: { pname = "altair"; version = "5.5.0"; pyproject = true; @@ -30,7 +30,7 @@ buildPythonPackage rec { src = fetchFromGitHub { owner = "altair-viz"; repo = "altair"; - tag = "v${version}"; + tag = "v${finalAttrs.version}"; hash = "sha256-lrKC4FYRQEax5E0lQNhO9FLk5UOJ0TnYzqZjndlRpGI="; }; @@ -90,4 +90,4 @@ buildPythonPackage rec { vinetos ]; }; -} +}) From 46c8e57ed64bbe1cf82047a163e2aa0212719bd3 Mon Sep 17 00:00:00 2001 From: Sarah Clark Date: Wed, 7 Jan 2026 16:11:36 -0800 Subject: [PATCH 2/2] python314Packages.altair: 5.5.0 -> 6.0.0 --- .../python-modules/altair/default.nix | 26 ++++++++++++++----- 1 file changed, 19 insertions(+), 7 deletions(-) diff --git a/pkgs/development/python-modules/altair/default.nix b/pkgs/development/python-modules/altair/default.nix index 538ba6b9a0cb..bc86a2f5255d 100644 --- a/pkgs/development/python-modules/altair/default.nix +++ b/pkgs/development/python-modules/altair/default.nix @@ -3,10 +3,12 @@ buildPythonPackage, fetchFromGitHub, hatchling, + anywidget, ipython, ipywidgets, jinja2, jsonschema, + mistune, narwhals, numpy, packaging, @@ -17,21 +19,20 @@ pythonOlder, toolz, typing-extensions, - vega-datasets, + vl-convert-python, + writableTmpDirAsHomeHook, }: buildPythonPackage (finalAttrs: { pname = "altair"; - version = "5.5.0"; + version = "6.0.0"; pyproject = true; - disabled = pythonOlder "3.9"; - src = fetchFromGitHub { owner = "altair-viz"; repo = "altair"; tag = "v${finalAttrs.version}"; - hash = "sha256-lrKC4FYRQEax5E0lQNhO9FLk5UOJ0TnYzqZjndlRpGI="; + hash = "sha256-+Qc51L4tL1pRDpWwadxPpTE4tDH3FTO/wH67FtXMN7k="; }; build-system = [ hatchling ]; @@ -48,16 +49,23 @@ buildPythonPackage (finalAttrs: { ++ lib.optional (pythonOlder "3.14") typing-extensions; nativeCheckInputs = [ + anywidget ipython ipywidgets + mistune polars pytest-xdist pytestCheckHook - vega-datasets + vl-convert-python + writableTmpDirAsHomeHook ]; pythonImportsCheck = [ "altair" ]; + enabledTestPaths = [ + "tests/" + ]; + disabledTests = [ # ValueError: Saving charts in 'svg' format requires the vl-convert-python or altair_saver package: see http://github.com/altair-viz/altair_saver/ "test_renderer_with_none_embed_options" @@ -66,13 +74,17 @@ buildPythonPackage (finalAttrs: { "test_dataframe_to_csv[pandas]" # Network access "test_theme_remote_lambda" + "test_chart_validation_errors" + "test_multiple_field_strings_in_condition" ]; disabledTestPaths = [ # Disabled because it requires internet connectivity "tests/test_examples.py" + "tests/test_datasets.py" + "altair/datasets/_data.py" # TODO: Disabled because of missing altair_viewer package - "tests/vegalite/v5/test_api.py" + "tests/vegalite/v6/test_api.py" # avoid updating files and dependency on black "tests/test_toplevel.py" # require vl-convert package