diff --git a/pkgs/development/python-modules/django-compat/default.nix b/pkgs/development/python-modules/django-compat/default.nix deleted file mode 100644 index d33a4be2817f..000000000000 --- a/pkgs/development/python-modules/django-compat/default.nix +++ /dev/null @@ -1,42 +0,0 @@ -{ lib, buildPythonPackage, fetchFromGitHub, python, - django, six -}: - -buildPythonPackage rec { - pname = "django-compat"; - version = "1.0.15"; - - # the pypi packages don't include everything required for the tests - src = fetchFromGitHub { - owner = "arteria"; - repo = "django-compat"; - rev = "v${version}"; - sha256 = "1pr6v38ahrsvxlgmcx69s4b5q5082f44gzi4h3c32sccdc4pwqxp"; - }; - - patches = [ - ./fix-tests.diff - ]; - - checkPhase = '' - runHook preCheck - - # to convince the tests to run against the installed package, not the source directory, we extract the - # tests directory from it then dispose of the actual source - mv compat/tests . - rm -r compat - substituteInPlace runtests.py --replace compat.tests tests - ${python.interpreter} runtests.py - - runHook postCheck - ''; - - propagatedBuildInputs = [ django six ]; - - meta = with lib; { - description = "Forward and backwards compatibility layer for Django 1.4, 1.7, 1.8, 1.9, 1.10 and 1.11"; - homepage = "https://github.com/arteria/django-compat"; - license = licenses.mit; - maintainers = with maintainers; [ ris ]; - }; -} diff --git a/pkgs/development/python-modules/django-compat/fix-tests.diff b/pkgs/development/python-modules/django-compat/fix-tests.diff deleted file mode 100644 index 58165db96a87..000000000000 --- a/pkgs/development/python-modules/django-compat/fix-tests.diff +++ /dev/null @@ -1,56 +0,0 @@ -diff -ur a/compat/tests/settings.py b/compat/tests/settings.py ---- a/compat/tests/settings.py 2020-03-06 15:32:07.548482597 +0100 -+++ b/compat/tests/settings.py 2020-03-06 22:19:25.422934249 +0100 -@@ -16,11 +16,12 @@ - 'django.contrib.admin', - 'django.contrib.auth', - 'django.contrib.contenttypes', -+ 'django.contrib.messages', - 'compat', - 'compat.tests.test_app', - ] - --MIDDLEWARE_CLASSES = ( -+MIDDLEWARE = ( - 'django.contrib.sessions.middleware.SessionMiddleware', - 'django.middleware.common.CommonMiddleware', - 'django.middleware.csrf.CsrfViewMiddleware', -@@ -43,6 +44,7 @@ - 'django.template.context_processors.i18n', - 'django.template.context_processors.tz', - 'django.template.context_processors.request', -+ 'django.contrib.messages.context_processors.messages', - ], - 'loaders': [ - 'django.template.loaders.filesystem.Loader', -diff -ur a/compat/tests/test_compat.py b/compat/tests/test_compat.py ---- a/compat/tests/test_compat.py 2020-03-06 15:32:07.548482597 +0100 -+++ b/compat/tests/test_compat.py 2020-03-06 15:37:39.202835075 +0100 -@@ -9,7 +9,7 @@ - from django.core.serializers.json import DjangoJSONEncoder - from django.test import TestCase, SimpleTestCase - from django.test.client import RequestFactory --from django.contrib.auth.views import logout -+from django.contrib.auth.views import auth_logout - try: - from django.urls import NoReverseMatch - except ImportError: -@@ -103,7 +103,7 @@ - Tests that passing a view name to ``resolve_url`` will result in the - URL path mapping to that view name. - """ -- resolved_url = resolve_url(logout) -+ resolved_url = resolve_url(auth_logout) - self.assertEqual('/accounts/logout/', resolved_url) - - ''' -diff -ur a/compat/tests/urls.py b/compat/tests/urls.py ---- a/compat/tests/urls.py 2020-03-06 15:32:07.548482597 +0100 -+++ b/compat/tests/urls.py 2020-03-06 15:34:25.962377799 +0100 -@@ -2,5 +2,5 @@ - from django.contrib.auth import views - - urlpatterns = [ -- url(r'^accounts/logout/$', views.logout, name='logout'), -+ url(r'^accounts/logout/$', views.auth_logout, name='logout'), - ] diff --git a/pkgs/development/python-modules/django-hijack/default.nix b/pkgs/development/python-modules/django-hijack/default.nix index 18ef2e3ace79..ef77abefeeae 100644 --- a/pkgs/development/python-modules/django-hijack/default.nix +++ b/pkgs/development/python-modules/django-hijack/default.nix @@ -11,7 +11,6 @@ # dependencies , django -, django-compat # tests , pytest-django @@ -54,7 +53,6 @@ buildPythonPackage rec { propagatedBuildInputs = [ django - django-compat ]; nativeCheckInputs = [ diff --git a/pkgs/top-level/python-aliases.nix b/pkgs/top-level/python-aliases.nix index a6ef2838bcb6..87ea55ac064e 100644 --- a/pkgs/top-level/python-aliases.nix +++ b/pkgs/top-level/python-aliases.nix @@ -93,6 +93,7 @@ mapAliases ({ django_classytags = django-classy-tags; # added 2023-07-25 django_colorful = django-colorful; # added 2023-07-25 django_compat = django-compat; # added 2023-07-25 + django-compat = throw "django-compat has been removed. It provided forward/backport compat for django 1.x, which is long end of life."; # added 2023-07-26 django_contrib_comments = django-contrib-comments; # added 2023-07-25 django-discover-runner = throw "django-discover-runner was removed because it is no longer maintained."; # added 2022-11-21 django_environ = django-environ; # added 2021-12-25 diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index cda5a120314a..b600ade3f23c 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -2774,8 +2774,6 @@ self: super: with self; { django-colorful = callPackage ../development/python-modules/django-colorful { }; - django-compat = callPackage ../development/python-modules/django-compat { }; - django-compressor = callPackage ../development/python-modules/django-compressor { }; django-compression-middleware = callPackage ../development/python-modules/django-compression-middleware { };