From bbea7d1df4b92d997a57c7016e36b38f5333959b Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Sat, 28 Jun 2025 00:38:26 +0200 Subject: [PATCH] python3Packages.django-redis: 5.4.0 -> 6.0.0 https://github.com/jazzband/django-redis/releases/tag/6.0.0 --- .../python-modules/django-redis/default.nix | 38 +++++++------------ 1 file changed, 13 insertions(+), 25 deletions(-) diff --git a/pkgs/development/python-modules/django-redis/default.nix b/pkgs/development/python-modules/django-redis/default.nix index 6dacbbc2e433..e85f28807750 100644 --- a/pkgs/development/python-modules/django-redis/default.nix +++ b/pkgs/development/python-modules/django-redis/default.nix @@ -7,22 +7,23 @@ # propagated django, - hiredis, lz4, msgpack, + pyzstd, redis, # testing - pkgs, pytest-cov-stub, pytest-django, pytest-mock, + pytest-xdist, pytestCheckHook, + redisTestHook, }: buildPythonPackage rec { pname = "django-redis"; - version = "5.4.0"; + version = "6.0.0"; pyproject = true; disabled = pythonOlder "3.6"; @@ -31,15 +32,16 @@ buildPythonPackage rec { owner = "jazzband"; repo = "django-redis"; tag = version; - hash = "sha256-m7z3c7My24vrSSnyfDQ/LlWhy7pV4U0L8LATMvkfczc="; + hash = "sha256-QfiyeeDQSRp/TkOun/HAQaPbIUY9yKPoOOEhKBX9Tec="; }; build-system = [ setuptools ]; - propagatedBuildInputs = [ + dependencies = [ django lz4 msgpack + pyzstd redis ]; @@ -51,37 +53,23 @@ buildPythonPackage rec { preCheck = '' export DJANGO_SETTINGS_MODULE=tests.settings.sqlite - - ${pkgs.valkey}/bin/redis-server & - REDIS_PID=$! - ''; - - postCheck = '' - kill $REDIS_PID ''; nativeCheckInputs = [ pytest-cov-stub pytest-django pytest-mock + pytest-xdist pytestCheckHook + redisTestHook ] ++ lib.flatten (lib.attrValues optional-dependencies); - pytestFlagsArray = [ - "-W" - "ignore::DeprecationWarning" - ]; + # https://github.com/jazzband/django-redis/issues/777 + dontUsePytestXdist = true; disabledTests = [ - # ModuleNotFoundError: No module named 'test_cache_options' - "test_custom_key_function" - # ModuleNotFoundError: No module named 'test_client' - "test_delete_pattern_calls_delete_for_given_keys" - "test_delete_pattern_calls_get_client_given_no_client" - "test_delete_pattern_calls_make_pattern" - "test_delete_pattern_calls_pipeline_delete_and_execute" - "test_delete_pattern_calls_scan_iter" - "test_delete_pattern_calls_scan_iter_with_count_if_itersize_given" + # AttributeError: object has no attribute 'default' + "test_delete_pattern_with_settings_default_scan_count" ]; __darwinAllowLocalNetworking = true;