From 74ad9649fce5b01a7363d4a286486013a143fd27 Mon Sep 17 00:00:00 2001 From: Peder Bergebakken Sundt Date: Mon, 9 Jun 2025 00:07:27 +0200 Subject: [PATCH 01/35] treewide: don't propagate pytest-cov-stubs in optional-dependencies --- pkgs/development/python-modules/haystack-ai/default.nix | 4 ++-- pkgs/development/python-modules/pyscaffold/default.nix | 4 ++-- .../python-modules/pyscaffoldext-cookiecutter/default.nix | 4 ++-- .../python-modules/pyscaffoldext-custom-extension/default.nix | 4 ++-- .../python-modules/pyscaffoldext-django/default.nix | 4 ++-- .../python-modules/pyscaffoldext-dsproject/default.nix | 4 ++-- .../python-modules/pyscaffoldext-markdown/default.nix | 4 ++-- .../python-modules/pyscaffoldext-travis/default.nix | 4 ++-- 8 files changed, 16 insertions(+), 16 deletions(-) diff --git a/pkgs/development/python-modules/haystack-ai/default.nix b/pkgs/development/python-modules/haystack-ai/default.nix index 2c367cc70cb1..dec9d6684d27 100644 --- a/pkgs/development/python-modules/haystack-ai/default.nix +++ b/pkgs/development/python-modules/haystack-ai/default.nix @@ -42,7 +42,7 @@ pylint, pytest, pytest-asyncio, - pytest-cov-stub, + pytest-cov, # , pytest-custom-exit-code python-multipart, reno, @@ -167,7 +167,7 @@ buildPythonPackage rec { pylint pytest pytest-asyncio - pytest-cov-stub + pytest-cov # pytest-custom-exit-code python-multipart reno diff --git a/pkgs/development/python-modules/pyscaffold/default.nix b/pkgs/development/python-modules/pyscaffold/default.nix index 5a0b13086071..127ca5bb96c2 100644 --- a/pkgs/development/python-modules/pyscaffold/default.nix +++ b/pkgs/development/python-modules/pyscaffold/default.nix @@ -23,7 +23,7 @@ certifi, flake8, pytest, - pytest-cov-stub, + pytest-cov, pytest-randomly, pytest-xdist, sphinx, @@ -80,7 +80,7 @@ buildPythonPackage rec { flake8 pre-commit pytest - pytest-cov-stub + pytest-cov pytest-randomly pytest-xdist setuptools diff --git a/pkgs/development/python-modules/pyscaffoldext-cookiecutter/default.nix b/pkgs/development/python-modules/pyscaffoldext-cookiecutter/default.nix index d5ba7c9b6d82..a34bf93334e9 100644 --- a/pkgs/development/python-modules/pyscaffoldext-cookiecutter/default.nix +++ b/pkgs/development/python-modules/pyscaffoldext-cookiecutter/default.nix @@ -11,7 +11,7 @@ configupdater, pre-commit, pytest, - pytest-cov-stub, + pytest-cov, pytest-xdist, tox, virtualenv, @@ -44,7 +44,7 @@ buildPythonPackage rec { configupdater pre-commit pytest - pytest-cov-stub + pytest-cov pytest-xdist setuptools-scm tox diff --git a/pkgs/development/python-modules/pyscaffoldext-custom-extension/default.nix b/pkgs/development/python-modules/pyscaffoldext-custom-extension/default.nix index 0ee14743b5e9..ee4bc3aa728b 100644 --- a/pkgs/development/python-modules/pyscaffoldext-custom-extension/default.nix +++ b/pkgs/development/python-modules/pyscaffoldext-custom-extension/default.nix @@ -11,7 +11,7 @@ pyscaffold, pre-commit, pytest, - pytest-cov-stub, + pytest-cov, pytest-xdist, tox, virtualenv, @@ -45,7 +45,7 @@ buildPythonPackage rec { configupdater pre-commit pytest - pytest-cov-stub + pytest-cov pytest-xdist setuptools-scm tox diff --git a/pkgs/development/python-modules/pyscaffoldext-django/default.nix b/pkgs/development/python-modules/pyscaffoldext-django/default.nix index 6270dbc2d1d5..e0e9ca4cf69f 100644 --- a/pkgs/development/python-modules/pyscaffoldext-django/default.nix +++ b/pkgs/development/python-modules/pyscaffoldext-django/default.nix @@ -10,7 +10,7 @@ configupdater, pre-commit, pytest, - pytest-cov-stub, + pytest-cov, pytest-xdist, tox, virtualenv, @@ -42,7 +42,7 @@ buildPythonPackage rec { configupdater pre-commit pytest - pytest-cov-stub + pytest-cov pytest-xdist setuptools-scm tox diff --git a/pkgs/development/python-modules/pyscaffoldext-dsproject/default.nix b/pkgs/development/python-modules/pyscaffoldext-dsproject/default.nix index cc70d4098ab8..9763ba8ace95 100644 --- a/pkgs/development/python-modules/pyscaffoldext-dsproject/default.nix +++ b/pkgs/development/python-modules/pyscaffoldext-dsproject/default.nix @@ -11,7 +11,7 @@ configupdater, pre-commit, pytest, - pytest-cov-stub, + pytest-cov, pytest-xdist, tox, virtualenv, @@ -44,7 +44,7 @@ buildPythonPackage rec { configupdater pre-commit pytest - pytest-cov-stub + pytest-cov pytest-xdist setuptools-scm tox diff --git a/pkgs/development/python-modules/pyscaffoldext-markdown/default.nix b/pkgs/development/python-modules/pyscaffoldext-markdown/default.nix index d84320a77a95..4d6157ed4d99 100644 --- a/pkgs/development/python-modules/pyscaffoldext-markdown/default.nix +++ b/pkgs/development/python-modules/pyscaffoldext-markdown/default.nix @@ -11,7 +11,7 @@ configupdater, pre-commit, pytest, - pytest-cov-stub, + pytest-cov, pytest-xdist, tox, twine, @@ -46,7 +46,7 @@ buildPythonPackage rec { configupdater pre-commit pytest - pytest-cov-stub + pytest-cov pytest-xdist setuptools-scm tox diff --git a/pkgs/development/python-modules/pyscaffoldext-travis/default.nix b/pkgs/development/python-modules/pyscaffoldext-travis/default.nix index 4eeaafd14c22..6c08f6c23adc 100644 --- a/pkgs/development/python-modules/pyscaffoldext-travis/default.nix +++ b/pkgs/development/python-modules/pyscaffoldext-travis/default.nix @@ -10,7 +10,7 @@ configupdater, pre-commit, pytest, - pytest-cov-stub, + pytest-cov, pytest-xdist, tox, virtualenv, @@ -42,7 +42,7 @@ buildPythonPackage rec { configupdater pre-commit pytest - pytest-cov-stub + pytest-cov pytest-xdist setuptools-scm tox From 8505306a1b0f990b8c91279684ac46416a5d9acc Mon Sep 17 00:00:00 2001 From: Peder Bergebakken Sundt Date: Mon, 9 Jun 2025 00:24:39 +0200 Subject: [PATCH 02/35] python3Packages.plaster: add meta --- pkgs/development/python-modules/plaster/default.nix | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/pkgs/development/python-modules/plaster/default.nix b/pkgs/development/python-modules/plaster/default.nix index 0651404dc477..6806da56f47f 100644 --- a/pkgs/development/python-modules/plaster/default.nix +++ b/pkgs/development/python-modules/plaster/default.nix @@ -1,4 +1,5 @@ { + lib, buildPythonPackage, fetchPypi, pytest, @@ -23,4 +24,11 @@ buildPythonPackage rec { pytest pytest-cov-stub ]; + + meta = { + description = "Loader interface around multiple config file formats"; + homepage = "https://pypi.org/project/plaster/"; + license = lib.licenses.mit; + maintainers = with lib.maintainers; [ ]; + }; } From 6b6b55ba455509de08ecafa25806a2d94f1e245e Mon Sep 17 00:00:00 2001 From: Peder Bergebakken Sundt Date: Mon, 9 Jun 2025 01:34:24 +0200 Subject: [PATCH 03/35] gitfs: mark broken --- pkgs/by-name/gi/gitfs/package.nix | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/pkgs/by-name/gi/gitfs/package.nix b/pkgs/by-name/gi/gitfs/package.nix index 3b9cf7cfe17b..94c4b3868edd 100644 --- a/pkgs/by-name/gi/gitfs/package.nix +++ b/pkgs/by-name/gi/gitfs/package.nix @@ -27,8 +27,8 @@ python3Packages.buildPythonApplication rec { ''; nativeCheckInputs = with python3Packages; [ - pytest - pytest-cov + pytestCheckHook + pytest-cov-stub mock ]; propagatedBuildInputs = with python3Packages; [ @@ -38,8 +38,7 @@ python3Packages.buildPythonApplication rec { six ]; - checkPhase = "py.test"; - doCheck = false; + pythonImportsCheck = [ "gitfs" ]; meta = { description = "FUSE filesystem that fully integrates with git"; @@ -53,5 +52,8 @@ python3Packages.buildPythonApplication rec { platforms = lib.platforms.unix; maintainers = [ lib.maintainers.robbinch ]; mainProgram = "gitfs"; + # requires <=python39, otherwise you get this at runtime: + # AttributeError: module 'collections' has no attribute 'MutableMapping' + broken = true; }; } From a1e8ff4350cbc08f5b96d7ce241198d2543dc396 Mon Sep 17 00:00:00 2001 From: Peder Bergebakken Sundt Date: Mon, 9 Jun 2025 02:36:02 +0200 Subject: [PATCH 04/35] vim-vint: run tests --- pkgs/by-name/vi/vim-vint/package.nix | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/pkgs/by-name/vi/vim-vint/package.nix b/pkgs/by-name/vi/vim-vint/package.nix index 52edbdf0d289..68ceeffa4d82 100644 --- a/pkgs/by-name/vi/vim-vint/package.nix +++ b/pkgs/by-name/vi/vim-vint/package.nix @@ -1,7 +1,7 @@ { lib, python3Packages, - fetchPypi, + fetchFromGitHub, }: with python3Packages; @@ -10,17 +10,19 @@ buildPythonApplication rec { pname = "vim-vint"; version = "0.3.21"; - src = fetchPypi { - inherit pname version; - sha256 = "15qdh8fby9xgfjxidcfv1xmrqqrxxapky7zmyn46qx1abhp9piax"; + src = fetchFromGitHub { + owner = "Vimjas"; + repo = "vint"; + tag = "v${version}"; + hash = "sha256-A0yXDkB/b9kEEXSoLeqVdmdm4p2PYL2QHqbF4FgAn30="; }; # For python 3.5 > version > 2.7 , a nested dependency (pythonPackages.hypothesis) fails. disabled = !pythonAtLeast "3.5"; nativeCheckInputs = [ - pytest - pytest-cov + pytestCheckHook + pytest-cov-stub ]; propagatedBuildInputs = [ ansicolor @@ -29,10 +31,13 @@ buildPythonApplication rec { setuptools ]; - # Unpin test dependency versions. This is fixed in master but not yet released. preCheck = '' - sed -i 's/==.*//g' test-requirements.txt - sed -i 's/mock == 1.0.1/mock/g' setup.py + substituteInPlace \ + test/acceptance/test_cli.py \ + test/acceptance/test_cli_vital.py \ + --replace-fail \ + "cmd = ['bin/vint'" \ + "cmd = ['$out/bin/vint'" ''; meta = with lib; { From 6628c1a32c18781b254ede6cf26096a2a5efbea3 Mon Sep 17 00:00:00 2001 From: Peder Bergebakken Sundt Date: Mon, 9 Jun 2025 03:30:03 +0200 Subject: [PATCH 05/35] beetsPackages.beets-minimal: use pytest-cov-stub --- pkgs/tools/audio/beets/common.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/tools/audio/beets/common.nix b/pkgs/tools/audio/beets/common.nix index c914a44ef616..e12817b0cc7c 100644 --- a/pkgs/tools/audio/beets/common.nix +++ b/pkgs/tools/audio/beets/common.nix @@ -145,7 +145,7 @@ python3Packages.buildPythonApplication { with python3Packages; [ pytestCheckHook - pytest-cov + pytest-cov-stub mock rarfile responses From cda0eac09004dcbaba8e61e1e48a1ab674b0e431 Mon Sep 17 00:00:00 2001 From: Peder Bergebakken Sundt Date: Mon, 9 Jun 2025 03:30:04 +0200 Subject: [PATCH 06/35] bepasty: use pytest-cov-stub --- pkgs/by-name/be/bepasty/package.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/by-name/be/bepasty/package.nix b/pkgs/by-name/be/bepasty/package.nix index 51309a35da9b..4c7c92a84d8d 100644 --- a/pkgs/by-name/be/bepasty/package.nix +++ b/pkgs/by-name/be/bepasty/package.nix @@ -57,7 +57,7 @@ bepastyPython.pkgs.buildPythonPackage rec { build flake8 pytestCheckHook - pytest-cov + pytest-cov-stub selenium tox twine From 73b6fbda9499f44a68b3525d520bbb595e59b311 Mon Sep 17 00:00:00 2001 From: Peder Bergebakken Sundt Date: Mon, 9 Jun 2025 03:30:05 +0200 Subject: [PATCH 07/35] buku: use pytest-cov-stub --- pkgs/by-name/bu/buku/package.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/by-name/bu/buku/package.nix b/pkgs/by-name/bu/buku/package.nix index edf76eadacc1..ee862b474df0 100644 --- a/pkgs/by-name/bu/buku/package.nix +++ b/pkgs/by-name/bu/buku/package.nix @@ -40,14 +40,14 @@ buildPythonApplication rec { nativeCheckInputs = [ hypothesis - pytest + pytestCheckHook pytest-recording pyyaml mypy-extensions click pylint flake8 - pytest-cov + pytest-cov-stub pyyaml ]; From 30bfebf89c5cbfe4c32c922fbe79f9a5d83fda16 Mon Sep 17 00:00:00 2001 From: Peder Bergebakken Sundt Date: Mon, 9 Jun 2025 03:30:07 +0200 Subject: [PATCH 08/35] canaille: use pytest-cov-stub --- pkgs/by-name/ca/canaille/package.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/by-name/ca/canaille/package.nix b/pkgs/by-name/ca/canaille/package.nix index d53f3648d64e..5c2d23b62323 100644 --- a/pkgs/by-name/ca/canaille/package.nix +++ b/pkgs/by-name/ca/canaille/package.nix @@ -58,7 +58,7 @@ python.pkgs.buildPythonApplication rec { coverage flask-webtest pyquery - pytest-cov + pytest-cov-stub pytest-httpserver pytest-lazy-fixtures pytest-smtpd From dd1c3cabf5655f3e0aaa6014cc2e2dca112fa0b2 Mon Sep 17 00:00:00 2001 From: Peder Bergebakken Sundt Date: Mon, 9 Jun 2025 03:30:07 +0200 Subject: [PATCH 09/35] cloudsmith-cli: use pytest-cov-stub --- pkgs/by-name/cl/cloudsmith-cli/package.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/by-name/cl/cloudsmith-cli/package.nix b/pkgs/by-name/cl/cloudsmith-cli/package.nix index 130676bcc1dc..093ace78d56e 100644 --- a/pkgs/by-name/cl/cloudsmith-cli/package.nix +++ b/pkgs/by-name/cl/cloudsmith-cli/package.nix @@ -51,7 +51,7 @@ python3.pkgs.buildPythonApplication rec { nativeCheckInputs = with python3.pkgs; [ pytestCheckHook - pytest-cov + pytest-cov-stub ]; checkInputs = with python3.pkgs; [ From ca8a4e4d0e6b345480d7e046e152ea6a0bd8808a Mon Sep 17 00:00:00 2001 From: Peder Bergebakken Sundt Date: Mon, 9 Jun 2025 03:30:07 +0200 Subject: [PATCH 10/35] deluge-2_x: use pytest-cov-stub --- pkgs/applications/networking/p2p/deluge/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/applications/networking/p2p/deluge/default.nix b/pkgs/applications/networking/p2p/deluge/default.nix index 9472c7b0aa0e..668bd4298d66 100644 --- a/pkgs/applications/networking/p2p/deluge/default.nix +++ b/pkgs/applications/networking/p2p/deluge/default.nix @@ -68,7 +68,7 @@ let nativeCheckInputs = with pypkgs; [ pytestCheckHook pytest-twisted - pytest-cov + pytest-cov-stub mock mccabe pylint From 9a25afa6b84fa5adc55851f9827cc5aa320ca015 Mon Sep 17 00:00:00 2001 From: Peder Bergebakken Sundt Date: Mon, 9 Jun 2025 03:30:08 +0200 Subject: [PATCH 11/35] isso: use pytest-cov-stub --- pkgs/servers/isso/default.nix | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/pkgs/servers/isso/default.nix b/pkgs/servers/isso/default.nix index 7428d2d6cbba..26bec1355f12 100644 --- a/pkgs/servers/isso/default.nix +++ b/pkgs/servers/isso/default.nix @@ -66,14 +66,10 @@ buildPythonApplication rec { ''; nativeCheckInputs = [ - pytest - pytest-cov + pytestCheckHook + pytest-cov-stub ]; - checkPhase = '' - pytest - ''; - passthru.tests = { inherit (nixosTests) isso; }; meta = with lib; { From 2de6b3d32125bf1b9cc33fb2e11696749854d893 Mon Sep 17 00:00:00 2001 From: Peder Bergebakken Sundt Date: Mon, 9 Jun 2025 03:30:09 +0200 Subject: [PATCH 12/35] logitech-udev-rules: use pytest-cov-stub --- pkgs/by-name/so/solaar/package.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/by-name/so/solaar/package.nix b/pkgs/by-name/so/solaar/package.nix index 7a52a9c948a7..ef99ad21ccee 100644 --- a/pkgs/by-name/so/solaar/package.nix +++ b/pkgs/by-name/so/solaar/package.nix @@ -56,7 +56,7 @@ python3Packages.buildPythonApplication rec { nativeCheckInputs = with python3Packages; [ pytestCheckHook pytest-mock - pytest-cov + pytest-cov-stub ]; # the -cli symlink is just to maintain compabilility with older versions where From dd87f60df1b588b663866e9f177c56ad67e89caa Mon Sep 17 00:00:00 2001 From: Peder Bergebakken Sundt Date: Mon, 9 Jun 2025 03:30:09 +0200 Subject: [PATCH 13/35] memray: use pytest-cov-stub --- pkgs/by-name/me/memray/package.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/by-name/me/memray/package.nix b/pkgs/by-name/me/memray/package.nix index b2a1bc80d454..09140b5e9bc2 100644 --- a/pkgs/by-name/me/memray/package.nix +++ b/pkgs/by-name/me/memray/package.nix @@ -44,7 +44,7 @@ python3Packages.buildPythonApplication rec { with python3Packages; [ ipython - pytest-cov # fix Unknown pytest.mark.no_cover + pytest-cov-stub # fix Unknown pytest.mark.no_cover pytest-textual-snapshot pytestCheckHook ] From 4c39334767d028f2b2c37b7047409dfadc272b14 Mon Sep 17 00:00:00 2001 From: Peder Bergebakken Sundt Date: Mon, 9 Jun 2025 03:30:10 +0200 Subject: [PATCH 14/35] patroni: use pytest-cov-stub --- pkgs/by-name/pa/patroni/package.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/by-name/pa/patroni/package.nix b/pkgs/by-name/pa/patroni/package.nix index c57cafd1f9c1..8f6b3ff4d935 100644 --- a/pkgs/by-name/pa/patroni/package.nix +++ b/pkgs/by-name/pa/patroni/package.nix @@ -44,7 +44,7 @@ python3Packages.buildPythonApplication rec { flake8 mock pytestCheckHook - pytest-cov + pytest-cov-stub requests versionCheckHook writableTmpDirAsHomeHook From 793a1ad3b9a9b0c4bea74c61c5ada38d97de5d4d Mon Sep 17 00:00:00 2001 From: Peder Bergebakken Sundt Date: Mon, 9 Jun 2025 03:30:10 +0200 Subject: [PATCH 15/35] python3Packages.colcon-mixin: use pytest-cov-stub --- pkgs/development/python-modules/colcon-mixin/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/colcon-mixin/default.nix b/pkgs/development/python-modules/colcon-mixin/default.nix index b2821cda8e44..d5a7b7bdb4f0 100644 --- a/pkgs/development/python-modules/colcon-mixin/default.nix +++ b/pkgs/development/python-modules/colcon-mixin/default.nix @@ -3,7 +3,7 @@ buildPythonPackage, fetchFromGitHub, colcon, - pytest-cov, + pytest-cov-stub, pytestCheckHook, setuptools, scspell, @@ -29,7 +29,7 @@ buildPythonPackage rec { ]; nativeCheckInputs = [ - pytest-cov + pytest-cov-stub pytestCheckHook scspell writableTmpDirAsHomeHook From d8cf868ed5d31e0eeed6fe7541cf423e8797d4d4 Mon Sep 17 00:00:00 2001 From: Peder Bergebakken Sundt Date: Mon, 9 Jun 2025 03:30:11 +0200 Subject: [PATCH 16/35] python3Packages.colcon-ros-domain-id-coordinator: use pytest-cov-stub --- .../colcon-ros-domain-id-coordinator/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/colcon-ros-domain-id-coordinator/default.nix b/pkgs/development/python-modules/colcon-ros-domain-id-coordinator/default.nix index cf3c58ee1142..84650e2d6352 100644 --- a/pkgs/development/python-modules/colcon-ros-domain-id-coordinator/default.nix +++ b/pkgs/development/python-modules/colcon-ros-domain-id-coordinator/default.nix @@ -4,7 +4,7 @@ colcon, fetchFromGitHub, pytestCheckHook, - pytest-cov, + pytest-cov-stub, pytest-repeat, pytest-rerunfailures, scspell, @@ -30,7 +30,7 @@ buildPythonPackage { nativeCheckInputs = [ pytestCheckHook - pytest-cov + pytest-cov-stub pytest-repeat pytest-rerunfailures scspell From c275c5bf0785b3fde3ab7020b83794311d8d0e4e Mon Sep 17 00:00:00 2001 From: Peder Bergebakken Sundt Date: Mon, 9 Jun 2025 03:30:12 +0200 Subject: [PATCH 17/35] python3Packages.deltalake: use pytest-cov-stub --- pkgs/development/python-modules/deltalake/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/deltalake/default.nix b/pkgs/development/python-modules/deltalake/default.nix index 93b592d465d4..208b8ecf5f38 100644 --- a/pkgs/development/python-modules/deltalake/default.nix +++ b/pkgs/development/python-modules/deltalake/default.nix @@ -11,7 +11,7 @@ pkg-config, pytestCheckHook, pytest-benchmark, - pytest-cov, + pytest-cov-stub, pytest-mock, pandas, azure-storage-blob, @@ -62,7 +62,7 @@ buildPythonPackage rec { pytestCheckHook pandas pytest-benchmark - pytest-cov + pytest-cov-stub pytest-mock azure-storage-blob ]; From d12fe2ec5b67fee11d776bc540985ad9d96ddf38 Mon Sep 17 00:00:00 2001 From: Peder Bergebakken Sundt Date: Mon, 9 Jun 2025 03:30:12 +0200 Subject: [PATCH 18/35] python3Packages.dramatiq-abort: use pytest-cov-stub --- pkgs/development/python-modules/dramatiq-abort/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/dramatiq-abort/default.nix b/pkgs/development/python-modules/dramatiq-abort/default.nix index 165a209f21ee..b4130f701bfe 100644 --- a/pkgs/development/python-modules/dramatiq-abort/default.nix +++ b/pkgs/development/python-modules/dramatiq-abort/default.nix @@ -4,7 +4,7 @@ fetchFromGitHub, gevent, pytestCheckHook, - pytest-cov, + pytest-cov-stub, dramatiq, redis, setuptools, @@ -37,7 +37,7 @@ buildPythonPackage rec { nativeCheckInputs = [ redis pytestCheckHook - pytest-cov + pytest-cov-stub ]; pythonImportsCheck = [ "dramatiq_abort" ]; From d8952d444c0cd0c34c6209f797959a076ecc0567 Mon Sep 17 00:00:00 2001 From: Peder Bergebakken Sundt Date: Mon, 9 Jun 2025 03:30:12 +0200 Subject: [PATCH 19/35] python3Packages.langchain-perplexity: use pytest-cov-stub --- .../python-modules/langchain-perplexity/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/langchain-perplexity/default.nix b/pkgs/development/python-modules/langchain-perplexity/default.nix index 22d471f80f47..acc783d3b46b 100644 --- a/pkgs/development/python-modules/langchain-perplexity/default.nix +++ b/pkgs/development/python-modules/langchain-perplexity/default.nix @@ -13,7 +13,7 @@ # tests langchain-tests, pytest-asyncio, - pytest-cov, + pytest-cov-stub, pytest-mock, pytestCheckHook, @@ -51,7 +51,7 @@ buildPythonPackage rec { nativeCheckInputs = [ langchain-tests pytest-asyncio - pytest-cov + pytest-cov-stub pytest-mock pytestCheckHook ]; From 0351ce0840271c410f16ebbbb95f7693c8aea2d2 Mon Sep 17 00:00:00 2001 From: Peder Bergebakken Sundt Date: Mon, 9 Jun 2025 03:30:13 +0200 Subject: [PATCH 20/35] python3Packages.nonbloat-db: use pytest-cov-stub --- pkgs/development/python-modules/nonbloat-db/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/nonbloat-db/default.nix b/pkgs/development/python-modules/nonbloat-db/default.nix index 7e3d3f9a70d2..b87e03a9604c 100644 --- a/pkgs/development/python-modules/nonbloat-db/default.nix +++ b/pkgs/development/python-modules/nonbloat-db/default.nix @@ -14,7 +14,7 @@ # tests pytestCheckHook, pytest-asyncio, - pytest-cov, + pytest-cov-stub, pytest-mock, pytest-randomly, faker, @@ -45,7 +45,7 @@ buildPythonPackage rec { nativeCheckInputs = [ pytestCheckHook pytest-asyncio - pytest-cov + pytest-cov-stub pytest-mock pytest-randomly faker From 6e151afe62d6f19d05339ed60118a3c0f2a0df49 Mon Sep 17 00:00:00 2001 From: Peder Bergebakken Sundt Date: Mon, 9 Jun 2025 03:30:13 +0200 Subject: [PATCH 21/35] python3Packages.pdfplumber: use pytest-cov-stub --- pkgs/development/python-modules/pdfplumber/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/pdfplumber/default.nix b/pkgs/development/python-modules/pdfplumber/default.nix index 6a8b080339cf..876324a0c03c 100644 --- a/pkgs/development/python-modules/pdfplumber/default.nix +++ b/pkgs/development/python-modules/pdfplumber/default.nix @@ -11,7 +11,7 @@ pdfminer-six, pillow, pypdfium2, - pytest-cov, + pytest-cov-stub, pytest-parallel, pytestCheckHook, types-pillow, @@ -44,7 +44,7 @@ buildPythonPackage rec { nbexec pandas pandas-stubs - pytest-cov + pytest-cov-stub pytest-parallel pytestCheckHook types-pillow From 0e2dc8729c838bd430e5918622b62cd7c2361ab6 Mon Sep 17 00:00:00 2001 From: Peder Bergebakken Sundt Date: Mon, 9 Jun 2025 03:30:14 +0200 Subject: [PATCH 22/35] python3Packages.polars: use pytest-cov-stub --- pkgs/development/python-modules/polars/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/polars/default.nix b/pkgs/development/python-modules/polars/default.nix index 5e82dbcf1641..5540b5a12dd3 100644 --- a/pkgs/development/python-modules/polars/default.nix +++ b/pkgs/development/python-modules/polars/default.nix @@ -9,7 +9,7 @@ pkgs, # zstd hidden by python3Packages.zstd pytestCheckHook, pytest-codspeed ? null, # Not in Nixpkgs - pytest-cov, + pytest-cov-stub, pytest-xdist, pytest-benchmark, rustc, @@ -229,7 +229,7 @@ buildPythonPackage rec { nativeCheckInputs = [ pytestCheckHook pytest-codspeed - pytest-cov + pytest-cov-stub pytest-xdist pytest-benchmark ]; From dfa6390ebe6c6981a0717ab1da661bb93bfd9ff0 Mon Sep 17 00:00:00 2001 From: Peder Bergebakken Sundt Date: Mon, 9 Jun 2025 03:30:14 +0200 Subject: [PATCH 23/35] python3Packages.sklearn-compat: use pytest-cov-stub --- pkgs/development/python-modules/sklearn-compat/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/sklearn-compat/default.nix b/pkgs/development/python-modules/sklearn-compat/default.nix index 3fd17c6cade4..e4bdc1a2d85f 100644 --- a/pkgs/development/python-modules/sklearn-compat/default.nix +++ b/pkgs/development/python-modules/sklearn-compat/default.nix @@ -6,7 +6,7 @@ scikit-learn, pandas, pytestCheckHook, - pytest-cov, + pytest-cov-stub, pytest-xdist, pytz, }: @@ -34,7 +34,7 @@ buildPythonPackage rec { nativeCheckInputs = [ pandas pytestCheckHook - pytest-cov + pytest-cov-stub pytest-xdist pytz ]; From d8cf0fac792596a2f289bb8fc4771d8a85c1a93c Mon Sep 17 00:00:00 2001 From: Peder Bergebakken Sundt Date: Mon, 9 Jun 2025 03:30:15 +0200 Subject: [PATCH 24/35] rexi: use pytest-cov-stub --- pkgs/by-name/re/rexi/package.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/by-name/re/rexi/package.nix b/pkgs/by-name/re/rexi/package.nix index cee0aaf7a501..b8feee0ad67b 100644 --- a/pkgs/by-name/re/rexi/package.nix +++ b/pkgs/by-name/re/rexi/package.nix @@ -27,9 +27,9 @@ python3Packages.buildPythonApplication rec { ]; nativeCheckInputs = with python3Packages; [ - pytest + pytestCheckHook pytest-asyncio - pytest-cov + pytest-cov-stub ]; pythonRelaxDeps = [ From 3cfc189c30f193f4f4c301dcd683b40405093326 Mon Sep 17 00:00:00 2001 From: Peder Bergebakken Sundt Date: Mon, 9 Jun 2025 03:30:16 +0200 Subject: [PATCH 25/35] vulnix: use pytest-cov-stub --- pkgs/by-name/vu/vulnix/package.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/by-name/vu/vulnix/package.nix b/pkgs/by-name/vu/vulnix/package.nix index 7ce9413457d8..a31a513a6402 100644 --- a/pkgs/by-name/vu/vulnix/package.nix +++ b/pkgs/by-name/vu/vulnix/package.nix @@ -28,8 +28,8 @@ python3Packages.buildPythonApplication rec { nativeCheckInputs = with python3Packages; [ freezegun - pytest - pytest-cov + pytestCheckHook + pytest-cov-stub ]; propagatedBuildInputs = @@ -48,7 +48,7 @@ python3Packages.buildPythonApplication rec { postBuild = "make -C doc"; - checkPhase = "py.test src/vulnix"; + pytestFlagsArray = [ "src/vulnix" ]; postInstall = '' install -D -t $doc/share/doc/vulnix README.rst CHANGES.rst From a159df709e556b695cfa9dda3c64aefb3a57c282 Mon Sep 17 00:00:00 2001 From: Peder Bergebakken Sundt Date: Mon, 9 Jun 2025 03:30:16 +0200 Subject: [PATCH 26/35] zulip-term: use pytest-cov-stub --- pkgs/by-name/zu/zulip-term/package.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/by-name/zu/zulip-term/package.nix b/pkgs/by-name/zu/zulip-term/package.nix index d8e3da694844..3ce923be7dba 100644 --- a/pkgs/by-name/zu/zulip-term/package.nix +++ b/pkgs/by-name/zu/zulip-term/package.nix @@ -67,7 +67,7 @@ buildPythonApplication rec { ] ++ (with python3.pkgs; [ pytestCheckHook - pytest-cov + pytest-cov-stub pytest-mock ]); From c323018cca75d4db1b77d521656bd71cd03b2204 Mon Sep 17 00:00:00 2001 From: Peder Bergebakken Sundt Date: Mon, 9 Jun 2025 03:32:33 +0200 Subject: [PATCH 27/35] python3Packages.sanic-ext: use pytest-cov-stub --- pkgs/development/python-modules/sanic-ext/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/sanic-ext/default.nix b/pkgs/development/python-modules/sanic-ext/default.nix index 581b44962816..17c33e3563fa 100644 --- a/pkgs/development/python-modules/sanic-ext/default.nix +++ b/pkgs/development/python-modules/sanic-ext/default.nix @@ -18,7 +18,7 @@ msgspec, pydantic, pytest, - pytest-cov, + pytest-cov-stub, pytest-asyncio, tox, jinja2, @@ -51,7 +51,7 @@ buildPythonPackage rec { msgspec pydantic pytest - pytest-cov + pytest-cov-stub pytest-asyncio tox jinja2 From 96af723a9bd2a23fe5d05c31e23d58971d2b3f15 Mon Sep 17 00:00:00 2001 From: Peder Bergebakken Sundt Date: Mon, 9 Jun 2025 03:33:02 +0200 Subject: [PATCH 28/35] unblob: add not about how pytest-cov-stub cannot be used --- pkgs/by-name/un/unblob/package.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/by-name/un/unblob/package.nix b/pkgs/by-name/un/unblob/package.nix index f6228fdcedf6..c5393e37f379 100644 --- a/pkgs/by-name/un/unblob/package.nix +++ b/pkgs/by-name/un/unblob/package.nix @@ -116,7 +116,7 @@ python3.pkgs.buildPythonApplication rec { with python3.pkgs; [ pytestCheckHook - pytest-cov + pytest-cov # cannot use stub versionCheckHook ] ++ runtimeDeps; From 2fc4d7557713d1070c080396795a260235e7afaa Mon Sep 17 00:00:00 2001 From: Peder Bergebakken Sundt Date: Mon, 9 Jun 2025 03:33:25 +0200 Subject: [PATCH 29/35] python3Packages.pygerber: remove pytest-cov --- pkgs/development/python-modules/pygerber/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/pygerber/default.nix b/pkgs/development/python-modules/pygerber/default.nix index 79017768fd90..cd5c62f8dc9f 100644 --- a/pkgs/development/python-modules/pygerber/default.nix +++ b/pkgs/development/python-modules/pygerber/default.nix @@ -26,7 +26,6 @@ dulwich, tzlocal, pytest-xdist, - pytest-cov, pytest-lsp, pytest-asyncio, pytest-mock, @@ -77,7 +76,6 @@ buildPythonPackage rec { nativeCheckInputs = [ pytest-asyncio - pytest-cov pytest-xdist pytest-lsp pytest-mock @@ -94,6 +92,8 @@ buildPythonPackage rec { "test/gerberx3/test_language_server/tests.py" ]; + pytestFlagsArray = [ "--override-ini required_plugins=''" ]; + pythonImportsCheck = [ "pygerber" ]; meta = { From c2764e1bc7cea11bb9a9f2be992a294461854b59 Mon Sep 17 00:00:00 2001 From: Peder Bergebakken Sundt Date: Mon, 9 Jun 2025 03:33:54 +0200 Subject: [PATCH 30/35] fastcov: use pytestCheckHook --- pkgs/by-name/fa/fastcov/package.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/by-name/fa/fastcov/package.nix b/pkgs/by-name/fa/fastcov/package.nix index a118d28f7128..861199298db3 100644 --- a/pkgs/by-name/fa/fastcov/package.nix +++ b/pkgs/by-name/fa/fastcov/package.nix @@ -32,7 +32,7 @@ python3Packages.buildPythonPackage rec { dontUseCmakeConfigure = true; # cmake is used for testing nativeCheckInputs = with python3Packages; [ - pytest + pytestCheckHook pytest-cov-stub ]; From 6965e7034ade4706c6827df1317d4b6ad5d078c2 Mon Sep 17 00:00:00 2001 From: Peder Bergebakken Sundt Date: Mon, 9 Jun 2025 03:33:54 +0200 Subject: [PATCH 31/35] git-pw: use pytestCheckHook --- pkgs/by-name/gi/git-pw/package.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/by-name/gi/git-pw/package.nix b/pkgs/by-name/gi/git-pw/package.nix index cf9bce02d574..083bea01547c 100644 --- a/pkgs/by-name/gi/git-pw/package.nix +++ b/pkgs/by-name/gi/git-pw/package.nix @@ -36,7 +36,7 @@ python3.pkgs.buildPythonApplication rec { nativeCheckInputs = with python3.pkgs; [ pytest-cov-stub - pytest + pytestCheckHook git ]; From 871317d00bfbd6a5145d4eb23c92bf3b08e1aff3 Mon Sep 17 00:00:00 2001 From: Peder Bergebakken Sundt Date: Mon, 9 Jun 2025 03:33:55 +0200 Subject: [PATCH 32/35] python3Packages.iocapture: use pytestCheckHook --- pkgs/development/python-modules/iocapture/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/iocapture/default.nix b/pkgs/development/python-modules/iocapture/default.nix index 0e44cad6916b..715abd657b56 100644 --- a/pkgs/development/python-modules/iocapture/default.nix +++ b/pkgs/development/python-modules/iocapture/default.nix @@ -3,7 +3,7 @@ buildPythonPackage, fetchPypi, flexmock, - pytest, + pytestCheckHook, pytest-cov-stub, six, }: @@ -20,7 +20,7 @@ buildPythonPackage rec { nativeCheckInputs = [ flexmock - pytest + pytestCheckHook pytest-cov-stub six ]; From 1f845f16b0fbbd43efe84b487a629fd3c74e9ec4 Mon Sep 17 00:00:00 2001 From: Peder Bergebakken Sundt Date: Mon, 9 Jun 2025 03:33:56 +0200 Subject: [PATCH 33/35] python3Packages.plaster: use pytestCheckHook --- pkgs/development/python-modules/plaster/default.nix | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/pkgs/development/python-modules/plaster/default.nix b/pkgs/development/python-modules/plaster/default.nix index 6806da56f47f..b01e94bc1d57 100644 --- a/pkgs/development/python-modules/plaster/default.nix +++ b/pkgs/development/python-modules/plaster/default.nix @@ -2,7 +2,7 @@ lib, buildPythonPackage, fetchPypi, - pytest, + pytestCheckHook, pytest-cov-stub, }: @@ -16,12 +16,8 @@ buildPythonPackage rec { hash = "sha256-+L78VL+MEUfBCrQCl+yEwmdvotTqXW9STZQ2qAB075g="; }; - checkPhase = '' - py.test - ''; - nativeCheckInputs = [ - pytest + pytestCheckHook pytest-cov-stub ]; From 180af6dca6a51a416c52c18ae2c19b4ff102e541 Mon Sep 17 00:00:00 2001 From: Peder Bergebakken Sundt Date: Mon, 9 Jun 2025 03:33:56 +0200 Subject: [PATCH 34/35] python3Packages.property-manager: use pytestCheckHook --- pkgs/development/python-modules/property-manager/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/property-manager/default.nix b/pkgs/development/python-modules/property-manager/default.nix index 71fa0e1aeddb..02c0b6accd46 100644 --- a/pkgs/development/python-modules/property-manager/default.nix +++ b/pkgs/development/python-modules/property-manager/default.nix @@ -5,7 +5,7 @@ humanfriendly, verboselogs, coloredlogs, - pytest, + pytestCheckHook, pytest-cov-stub, }: @@ -27,7 +27,7 @@ buildPythonPackage rec { verboselogs ]; nativeCheckInputs = [ - pytest + pytestCheckHook pytest-cov-stub ]; From f5d779c77797886607507eebb556a1e2f1949c67 Mon Sep 17 00:00:00 2001 From: Peder Bergebakken Sundt Date: Mon, 9 Jun 2025 03:33:56 +0200 Subject: [PATCH 35/35] python3Packages.reikna: use pytestCheckHook --- pkgs/development/python-modules/reikna/default.nix | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/pkgs/development/python-modules/reikna/default.nix b/pkgs/development/python-modules/reikna/default.nix index 6dee74d2b712..ab32dd6e5aaf 100644 --- a/pkgs/development/python-modules/reikna/default.nix +++ b/pkgs/development/python-modules/reikna/default.nix @@ -4,7 +4,7 @@ buildPythonPackage, sphinx, pytest-cov-stub, - pytest, + pytestCheckHook, mako, numpy, funcsigs, @@ -27,7 +27,7 @@ buildPythonPackage rec { nativeCheckInputs = [ sphinx pytest-cov-stub - pytest + pytestCheckHook ]; propagatedBuildInputs = @@ -39,10 +39,6 @@ buildPythonPackage rec { ++ lib.optional withCuda pycuda ++ lib.optional withOpenCL pyopencl; - checkPhase = '' - py.test - ''; - # Requires device doCheck = false;