From 4d8d60a0375c43bcb18badfb7d36e98c37a3708f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sandro=20J=C3=A4ckel?= Date: Mon, 18 Aug 2025 21:00:55 +0200 Subject: [PATCH] python3Packages.djangorestframework-guardian2: drop in favor of djangorestframework-guardian 0.4.0 --- pkgs/by-name/au/authentik/package.nix | 4 +- pkgs/by-name/pa/paperless-ngx/package.nix | 5 +- .../djangorestframework-guardian2/default.nix | 46 ------------------- pkgs/top-level/python-aliases.nix | 1 + pkgs/top-level/python-packages.nix | 4 -- 5 files changed, 4 insertions(+), 56 deletions(-) delete mode 100644 pkgs/development/python-modules/djangorestframework-guardian2/default.nix diff --git a/pkgs/by-name/au/authentik/package.nix b/pkgs/by-name/au/authentik/package.nix index 14e8700c416c..ef2639eb71ba 100644 --- a/pkgs/by-name/au/authentik/package.nix +++ b/pkgs/by-name/au/authentik/package.nix @@ -308,8 +308,6 @@ let substituteInPlace authentik/lib/default.yml \ --replace-fail '/blueprints' "$out/blueprints" \ --replace-fail './media' '/var/lib/authentik/media' - substituteInPlace pyproject.toml \ - --replace-fail 'djangorestframework-guardian' 'djangorestframework-guardian2' substituteInPlace authentik/stages/email/utils.py \ --replace-fail 'web/' '${webui}/' ''; @@ -346,7 +344,7 @@ let django-storages django-tenants djangorestframework - djangorestframework-guardian2 + djangorestframework-guardian docker drf-orjson-renderer drf-spectacular diff --git a/pkgs/by-name/pa/paperless-ngx/package.nix b/pkgs/by-name/pa/paperless-ngx/package.nix index 58dcc0543931..2b253fd5bc69 100644 --- a/pkgs/by-name/pa/paperless-ngx/package.nix +++ b/pkgs/by-name/pa/paperless-ngx/package.nix @@ -149,8 +149,7 @@ python.pkgs.buildPythonApplication rec { fi substituteInPlace pyproject.toml \ --replace-fail '"--numprocesses=auto",' "" \ - --replace-fail '--maxprocesses=16' "--numprocesses=$NIX_BUILD_CORES" \ - --replace-fail "djangorestframework-guardian~=0.3.0" "djangorestframework-guardian2" + --replace-fail '--maxprocesses=16' "--numprocesses=$NIX_BUILD_CORES" ''; nativeBuildInputs = [ @@ -194,7 +193,7 @@ python.pkgs.buildPythonApplication rec { django-multiselectfield django-soft-delete djangorestframework - djangorestframework-guardian2 + djangorestframework-guardian drf-spectacular drf-spectacular-sidecar drf-writable-nested diff --git a/pkgs/development/python-modules/djangorestframework-guardian2/default.nix b/pkgs/development/python-modules/djangorestframework-guardian2/default.nix deleted file mode 100644 index 25081535d2f0..000000000000 --- a/pkgs/development/python-modules/djangorestframework-guardian2/default.nix +++ /dev/null @@ -1,46 +0,0 @@ -{ - lib, - buildPythonPackage, - fetchFromGitHub, - django-guardian, - djangorestframework, - setuptools, -}: - -buildPythonPackage rec { - pname = "djangorestframework-guardian2"; - version = "0.7.0"; - pyproject = true; - - src = fetchFromGitHub { - owner = "johnthagen"; - repo = "django-rest-framework-guardian2"; - tag = "v${version}"; - hash = "sha256-LrIhOoBWC3HttjAGbul4zof++OW35pGMyFGZzUpG1Tk="; - }; - - postPatch = '' - chmod +x manage.py - patchShebangs manage.py - ''; - - build-system = [ setuptools ]; - - dependencies = [ - django-guardian - djangorestframework - ]; - - checkPhase = '' - ./manage.py test - ''; - - pythonImportsCheck = [ "rest_framework_guardian" ]; - - meta = with lib; { - description = "Django-guardian support for Django REST Framework"; - homepage = "https://github.com/johnthagen/django-rest-framework-guardian2/"; - license = licenses.bsd3; - maintainers = with maintainers; [ e1mo ]; - }; -} diff --git a/pkgs/top-level/python-aliases.nix b/pkgs/top-level/python-aliases.nix index ca53096917a3..4204c244407c 100644 --- a/pkgs/top-level/python-aliases.nix +++ b/pkgs/top-level/python-aliases.nix @@ -188,6 +188,7 @@ mapAliases ({ distutils_extra = distutils-extra; # added 2023-10-12 digital-ocean = python-digitalocean; # addad 2024-04-12 dj-stripe = throw "dj-stripe has been removed because it is unused and broken"; # added 2025-07-21 + djangorestframework-guardian2 = throw "djangorestframework-guardian2 has been removed because djangorestframework-guardian is active again and the upstream project was archived"; # added 2025-08-22 djangorestframework-jwt = drf-jwt; # added 2021-07-20 django-allauth-2fa = throw "django-allauth-2fa was removed because it was unused and django-allauth now contains 2fa logic itself."; # added 2025-02-15 django-sampledatahelper = throw "django-sampledatahelper was removed because it is no longer compatible to latest Django version"; # added 2022-07-18 diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index cf11b8374764..682df8d127a9 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -4142,10 +4142,6 @@ self: super: with self; { callPackage ../development/python-modules/djangorestframework-guardian { }; - djangorestframework-guardian2 = - callPackage ../development/python-modules/djangorestframework-guardian2 - { }; - djangorestframework-jsonp = callPackage ../development/python-modules/djangorestframework-jsonp { }; djangorestframework-recursive =