From 78d8afdd7ff11e6f9f5c5005161f41fa29653daf Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Fri, 3 Jul 2026 01:42:18 +0200 Subject: [PATCH] python3Packages.django-rq: fix redis-py 8.0 compat Fast-forward to maintain and apply a patch to fix the tests. --- .../python-modules/django-rq/default.nix | 12 ++++++++---- .../django-rq/redis-py-8.0-compat.patch | 15 +++++++++++++++ 2 files changed, 23 insertions(+), 4 deletions(-) create mode 100644 pkgs/development/python-modules/django-rq/redis-py-8.0-compat.patch diff --git a/pkgs/development/python-modules/django-rq/default.nix b/pkgs/development/python-modules/django-rq/default.nix index a946f4d89b54..330e28aca47c 100644 --- a/pkgs/development/python-modules/django-rq/default.nix +++ b/pkgs/development/python-modules/django-rq/default.nix @@ -16,16 +16,20 @@ buildPythonPackage (finalAttrs: { pname = "django-rq"; - version = "4.1"; + version = "4.1-unstable-2026-05-28"; pyproject = true; src = fetchFromGitHub { owner = "rq"; repo = "django-rq"; - tag = "v${finalAttrs.version}"; - hash = "sha256-c/elbEi+m3WVGl8137ct1PsxRM397uZNPy9X54b8fmg="; + rev = "39539ab680cf6a23073f4907b5e7332226494784"; + hash = "sha256-Yrc0HQmCsrdTs66RZwwmZQraxB5/eJG8dOPcVn53rjA="; }; + patches = [ + ./redis-py-8.0-compat.patch + ]; + build-system = [ hatchling ]; dependencies = [ @@ -61,7 +65,7 @@ buildPythonPackage (finalAttrs: { meta = { description = "Simple app that provides django integration for RQ (Redis Queue)"; homepage = "https://github.com/rq/django-rq"; - changelog = "https://github.com/rq/django-rq/releases/tag/${finalAttrs.src.tag}"; + # changelog = "https://github.com/rq/django-rq/releases/tag/${finalAttrs.src.tag}"; license = lib.licenses.mit; maintainers = with lib.maintainers; [ hexa ]; }; diff --git a/pkgs/development/python-modules/django-rq/redis-py-8.0-compat.patch b/pkgs/development/python-modules/django-rq/redis-py-8.0-compat.patch new file mode 100644 index 000000000000..e74181ad2be6 --- /dev/null +++ b/pkgs/development/python-modules/django-rq/redis-py-8.0-compat.patch @@ -0,0 +1,15 @@ +diff --git a/tests/utils.py b/tests/utils.py +index 90ba1d4..e320a58 100644 +--- a/tests/utils.py ++++ b/tests/utils.py +@@ -38,6 +38,10 @@ def get_queue_index(name='default'): + if q.name == name: + # assert that the connection is correct + pool_kwargs = q.connection.connection_pool.connection_kwargs ++ pool_kwargs.pop("maint_notifications_config", None) ++ pool_kwargs.pop("maint_notifications_pool_handler", None) ++ connection_kwargs.pop("maint_notifications_config", None) ++ connection_kwargs.pop("maint_notifications_pool_handler", None) + if not _is_buggy_retry(pool_kwargs) or not _is_buggy_retry(connection_kwargs): + assert pool_kwargs == connection_kwargs + else: