diff --git a/pkgs/development/python-modules/django/3.nix b/pkgs/development/python-modules/django/3.nix deleted file mode 100644 index d05e8bc7a565..000000000000 --- a/pkgs/development/python-modules/django/3.nix +++ /dev/null @@ -1,63 +0,0 @@ -{ - lib, - stdenv, - buildPythonPackage, - fetchPypi, - replaceVars, - geos_3_9, - gdal, - asgiref, - pytz, - sqlparse, - tzdata, - pythonOlder, - withGdal ? false, -}: - -buildPythonPackage rec { - pname = "django"; - version = "3.2.25"; - format = "setuptools"; - - disabled = pythonOlder "3.7"; - - src = fetchPypi { - pname = "Django"; - inherit version; - hash = "sha256-fKOKeGVK7nI3hZTWPlFjbAS44oV09VBd/2MIlbVHJ3c="; - }; - - patches = [ - (replaceVars ./django_3_set_zoneinfo_dir.patch { - zoneinfo = tzdata + "/share/zoneinfo"; - }) - ] - ++ lib.optional withGdal ( - replaceVars ./django_3_set_geos_gdal_lib.patch { - inherit geos_3_9; - inherit gdal; - extension = stdenv.hostPlatform.extensions.sharedLibrary; - } - ); - - propagatedBuildInputs = [ - asgiref - pytz - sqlparse - ]; - - # too complicated to setup - doCheck = false; - - pythonImportsCheck = [ "django" ]; - - meta = with lib; { - description = "High-level Python Web framework"; - homepage = "https://www.djangoproject.com/"; - license = licenses.bsd3; - maintainers = with maintainers; [ georgewhewell ]; - knownVulnerabilities = [ - "Support for Django 3.2 ended on 2024-04-01, see https://www.djangoproject.com/download/#supported-versions." - ]; - }; -} diff --git a/pkgs/development/python-modules/django/django_3_set_geos_gdal_lib.patch b/pkgs/development/python-modules/django/django_3_set_geos_gdal_lib.patch deleted file mode 100644 index a7dfa086a0a7..000000000000 --- a/pkgs/development/python-modules/django/django_3_set_geos_gdal_lib.patch +++ /dev/null @@ -1,24 +0,0 @@ -diff -Nur a/django/contrib/gis/gdal/libgdal.py b/django/contrib/gis/gdal/libgdal.py ---- a/django/contrib/gis/gdal/libgdal.py 2020-07-09 22:34:05.330568948 +0100 -+++ b/django/contrib/gis/gdal/libgdal.py 2020-07-09 22:35:08.679095615 +0100 -@@ -14,7 +14,7 @@ - from django.conf import settings - lib_path = settings.GDAL_LIBRARY_PATH - except (AttributeError, ImportError, ImproperlyConfigured, OSError): -- lib_path = None -+ lib_path = "@gdal@/lib/libgdal@extension@" - - if lib_path: - lib_names = None -diff -Nur a/django/contrib/gis/geos/libgeos.py b/django/contrib/gis/geos/libgeos.py ---- a/django/contrib/gis/geos/libgeos.py 2020-07-09 22:34:05.331568941 +0100 -+++ b/django/contrib/gis/geos/libgeos.py 2020-07-09 22:36:24.863526276 +0100 -@@ -24,7 +24,7 @@ - from django.conf import settings - lib_path = settings.GEOS_LIBRARY_PATH - except (AttributeError, ImportError, ImproperlyConfigured, OSError): -- lib_path = None -+ lib_path = "@geos_3_9@/lib/libgeos_c@extension@" - - # Setting the appropriate names for the GEOS-C library. - if lib_path: diff --git a/pkgs/development/python-modules/django/django_3_set_zoneinfo_dir.patch b/pkgs/development/python-modules/django/django_3_set_zoneinfo_dir.patch deleted file mode 100644 index 69ad1c85d80c..000000000000 --- a/pkgs/development/python-modules/django/django_3_set_zoneinfo_dir.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/django/conf/__init__.py b/django/conf/__init__.py -index 28302440c7..278cfa5e62 100644 ---- a/django/conf/__init__.py -+++ b/django/conf/__init__.py -@@ -200,7 +200,7 @@ class Settings: - if hasattr(time, 'tzset') and self.TIME_ZONE: - # When we can, attempt to validate the timezone. If we can't find - # this file, no check happens and it's harmless. -- zoneinfo_root = Path('/usr/share/zoneinfo') -+ zoneinfo_root = Path('@zoneinfo@') - zone_info_file = zoneinfo_root.joinpath(*self.TIME_ZONE.split('/')) - if zoneinfo_root.exists() and not zone_info_file.exists(): - raise ValueError("Incorrect timezone setting: %s" % self.TIME_ZONE) diff --git a/pkgs/top-level/python-aliases.nix b/pkgs/top-level/python-aliases.nix index 49ff85cf8eda..307b307774ff 100644 --- a/pkgs/top-level/python-aliases.nix +++ b/pkgs/top-level/python-aliases.nix @@ -192,6 +192,7 @@ mapAliases ({ 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 django_2 = throw "Django 2 has reached it's projected EOL in 2022/04 and has therefore been removed."; # added 2022-03-05 + django_3 = throw "Django 3 has reached it#s EOL in 2024-04 and has therefore been removed."; # added 2025-01-25 django_appconf = django-appconf; # added 2022-03-03 django_classytags = django-classy-tags; # added 2023-07-25 django_colorful = django-colorful; # added 2023-07-25 diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 07e504489530..23323d8d82ea 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -4082,8 +4082,6 @@ self: super: with self; { django-widget-tweaks = callPackage ../development/python-modules/django-widget-tweaks { }; # LTS in extended support phase - django_3 = callPackage ../development/python-modules/django/3.nix { }; - django_4 = callPackage ../development/python-modules/django/4.nix { }; django_5 = self.django_5_2;