From aca96fc3dd5d0882a9053c23c3f5f342737002ad Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Thu, 2 Dec 2021 03:23:09 +0100 Subject: [PATCH] python3Packages.django-redis: 5.0.0 -> 5.1.0 --- .../python-modules/django-redis/default.nix | 42 ++++++++++++++++--- 1 file changed, 37 insertions(+), 5 deletions(-) diff --git a/pkgs/development/python-modules/django-redis/default.nix b/pkgs/development/python-modules/django-redis/default.nix index b578a016722b..b088876b3e4a 100644 --- a/pkgs/development/python-modules/django-redis/default.nix +++ b/pkgs/development/python-modules/django-redis/default.nix @@ -2,14 +2,27 @@ , fetchFromGitHub , pythonOlder , buildPythonPackage + +# propagated , django +, hiredis +, lz4 +, msgpack , redis + +# testing +, pkgs +, pytest-django +, pytest-mock , pytestCheckHook }: -buildPythonPackage rec { +let pname = "django-redis"; - version = "5.0.0"; + version = "5.1.0"; +in +buildPythonPackage { + inherit pname version; format = "setuptools"; disabled = pythonOlder "3.6"; @@ -17,7 +30,7 @@ buildPythonPackage rec { owner = "jazzband"; repo = "django-redis"; rev = version; - sha256 = "1np10hfyg4aamlz7vav9fy80gynb1lhl2drqkbckr3gg1gbz6crj"; + sha256 = "sha256-S94qH2W5e65yzGfPxpwBUKhvvVS0Uc/zSyo66bnvzf4="; }; postPatch = '' @@ -26,6 +39,9 @@ buildPythonPackage rec { propagatedBuildInputs = [ django + hiredis + lz4 + msgpack redis ]; @@ -33,12 +49,28 @@ buildPythonPackage rec { "django_redis" ]; + DJANGO_SETTINGS_MODULE = "tests.settings.sqlite"; + + preCheck = '' + ${pkgs.redis}/bin/redis-server & + ''; + checkInputs = [ + pytest-django + pytest-mock pytestCheckHook ]; - disabledTestPaths = [ - "tests/test_backend.py" # django.core.exceptions.ImproperlyConfigured: Requested setting DJANGO_REDIS_SCAN_ITERSIZE, but settings are not configured. + disabledTests = [ + # ModuleNotFoundError: No module named 'test_cache_options' + "test_custom_key_function" + # ModuleNotFoundError: No module named 'test_client' + "test_delete_pattern_calls_get_client_given_no_client" + "test_delete_pattern_calls_make_pattern" + "test_delete_pattern_calls_scan_iter_with_count_if_itersize_given" + "test_delete_pattern_calls_scan_iter_with_count_if_itersize_given" + "test_delete_pattern_calls_scan_iter" + "test_delete_pattern_calls_delete_for_given_keys" ]; meta = with lib; {