diff --git a/pkgs/development/python-modules/django-cacheops/default.nix b/pkgs/development/python-modules/django-cacheops/default.nix index 971a65eeb1d5..23b0aad4c5a7 100644 --- a/pkgs/development/python-modules/django-cacheops/default.nix +++ b/pkgs/development/python-modules/django-cacheops/default.nix @@ -1,27 +1,39 @@ { lib , buildPythonPackage , fetchPypi +, pythonRelaxDepsHook , django , funcy , redis -, pytest-django -, pytestCheckHook -, pythonOlder , six +, pytestCheckHook +, pytest-django +, mock +, dill +, jinja2 +, before-after +, pythonOlder +, nettools +, pkgs }: buildPythonPackage rec { pname = "django-cacheops"; - version = "6.2"; + version = "7.0.1"; format = "setuptools"; disabled = pythonOlder "3.7"; src = fetchPypi { inherit pname version; - hash = "sha256-zHP9ChwUeZJT/yCopFeRo8jSgCIXswHnDPoIroGeQ48="; + hash = "sha256-Ed3qh90DlWiXikCD2JyJ37hm6lWnpI+2haaPwZiotlA="; }; + nativeBuildInputs = [ + pythonRelaxDepsHook + ]; + pythonRelaxDeps = [ "funcy" ]; + propagatedBuildInputs = [ django funcy @@ -32,23 +44,21 @@ buildPythonPackage rec { nativeCheckInputs = [ pytestCheckHook pytest-django + mock + dill + jinja2 + before-after + nettools + pkgs.redis ]; - disabledTests = [ - # Tests require networking - "test_cached_as" - "test_invalidation_signal" - "test_queryset" - "test_queryset_empty" - "test_lock" - "test_context_manager" - "test_decorator" - "test_in_transaction" - "test_nested" - "test_unhashable_args" - "test_db_agnostic_by_default" - "test_db_agnostic_disabled" - ]; + preCheck = '' + redis-server & + while ! redis-cli --scan ; do + echo waiting for redis to be ready + sleep 1 + done + ''; DJANGO_SETTINGS_MODULE = "tests.settings"; @@ -58,8 +68,5 @@ buildPythonPackage rec { changelog = "https://github.com/Suor/django-cacheops/blob/${version}/CHANGELOG"; license = licenses.bsd3; maintainers = with maintainers; [ onny ]; - # No support for funcy > 2 - # https://github.com/Suor/django-cacheops/issues/454 - broken = true; }; }