From 8b5f6df8605afbe903dfa0e776bb19076f6e1fa6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sandro=20J=C3=A4ckel?= Date: Sun, 21 Jul 2024 16:12:36 +0200 Subject: [PATCH 1/9] vyper: drop useless pytest-runner --- pkgs/development/compilers/vyper/default.nix | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/pkgs/development/compilers/vyper/default.nix b/pkgs/development/compilers/vyper/default.nix index 56899b6acba4..89973eb524ee 100644 --- a/pkgs/development/compilers/vyper/default.nix +++ b/pkgs/development/compilers/vyper/default.nix @@ -7,7 +7,6 @@ , importlib-metadata , packaging , pycryptodome -, pytest-runner , pythonOlder , recommonmark , setuptools-scm @@ -41,7 +40,8 @@ buildPythonPackage rec { postPatch = '' # pythonRelaxDeps doesn't work substituteInPlace setup.py \ - --replace "setuptools_scm>=7.1.0,<8.0.0" "setuptools_scm>=7.1.0" + --replace-fail "setuptools_scm>=7.1.0,<8.0.0" "setuptools_scm>=7.1.0" \ + --replace-fail '"pytest-runner",' "" ''; nativeBuildInputs = [ @@ -49,7 +49,6 @@ buildPythonPackage rec { # ever since https://github.com/vyperlang/vyper/pull/2816 git - pytest-runner setuptools-scm ]; From 3bb5ba4b34ce56b404ce950985e85d25696723d9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sandro=20J=C3=A4ckel?= Date: Sun, 21 Jul 2024 16:12:50 +0200 Subject: [PATCH 2/9] python312Packages.hikari: drop useless pytest-runner, use pytest-cov-sub --- pkgs/development/python-modules/hikari/default.nix | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/pkgs/development/python-modules/hikari/default.nix b/pkgs/development/python-modules/hikari/default.nix index 026176e7a7b8..dbc853b926aa 100644 --- a/pkgs/development/python-modules/hikari/default.nix +++ b/pkgs/development/python-modules/hikari/default.nix @@ -4,13 +4,12 @@ fetchFromGitHub, pytestCheckHook, pythonOlder, - pytest-runner, aiohttp, attrs, multidict, colorlog, pynacl, - pytest-cov, + pytest-cov-stub, pytest-randomly, pytest-asyncio, mock, @@ -52,9 +51,8 @@ buildPythonPackage rec { nativeCheckInputs = [ pytestCheckHook - pytest-runner pytest-asyncio - pytest-cov + pytest-cov-stub pytest-randomly mock ]; From fb9a787bc2eef3b63550b53147ab6762de4a2798 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sandro=20J=C3=A4ckel?= Date: Sun, 21 Jul 2024 16:14:04 +0200 Subject: [PATCH 3/9] python312Packages.pytest-harvest: drop useless pytest-runner, remove distutils usage --- pkgs/development/python-modules/pytest-harvest/default.nix | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/pytest-harvest/default.nix b/pkgs/development/python-modules/pytest-harvest/default.nix index 65325851b770..35e5945c1a62 100644 --- a/pkgs/development/python-modules/pytest-harvest/default.nix +++ b/pkgs/development/python-modules/pytest-harvest/default.nix @@ -3,7 +3,6 @@ buildPythonPackage, fetchFromGitHub, setuptools-scm, - pytest-runner, pytest, decopatch, makefun, @@ -34,11 +33,14 @@ buildPythonPackage rec { # we disable this file creation as it touches internet postPatch = '' echo "version = '${version}'" > pytest_harvest/_version.py + + substituteInPlace pytest_harvest/tests/test_lazy_and_harvest.py \ + --replace-fail "from distutils.version import LooseVersion" "from packaging.version import parse" \ + --replace-fail "LooseVersion" "parse" ''; nativeBuildInputs = [ setuptools-scm - pytest-runner ]; buildInputs = [ pytest ]; From 6cd8364602515754488ba81cbb94b1d69c8d0b7c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sandro=20J=C3=A4ckel?= Date: Sun, 21 Jul 2024 16:14:45 +0200 Subject: [PATCH 4/9] python312Packages.tf2onnx: remove useless pytest-runner --- pkgs/development/python-modules/tf2onnx/default.nix | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pkgs/development/python-modules/tf2onnx/default.nix b/pkgs/development/python-modules/tf2onnx/default.nix index 73c19842f103..54a837089bc8 100644 --- a/pkgs/development/python-modules/tf2onnx/default.nix +++ b/pkgs/development/python-modules/tf2onnx/default.nix @@ -2,7 +2,6 @@ lib, buildPythonPackage, fetchFromGitHub, - pytest-runner, # runtime dependencies numpy, onnx, @@ -34,9 +33,10 @@ buildPythonPackage rec { hash = "sha256-qtRzckw/KHWm3gjFwF+cPuBhGbfktjhYIwImwHn2CFk="; }; - nativeBuildInputs = [ - pytest-runner - ]; + postPatch = '' + substituteInPlace setup.py \ + --replace-fail "'pytest-runner'" "" + ''; pythonRelaxDeps = [ "flatbuffers" ]; From 0d683ad8790d8ad37275054a25e7e14ddded7144 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sandro=20J=C3=A4ckel?= Date: Sun, 21 Jul 2024 16:16:34 +0200 Subject: [PATCH 5/9] duplicity: drop useless pytest-runner, run pytest explicitly trough pytestCheckHook Before it was presumable run via python setup.py test which now throws an error. --- pkgs/tools/backup/duplicity/default.nix | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pkgs/tools/backup/duplicity/default.nix b/pkgs/tools/backup/duplicity/default.nix index 71d63a622d4d..da32f2323343 100644 --- a/pkgs/tools/backup/duplicity/default.nix +++ b/pkgs/tools/backup/duplicity/default.nix @@ -99,8 +99,7 @@ let self = python3.pkgs.buildPythonApplication rec { lockfile mock pexpect - pytest - pytest-runner + pytestCheckHook fasteners ]); From 20f7764221304edf05fdafad375c80c723ea547f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sandro=20J=C3=A4ckel?= Date: Sun, 15 Sep 2024 15:03:02 +0200 Subject: [PATCH 6/9] udocker: remove useless pytest-runner --- pkgs/tools/virtualization/udocker/default.nix | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pkgs/tools/virtualization/udocker/default.nix b/pkgs/tools/virtualization/udocker/default.nix index 8f0afedfd9cb..25ae2fe9ee33 100644 --- a/pkgs/tools/virtualization/udocker/default.nix +++ b/pkgs/tools/virtualization/udocker/default.nix @@ -17,6 +17,11 @@ python3Packages.buildPythonApplication rec { hash = "sha256-P49fkLvdCm/Eco+nD3SGM04PRQatBzq9CHlayueQetk="; }; + postPatch = '' + substituteInPlace setup.py \ + --replace-fail "'pytest-runner'," "" + ''; + # crun patchelf proot runc fakechroot # are download statistically linked during runtime buildInputs = [ @@ -28,7 +33,6 @@ python3Packages.buildPythonApplication rec { ]; nativeCheckInputs = with python3Packages; [ - pytest-runner pytestCheckHook ]; From cbd46bcbc2896dfe15d86ae058c3cc37b4cfdaf3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sandro=20J=C3=A4ckel?= Date: Sun, 15 Sep 2024 15:06:14 +0200 Subject: [PATCH 7/9] terminator: drop useless pytest-runner --- pkgs/applications/terminal-emulators/terminator/default.nix | 1 - 1 file changed, 1 deletion(-) diff --git a/pkgs/applications/terminal-emulators/terminator/default.nix b/pkgs/applications/terminal-emulators/terminator/default.nix index aedbb761a8ca..01047f26bc63 100644 --- a/pkgs/applications/terminal-emulators/terminator/default.nix +++ b/pkgs/applications/terminal-emulators/terminator/default.nix @@ -30,7 +30,6 @@ python3.pkgs.buildPythonApplication rec { gobject-introspection makeBinaryWrapper wrapGAppsHook3 - python3.pkgs.pytest-runner ]; buildInputs = [ From 12b31a7434ba00e1b6db78aa5d503232be646452 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sandro=20J=C3=A4ckel?= Date: Sun, 15 Sep 2024 15:07:14 +0200 Subject: [PATCH 8/9] cpplint: drop useless pytest-runner --- pkgs/development/tools/analysis/cpplint/default.nix | 1 - 1 file changed, 1 deletion(-) diff --git a/pkgs/development/tools/analysis/cpplint/default.nix b/pkgs/development/tools/analysis/cpplint/default.nix index d9603ca0548d..b32e1cf4e678 100644 --- a/pkgs/development/tools/analysis/cpplint/default.nix +++ b/pkgs/development/tools/analysis/cpplint/default.nix @@ -35,7 +35,6 @@ python3Packages.buildPythonApplication rec { nativeCheckInputs = with python3Packages; [ pytest - pytest-runner ]; checkPhase = '' From 39374875a0814c725f1e442520ec87791399c770 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sandro=20J=C3=A4ckel?= Date: Sun, 15 Sep 2024 15:11:48 +0200 Subject: [PATCH 9/9] python312Packages.pytest-runner: drop --- .../python-modules/pytest-runner/default.nix | 40 ------------------- pkgs/top-level/python-aliases.nix | 1 + pkgs/top-level/python-packages.nix | 2 - 3 files changed, 1 insertion(+), 42 deletions(-) delete mode 100644 pkgs/development/python-modules/pytest-runner/default.nix diff --git a/pkgs/development/python-modules/pytest-runner/default.nix b/pkgs/development/python-modules/pytest-runner/default.nix deleted file mode 100644 index 57b970fc98df..000000000000 --- a/pkgs/development/python-modules/pytest-runner/default.nix +++ /dev/null @@ -1,40 +0,0 @@ -{ - lib, - buildPythonPackage, - fetchPypi, - setuptools-scm, - pytest, -}: - -buildPythonPackage rec { - pname = "pytest-runner"; - version = "6.0.1"; - format = "pyproject"; - - src = fetchPypi { - inherit pname version; - hash = "sha256-cNRzlYWnAI83v0kzwBP9sye4h4paafy7MxbIiILw9Js="; - }; - - postPatch = '' - rm pytest.ini - ''; - - nativeBuildInputs = [ - setuptools-scm - pytest - ]; - - checkPhase = '' - py.test tests - ''; - - # Fixture not found - doCheck = false; - - meta = with lib; { - description = "Invoke py.test as distutils command with dependency resolution"; - homepage = "https://github.com/pytest-dev/pytest-runner"; - license = licenses.mit; - }; -} diff --git a/pkgs/top-level/python-aliases.nix b/pkgs/top-level/python-aliases.nix index 2deac32df67c..6f7d624f12a1 100644 --- a/pkgs/top-level/python-aliases.nix +++ b/pkgs/top-level/python-aliases.nix @@ -482,6 +482,7 @@ mapAliases ({ pytest-pep8 = pytestpep8; # added 2021-01-04 pytest-pep257 = throw "pytest-pep257 was removed, as the pep257 package was migrated into pycodestyle"; # added 2022-04-12 pytest-pythonpath = throw "pytest-pythonpath is obsolete as of pytest 7.0.0 and has been removed"; # added 2022-03-09 + pytest-runner = throw "pytest-runner has been removed as it uses deprecated features of setuptools and is deprecated by upstream"; # added 2024-09-15 pytest-sanic = throw "pytest-sanic has been removed because it is unmaintained and broken"; # added 2023-06-22 pytestpep8 = throw "pytestpep8 was removed because it is abandoned and no longer compatible with pytest v6.0"; # added 2020-12-10 pytestquickcheck = pytest-quickcheck; # added 2021-07-20 diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index d780ce738668..6a69993b54f0 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -12472,8 +12472,6 @@ self: super: with self; { pytest-responses = callPackage ../development/python-modules/pytest-responses { }; - pytest-runner = callPackage ../development/python-modules/pytest-runner { }; - pytest-server-fixtures = callPackage ../development/python-modules/pytest-server-fixtures { }; pytest-services = callPackage ../development/python-modules/pytest-services { };