From 52ebd52fdf4d63488933955f12b60d14e6a3d7f2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Lima?= Date: Tue, 20 Oct 2026 18:49:57 +0100 Subject: [PATCH] python3Packages.deal: skip missing docstring-parser tests docstring-parser 0.18 no longer ships its tests in built wheels, so deal's test suite fails during collection when it tries to read docstring_parser/tests. Skip generating the cross-check cases when the directory is absent. Assisted-by: OpenCode 2 (DeepSeek V4.1 Flash Free) --- pkgs/development/python-modules/deal/default.nix | 5 +++++ .../skip-missing-docstring-parser-tests.patch | 16 ++++++++++++++++ 2 files changed, 21 insertions(+) create mode 100644 pkgs/development/python-modules/deal/skip-missing-docstring-parser-tests.patch diff --git a/pkgs/development/python-modules/deal/default.nix b/pkgs/development/python-modules/deal/default.nix index b9addc5c7d55..bc660a1567a9 100644 --- a/pkgs/development/python-modules/deal/default.nix +++ b/pkgs/development/python-modules/deal/default.nix @@ -30,6 +30,11 @@ buildPythonPackage rec { hash = "sha256-nLZ06Xfa9Q+Saf8qPXG1Xo6y6oO6kifhfK/gryZ6q90="; }; + patches = [ + # docstring-parser 0.18 no longer ships its tests, which this test reads. + ./skip-missing-docstring-parser-tests.patch + ]; + build-system = [ flit-core ]; dependencies = [ diff --git a/pkgs/development/python-modules/deal/skip-missing-docstring-parser-tests.patch b/pkgs/development/python-modules/deal/skip-missing-docstring-parser-tests.patch new file mode 100644 index 000000000000..501a100f95de --- /dev/null +++ b/pkgs/development/python-modules/deal/skip-missing-docstring-parser-tests.patch @@ -0,0 +1,16 @@ +docstring_parser 0.18 excludes its tests from built wheels, so +`docstring_parser.__path__[0] / 'tests'` does not exist and test +collection fails with FileNotFoundError. Skip generating the cross-check +test cases when the directory is unavailable. + +--- a/tests/test_linter/test_extractors/test_exceptions.py ++++ b/tests/test_linter/test_extractors/test_exceptions.py +@@ -293,6 +293,8 @@ def get_docstring_parser_tests(): + tests_found = 0 + if astroid is None: + return ++ if not root.is_dir(): ++ return + for path in root.iterdir(): + if path.suffix != '.py': + continue