From 25fedb005fc6f3f82eb42341ee6b44798600be64 Mon Sep 17 00:00:00 2001 From: Wolfgang Walther Date: Tue, 19 Aug 2025 12:47:11 +0000 Subject: [PATCH] Revert "python3Packages.buildPythonPackage: default enabledTestPaths = [ "." ]" --- doc/languages-frameworks/python.section.md | 1 - doc/release-notes/rl-2511.section.md | 6 ------ .../interpreters/python/mk-python-derivation.nix | 12 +----------- 3 files changed, 1 insertion(+), 18 deletions(-) diff --git a/doc/languages-frameworks/python.section.md b/doc/languages-frameworks/python.section.md index 30a53f5bb6d8b..23db76baad970 100644 --- a/doc/languages-frameworks/python.section.md +++ b/doc/languages-frameworks/python.section.md @@ -1285,7 +1285,6 @@ Adding `pytest` is not required, since it is included with `pytestCheckHook`. `enabledTestPaths` and `disabledTestPaths` : To specify path globs (files or directories) or test items. - `enabledTestPaths` defaults to `[ "." ]`. `enabledTests` and `disabledTests` diff --git a/doc/release-notes/rl-2511.section.md b/doc/release-notes/rl-2511.section.md index e89de944a221f..d481d20a06049 100644 --- a/doc/release-notes/rl-2511.section.md +++ b/doc/release-notes/rl-2511.section.md @@ -18,12 +18,6 @@ - The minimum version of Nix required to evaluate Nixpkgs has been raised from 2.3 to 2.18. -- `buildPythonPackage` and `buildPythonApplication` now set `enabledTestPaths = [ "." ]` by default if not specified otherwise, and require the specified value to be a non-empty list to simplify overriding. - - When running install-checks with `pytestCheckHook`, such default value resembles `pytest`'s default behaviour of discovering tests in the current working directory. - - To support both version of Nixpkgs before and after this change, set `enabledTestPaths = [ "." ]` manually for packages that don't need custom `enabledTestPaths` specification. - - The `offrss` package was removed due to lack of upstream maintenance since 2012. It's recommended for users to migrate to another RSS reader - `base16-builder` node package has been removed due to lack of upstream maintenance. diff --git a/pkgs/development/interpreters/python/mk-python-derivation.nix b/pkgs/development/interpreters/python/mk-python-derivation.nix index 4ae97d06b2767..9d392bfcb95ae 100644 --- a/pkgs/development/interpreters/python/mk-python-derivation.nix +++ b/pkgs/development/interpreters/python/mk-python-derivation.nix @@ -431,17 +431,6 @@ let # Longer-term we should get rid of `checkPhase` and use `installCheckPhase`. installCheckPhase = attrs.checkPhase; } - // { - # `pytest` defaults to discover tests in the current directory if no paths or test items are specified. - # Provide an explicit default value to simplify overriding. - enabledTestPaths = - if attrs ? enabledTestPaths then - lib.throwIf (!lib.isList attrs.enabledTestPaths || attrs.enabledTestPaths == [ ]) - "${lib.getName finalAttrs}: enabledTestPaths must be a non-empty list (default to [ \".\" ])." - attrs.enabledTestPaths - else - [ "." ]; - } // lib.mapAttrs ( @@ -453,6 +442,7 @@ let ( getOptionalAttrs [ "enabledTestMarks" + "enabledTestPaths" "enabledTests" ] attrs )