From 2a52e41ba5ab83156e0b0d428688512c37a53c6f Mon Sep 17 00:00:00 2001 From: Steven Allen Date: Tue, 17 Feb 2026 13:18:52 -0800 Subject: [PATCH 1/2] python313Packages.stanza: modernize and remove dependencies Switch to pyproject and use `finalAttrs` instead of a recursive attribute set. Additionally, remove the following dependencies: - toml: stanza will use tomllib when available (added in python 3.11), which appears to be the minimum supported cpython in nix. - six: upstream no longer requires six. --- .../python-modules/stanza/default.nix | 29 +++++++++++-------- 1 file changed, 17 insertions(+), 12 deletions(-) diff --git a/pkgs/development/python-modules/stanza/default.nix b/pkgs/development/python-modules/stanza/default.nix index 9944f2d3d673..37b375d3ae46 100644 --- a/pkgs/development/python-modules/stanza/default.nix +++ b/pkgs/development/python-modules/stanza/default.nix @@ -1,47 +1,52 @@ { lib, buildPythonPackage, - emoji, fetchFromGitHub, + # build-system + setuptools, + # dependencies + emoji, networkx, numpy, peft, protobuf, requests, - six, - toml, torch, tqdm, transformers, }: -buildPythonPackage rec { +buildPythonPackage (finalAttrs: { pname = "stanza"; version = "1.11.0"; - format = "setuptools"; + pyproject = true; src = fetchFromGitHub { owner = "stanfordnlp"; repo = "stanza"; - tag = "v${version}"; + tag = "v${finalAttrs.version}"; hash = "sha256-zY2+8QuPJTX/HSkE/gKMCWpSanKpYSGZeeYgb4eFuuw="; }; - propagatedBuildInputs = [ + build-system = [ setuptools ]; + + dependencies = [ emoji networkx numpy peft protobuf requests - six - toml torch tqdm transformers ]; - # Tests require network access + # Most tests require resources from the network (models). Many of the ones that do run are slow + # and some of them fail. + # + # Maintaining a list of "tests we can actually run in CI" isn't feasible, there are WAY too many + # exceptions and no useful pytest marks. doCheck = false; pythonImportsCheck = [ "stanza" ]; @@ -49,8 +54,8 @@ buildPythonPackage rec { meta = { description = "Official Stanford NLP Python Library for Many Human Languages"; homepage = "https://github.com/stanfordnlp/stanza/"; - changelog = "https://github.com/stanfordnlp/stanza/releases/tag/v${version}"; + changelog = "https://github.com/stanfordnlp/stanza/releases/tag/${finalAttrs.src.tag}"; license = lib.licenses.asl20; maintainers = with lib.maintainers; [ riotbib ]; }; -} +}) From 8b22469fef9ad413fcabb0edcaf06be4a5592c12 Mon Sep 17 00:00:00 2001 From: Steven Allen Date: Wed, 18 Feb 2026 08:38:55 -0800 Subject: [PATCH 2/2] python313Packages.stanza: add Stebalien as a co-maintainer --- pkgs/development/python-modules/stanza/default.nix | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pkgs/development/python-modules/stanza/default.nix b/pkgs/development/python-modules/stanza/default.nix index 37b375d3ae46..ecdcb30b062f 100644 --- a/pkgs/development/python-modules/stanza/default.nix +++ b/pkgs/development/python-modules/stanza/default.nix @@ -56,6 +56,9 @@ buildPythonPackage (finalAttrs: { homepage = "https://github.com/stanfordnlp/stanza/"; changelog = "https://github.com/stanfordnlp/stanza/releases/tag/${finalAttrs.src.tag}"; license = lib.licenses.asl20; - maintainers = with lib.maintainers; [ riotbib ]; + maintainers = with lib.maintainers; [ + riotbib + Stebalien + ]; }; })