diff options
author | Martin Weinelt <hexa@darmstadt.ccc.de> | 2022-08-26 09:10:18 +0200 |
---|---|---|
committer | Martin Weinelt <hexa@darmstadt.ccc.de> | 2022-08-26 09:18:48 +0200 |
commit | 530c690c47a2870c9a93b32240fb41dcff7d5317 (patch) | |
tree | c80be20624ba91961598b30cf68826032468102f /pkgs/development | |
parent | b33f9716e74e535db3bb0f6c13bd11dd30cd49fe (diff) |
python3Packages.flask-limiter: 1.4 -> 2.6.2
This unties the tests from the regularly broken flask-restful dependency, that has its largest reverse dependency chain via this package.
Diffstat (limited to 'pkgs/development')
-rw-r--r-- | pkgs/development/python-modules/flask-limiter/default.nix | 53 |
1 files changed, 39 insertions, 14 deletions
diff --git a/pkgs/development/python-modules/flask-limiter/default.nix b/pkgs/development/python-modules/flask-limiter/default.nix index c593c855c70f2..275b4507fb3b2 100644 --- a/pkgs/development/python-modules/flask-limiter/default.nix +++ b/pkgs/development/python-modules/flask-limiter/default.nix @@ -1,54 +1,79 @@ { lib , buildPythonPackage , fetchFromGitHub + , flask -, flask-restful -, hiro , limits -, mock +, rich +, typing-extensions + +, asgiref +, hiro , pymemcache +, pytest-mock , pytestCheckHook , redis +, pymongo }: buildPythonPackage rec { pname = "Flask-Limiter"; - version = "1.4"; + version = "2.6.2"; src = fetchFromGitHub { owner = "alisaifee"; repo = "flask-limiter"; rev = version; - sha256 = "1k1b4b3s1acphqnar0y5g747bh1y7w35gcl5g819idq2a5vqnass"; + sha256 = "sha256-JjksKwSMWzcslXCs977/Wlq1wDMaACxm8e6Ub+r3wPg="; }; - propagatedBuildInputs = [ flask limits ]; + propagatedBuildInputs = [ + flask + limits + rich + typing-extensions + ]; checkInputs = [ + asgiref + pytest-mock pytestCheckHook hiro - mock redis - flask-restful pymemcache + 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 ''; - # Some tests requires a local Redis instance disabledTests = [ - "test_fallback_to_memory" - "test_reset_unsupported" + # flask-restful is unmaintained and breaks regularly + "test_flask_restful_resource" + + # Requires running a docker instance + "test_clear_limits" "test_constructor_arguments_over_config" - "test_fallback_to_memory_config" + "test_custom_key_prefix" + "test_custom_key_prefix_with_headers" "test_fallback_to_memory_backoff_check" + "test_fallback_to_memory_config" "test_fallback_to_memory_with_global_override" - "test_custom_key_prefix" "test_redis_request_slower_than_fixed_window" "test_redis_request_slower_than_moving_window" - "test_custom_key_prefix_with_headers" + "test_reset_unsupported" + + # Requires redis + "test_fallback_to_memory" + ]; + + disabledTestPaths = [ + # requires running redis/memcached/mongodb + "tests/test_storage.py" ]; pythonImportsCheck = [ "flask_limiter" ]; |