1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
|
{
lib,
fetchFromGitHub,
buildPythonPackage,
hatchling,
# propagated
backports-zstd,
brotli,
django,
libvalkey,
lz4,
msgpack,
msgspec,
valkey,
# testing
anyio,
pytest-django,
pytest-mock,
pytestCheckHook,
redisTestHook,
}:
buildPythonPackage rec {
pname = "django-valkey";
version = "0.4.1";
pyproject = true;
src = fetchFromGitHub {
owner = "django-commons";
repo = "django-valkey";
tag = version;
hash = "sha256-kXp4i7E2DnrMi0tTg8kdWmuImIWIPKTM5s7sPLWPFko=";
};
build-system = [ hatchling ];
dependencies = [
django
valkey
];
optional-dependencies = {
brotli = [ brotli ];
libvalkey = [ libvalkey ];
lz4 = [ lz4 ];
msgpack = [ msgpack ];
msgspec = [ msgspec ];
pyzstd = [ backports-zstd ];
zstd = [ backports-zstd ];
};
pythonImportsCheck = [ "django_valkey" ];
nativeCheckInputs = [
anyio
pytest-django
pytest-mock
pytestCheckHook
redisTestHook # contains valkey
]
++ lib.flatten (lib.attrValues optional-dependencies);
disabledTestPaths = [
# requires valkey cluster
"tests/tests_cluster/test_backend.py"
"tests/tests_cluster/test_cache_options.py"
"tests/tests_cluster/test_client.py"
# AttributeError: 'ValkeyCache' object has no attribute 'aset'
"tests/tests_async/test_backend.py"
# TypeError: object NoneType can't be used in 'await' expression
"tests/tests_async/test_cache_options.py"
# AttributeError: 'DefaultClient' object has no attribute 'aset'. Did you mean: 'hset'?
"tests/tests_async/test_client.py"
# AttributeError: 'ValkeyCache' object has no attribute 'ahas_key'
"tests/tests_async/test_session.py"
"tests/tests_async/test_requests.py"
];
__darwinAllowLocalNetworking = true;
meta = with lib; {
description = "Valkey backend for django";
homepage = "https://github.com/django-commons/django-valkey";
changelog = "https://github.com/django-commons/django-valkey/releases/tag/${version}";
license = licenses.bsd3;
maintainers = [ ];
};
}
|