Skip to content

Commit a047cce

Browse files
committed
python312Packages.flask-limiter: modernize
1 parent 13aed30 commit a047cce

File tree

1 file changed

+7
-6
lines changed
  • pkgs/development/python-modules/flask-limiter

1 file changed

+7
-6
lines changed

pkgs/development/python-modules/flask-limiter/default.nix

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
ordered-set,
1010
pymemcache,
1111
pymongo,
12+
pytest-cov-stub,
1213
pytest-mock,
1314
pytestCheckHook,
1415
pythonOlder,
@@ -23,7 +24,7 @@ buildPythonPackage rec {
2324
version = "3.7.0";
2425
pyproject = true;
2526

26-
disabled = pythonOlder "3.7";
27+
disabled = pythonOlder "3.8";
2728

2829
src = fetchFromGitHub {
2930
owner = "alisaifee";
@@ -33,15 +34,14 @@ buildPythonPackage rec {
3334
};
3435

3536
postPatch = ''
36-
sed -i "/--cov/d" pytest.ini
37-
3837
# flask-restful is unmaintained and breaks regularly, don't depend on it
39-
sed -i "/import flask_restful/d" tests/test_views.py
38+
substituteInPlace tests/test_views.py \
39+
--replace-fail "import flask_restful" ""
4040
'';
4141

42-
nativeBuildInputs = [ setuptools ];
42+
build-system = [ setuptools ];
4343

44-
propagatedBuildInputs = [
44+
dependencies = [
4545
flask
4646
limits
4747
ordered-set
@@ -57,6 +57,7 @@ buildPythonPackage rec {
5757

5858
nativeCheckInputs = [
5959
asgiref
60+
pytest-cov-stub
6061
pytest-mock
6162
pytestCheckHook
6263
hiro

0 commit comments

Comments
 (0)