From a047cce7049f2f82a0c07d6b252961aa4a398538 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Sun, 18 Aug 2024 23:34:12 -0700 Subject: [PATCH] python312Packages.flask-limiter: modernize --- .../python-modules/flask-limiter/default.nix | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/pkgs/development/python-modules/flask-limiter/default.nix b/pkgs/development/python-modules/flask-limiter/default.nix index 2b6f15bdc3fc..c7c09abe71d8 100644 --- a/pkgs/development/python-modules/flask-limiter/default.nix +++ b/pkgs/development/python-modules/flask-limiter/default.nix @@ -9,6 +9,7 @@ ordered-set, pymemcache, pymongo, + pytest-cov-stub, pytest-mock, pytestCheckHook, pythonOlder, @@ -23,7 +24,7 @@ buildPythonPackage rec { version = "3.7.0"; pyproject = true; - disabled = pythonOlder "3.7"; + disabled = pythonOlder "3.8"; src = fetchFromGitHub { owner = "alisaifee"; @@ -33,15 +34,14 @@ buildPythonPackage rec { }; postPatch = '' - sed -i "/--cov/d" pytest.ini - # flask-restful is unmaintained and breaks regularly, don't depend on it - sed -i "/import flask_restful/d" tests/test_views.py + substituteInPlace tests/test_views.py \ + --replace-fail "import flask_restful" "" ''; - nativeBuildInputs = [ setuptools ]; + build-system = [ setuptools ]; - propagatedBuildInputs = [ + dependencies = [ flask limits ordered-set @@ -57,6 +57,7 @@ buildPythonPackage rec { nativeCheckInputs = [ asgiref + pytest-cov-stub pytest-mock pytestCheckHook hiro