From f699824f6e0525ec3873fefa557ee49a18478ed4 Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Tue, 25 Jul 2023 22:14:59 +0200 Subject: [PATCH] python310Packages.django: migrate to django_4 3.2 LTS ran out of mainstream support in 2021/12 and we should probably stay on the latest LTS release, that receives mainstream support. --- nixos/doc/manual/release-notes/rl-2311.section.md | 12 ++++++++++++ pkgs/top-level/python-packages.nix | 7 +++---- 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/nixos/doc/manual/release-notes/rl-2311.section.md b/nixos/doc/manual/release-notes/rl-2311.section.md index 80b2066582a3..3d82c4a7beb8 100644 --- a/nixos/doc/manual/release-notes/rl-2311.section.md +++ b/nixos/doc/manual/release-notes/rl-2311.section.md @@ -158,6 +158,18 @@ The module update takes care of the new config syntax and the data itself (user ## Nixpkgs internals {#sec-release-23.11-nixpkgs-internals} +- The `django` alias in the python package set was upgraded to Django 4.x. + Applications that consume Django should always pin their python environment + to a compatible major version, so they can move at their own pace. + + ```nix + python = python3.override { + packageOverrides = self: super: { + django = super.django_3; + }; + }; + ``` + - The `qemu-vm.nix` module by default now identifies block devices via persistent names available in `/dev/disk/by-*`. Because the rootDevice is identfied by its filesystem label, it needs to be formatted before the VM is diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 83b45cde21b3..cda5a120314a 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -2727,12 +2727,11 @@ self: super: with self; { distutils_extra = callPackage ../development/python-modules/distutils_extra { }; - django = self.django_3; - - # Current LTS + # LTS in extended support phase django_3 = callPackage ../development/python-modules/django/3.nix { }; - # Current latest + # LTS with mainsteam support + django = self.django_4; django_4 = callPackage ../development/python-modules/django/4.nix { }; django-admin-datta = callPackage ../development/python-modules/django-admin-datta { };