Martin Weinelt 2022-12-31 04:13:19 +01:00
parent 98584cba44
commit adca32766a

View File

@ -4,6 +4,7 @@
, flask
, limits
, ordered-set
, rich
, typing-extensions
@ -18,18 +19,30 @@
buildPythonPackage rec {
pname = "Flask-Limiter";
version = "2.6.2";
version = "3.1.0";
format = "setuptools";
src = fetchFromGitHub {
owner = "alisaifee";
repo = "flask-limiter";
rev = version;
sha256 = "sha256-JjksKwSMWzcslXCs977/Wlq1wDMaACxm8e6Ub+r3wPg=";
rev = "refs/tags/${version}";
hash = "sha256-eAJRqyAH1j1NHYfagRZM2fPE6hm9+tJHD8FMqvgvMBI=";
};
postPatch = ''
substituteInPlace requirements/main.txt \
--replace "rich>=12,<13" "rich"
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
'';
propagatedBuildInputs = [
flask
limits
ordered-set
rich
typing-extensions
];
@ -44,13 +57,6 @@ buildPythonPackage rec {
pymongo
];
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
'';
disabledTests = [
# flask-restful is unmaintained and breaks regularly
"test_flask_restful_resource"