python3Packages.django-redis: 5.0.0 -> 5.1.0

This commit is contained in:
Martin Weinelt 2021-12-02 03:23:09 +01:00
parent 971b383a28
commit aca96fc3dd
No known key found for this signature in database
GPG key ID: 87C1E9888F856759

View file

@ -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; {