diff --git a/pkgs/by-name/pr/pretix/package.nix b/pkgs/by-name/pr/pretix/package.nix index e94249197345..f9a700704847 100644 --- a/pkgs/by-name/pr/pretix/package.nix +++ b/pkgs/by-name/pr/pretix/package.nix @@ -16,7 +16,7 @@ let python = python312.override { self = python; packageOverrides = self: super: { - django = super.django_4; + django = super.django_5; django-oauth-toolkit = super.django-oauth-toolkit.overridePythonAttrs (oldAttrs: { version = "2.3.0"; @@ -25,6 +25,12 @@ let tag = "v${version}"; hash = "sha256-oGg5MD9p4PSUVkt5pGLwjAF4SHHf4Aqr+/3FsuFaybY="; }; + disabledTests = [ + # error message mismatch + "test_validation_failed_message" + # fails dns resolution + "test_response_when_auth_server_response_return_404" + ]; }); stripe = super.stripe.overridePythonAttrs rec { @@ -45,13 +51,13 @@ let }; pname = "pretix"; - version = "2026.2.0"; + version = "2026.3.0"; src = fetchFromGitHub { owner = "pretix"; repo = "pretix"; tag = "v${version}"; - hash = "sha256-S8HcCtTBTU9oU7X+XD6avSZVtlRkXeF7pIqnggqJRPs="; + hash = "sha256-D8i8wRdPak1L0D451WP7upr3yn+8SzG/0wuWD/EsemM="; }; npmDeps = buildNpmPackage { @@ -59,7 +65,7 @@ let inherit version src; sourceRoot = "${src.name}/src/pretix/static/npm_dir"; - npmDepsHash = "sha256-n4Gd4DKdP4b6LT34uy9aJDWcTz9okk4imq6vtw1cC+k="; + npmDepsHash = "sha256-+84WFNs0iPhMb4YIKfHYByYeFQHITyWeF5yIM8pvQSs="; dontBuild = true; @@ -96,7 +102,7 @@ python.pkgs.buildPythonApplication rec { "django-phonenumber-field" "dnspython" "drf_ujson2" - "importlib-metadata" + "importlib_metadata" "kombu" "markdown" "oauthlib" diff --git a/pkgs/by-name/pr/pretix/plugins/mollie/package.nix b/pkgs/by-name/pr/pretix/plugins/mollie/package.nix index 5b73897b6147..e48900a713c8 100644 --- a/pkgs/by-name/pr/pretix/plugins/mollie/package.nix +++ b/pkgs/by-name/pr/pretix/plugins/mollie/package.nix @@ -8,14 +8,14 @@ buildPythonPackage rec { pname = "pretix-mollie"; - version = "2.5.2"; + version = "2.5.3"; pyproject = true; src = fetchFromGitHub { owner = "pretix"; repo = "pretix-mollie"; tag = "v${version}"; - hash = "sha256-Q9cofG4etT8Lb/RZbOVkSYlN1ONS3vPGkE53ph92cLg="; + hash = "sha256-fWfevPhwpdHkpvuedf16b/f2QfHLy1/FAS3nVV4utwM="; }; build-system = [ diff --git a/pkgs/by-name/pr/pretix/plugins/passbook/package.nix b/pkgs/by-name/pr/pretix/plugins/passbook/package.nix index 540159166d9b..8cf87c5c4549 100644 --- a/pkgs/by-name/pr/pretix/plugins/passbook/package.nix +++ b/pkgs/by-name/pr/pretix/plugins/passbook/package.nix @@ -18,14 +18,14 @@ buildPythonPackage rec { pname = "pretix-passbook"; - version = "1.14.0"; + version = "1.14.1"; pyproject = true; src = fetchFromGitHub { owner = "pretix"; repo = "pretix-passbook"; rev = "v${version}"; - hash = "sha256-Qy9VQBhC6SvLqmQvf4nVFhHPRNYDn1W6eEdCOGbD0y8="; + hash = "sha256-cTXgDr845TGMGWr9bSaFvRPQ0GynXn3CVnZxcf96orc="; }; patches = [ diff --git a/pkgs/by-name/pr/pretix/plugins/payone/package.nix b/pkgs/by-name/pr/pretix/plugins/payone/package.nix index 02f4c23a4fd6..1d38c6c820b5 100644 --- a/pkgs/by-name/pr/pretix/plugins/payone/package.nix +++ b/pkgs/by-name/pr/pretix/plugins/payone/package.nix @@ -9,14 +9,14 @@ buildPythonPackage (finalAttrs: { pname = "pretix-payone"; - version = "1.4.1"; + version = "1.4.2"; pyproject = true; src = fetchFromGitHub { owner = "pretix"; repo = "pretix-payone"; rev = "v${finalAttrs.version}"; - hash = "sha256-8DXORej+OJ65l/KGcanavHU4rabK9qTSnRPbdCidkgQ="; + hash = "sha256-y1BO8Hz/pGKalURCbF3QJ49xn+L/sd8SWTGdCIl43yw="; }; build-system = [ diff --git a/pkgs/by-name/pr/pretix/plugins/worldlinedirect/package.nix b/pkgs/by-name/pr/pretix/plugins/worldlinedirect/package.nix index d2de73989ff0..2933279afd2f 100644 --- a/pkgs/by-name/pr/pretix/plugins/worldlinedirect/package.nix +++ b/pkgs/by-name/pr/pretix/plugins/worldlinedirect/package.nix @@ -9,14 +9,14 @@ buildPythonPackage rec { pname = "pretix-worldlinedirect"; - version = "1.1.0"; + version = "1.1.1"; pyproject = true; src = fetchFromGitHub { owner = "pretix"; repo = "pretix-worldlinedirect"; rev = "v${version}"; - hash = "sha256-ofDGbRYTA2GTnVexn0dE6Iftq6+MkigOXWVR4kPUJzY="; + hash = "sha256-SqXXnYetz52OFPKM61mANA71hrCEK7FgsdEoxskR5bk="; }; build-system = [ diff --git a/pkgs/by-name/pr/pretix/plugins/zugferd/package.nix b/pkgs/by-name/pr/pretix/plugins/zugferd/package.nix index 3380a91b0690..50d4dc179d88 100644 --- a/pkgs/by-name/pr/pretix/plugins/zugferd/package.nix +++ b/pkgs/by-name/pr/pretix/plugins/zugferd/package.nix @@ -11,14 +11,14 @@ buildPythonPackage rec { pname = "pretix-zugferd"; - version = "2.6.2"; + version = "2.6.3"; pyproject = true; src = fetchFromGitHub { owner = "pretix"; repo = "pretix-zugferd"; rev = "v${version}"; - hash = "sha256-C2Z/S3lEKmdi6fch/erjPc9evnKc69tBRTInXRgi24E="; + hash = "sha256-HE3L5VS0n1NL/jprcnMwaNriFKIN1pogPM2cDw2ZPdk="; }; postPatch = '' diff --git a/pkgs/development/python-modules/bcrypt/default.nix b/pkgs/development/python-modules/bcrypt/default.nix index b50cb3faef22..464986863266 100644 --- a/pkgs/development/python-modules/bcrypt/default.nix +++ b/pkgs/development/python-modules/bcrypt/default.nix @@ -10,7 +10,7 @@ pytestCheckHook, # for passthru.tests asyncssh, - django_4, + django, fastapi, paramiko, twisted, @@ -57,7 +57,7 @@ buildPythonPackage rec { passthru.tests = { inherit asyncssh - django_4 + django fastapi paramiko twisted diff --git a/pkgs/development/python-modules/django-statici18n/default.nix b/pkgs/development/python-modules/django-statici18n/default.nix index 8a08d2e2f544..d94b1d1c4cab 100644 --- a/pkgs/development/python-modules/django-statici18n/default.nix +++ b/pkgs/development/python-modules/django-statici18n/default.nix @@ -17,14 +17,14 @@ buildPythonPackage rec { pname = "django-statici18n"; - version = "2.6.0"; + version = "2.7.1"; pyproject = true; src = fetchFromGitHub { owner = "zyegfryed"; repo = "django-statici18n"; tag = "v${version}"; - hash = "sha256-G1JF/AQEDgvDamvjCYiQM7b6HfbdMBhfEUvT3yL1io0="; + hash = "sha256-e6sCH/9h+Ki96hfG4ftuLo34HfZbwImThi9YxmZOmRc="; }; build-system = [ setuptools ]; diff --git a/pkgs/development/python-modules/django/4.nix b/pkgs/development/python-modules/django/4.nix deleted file mode 100644 index 69127fd6767f..000000000000 --- a/pkgs/development/python-modules/django/4.nix +++ /dev/null @@ -1,174 +0,0 @@ -{ - lib, - stdenv, - buildPythonPackage, - fetchFromGitHub, - fetchpatch, - pythonAtLeast, - replaceVars, - - # build - setuptools, - - # patched in - geos, - gdal, - withGdal ? false, - - # propagates - asgiref, - sqlparse, - - # extras - argon2-cffi, - bcrypt, - - # tests - aiosmtpd, - docutils, - geoip2, - jinja2, - numpy, - pillow, - pylibmc, - pymemcache, - python, - pywatchman, - pyyaml, - pytz, - redis, - selenium, - tblib, - tzdata, -}: - -buildPythonPackage rec { - pname = "django"; - version = "4.2.29"; - pyproject = true; - - disabled = pythonAtLeast "3.13"; - - src = fetchFromGitHub { - owner = "django"; - repo = "django"; - tag = version; - hash = "sha256-30OcLxtACSxLJ1jT+k7fmM8CyMyleXSPc+l7/3JZKzI="; - }; - - patches = [ - (replaceVars ./django_4_set_zoneinfo_dir.patch { - zoneinfo = tzdata + "/share/zoneinfo"; - }) - # make sure the tests don't remove packages from our pythonpath - # and disable failing tests - ./django_4_tests.patch - - # fix filename length limit tests on bcachefs - # FIXME: remove if ever backported - (fetchpatch { - url = "https://github.com/django/django/commit/12f4f95405c7857cbf2f4bf4d0261154aac31676.patch"; - hash = "sha256-+K20/V8sh036Ox9U7CSPgfxue7f28Sdhr3MsB7erVOk="; - }) - - # backport fix for https://code.djangoproject.com/ticket/36056 - # FIXME: remove if ever backported upstream - (fetchpatch { - url = "https://github.com/django/django/commit/ec0e784f91b551c654f0962431cc31091926792d.patch"; - includes = [ "django/*" ]; # tests don't apply - hash = "sha256-8YwdOBNJq6+GNoxzdLyN9HEEIWRXGQk9YbyfPwYVkwU="; - }) - - ] - ++ lib.optionals withGdal [ - (replaceVars ./django_4_set_geos_gdal_lib.patch { - geos = geos; - gdal = gdal; - extension = stdenv.hostPlatform.extensions.sharedLibrary; - }) - ]; - - postPatch = '' - substituteInPlace tests/utils_tests/test_autoreload.py \ - --replace "/usr/bin/python" "${python.interpreter}" - '' - + lib.optionalString (pythonAtLeast "3.12" && stdenv.hostPlatform.system == "aarch64-linux") '' - # Test regression after xz was reverted from 5.6.0 to 5.4.6 - # https://hydra.nixos.org/build/254630990 - substituteInPlace tests/view_tests/tests/test_debug.py \ - --replace-fail "test_files" "dont_test_files" - '' - + lib.optionalString (pythonAtLeast "3.13") '' - # Fixed CommandTypes.test_help_default_options_with_custom_arguments test on Python 3.13+. - # https://github.com/django/django/commit/3426a5c33c36266af42128ee9eca4921e68ea876 - substituteInPlace tests/admin_scripts/tests.py --replace-fail \ - "test_help_default_options_with_custom_arguments" \ - "dont_test_help_default_options_with_custom_arguments" - ''; - - nativeBuildInputs = [ setuptools ]; - - propagatedBuildInputs = [ - asgiref - sqlparse - ]; - - optional-dependencies = { - argon2 = [ argon2-cffi ]; - bcrypt = [ bcrypt ]; - }; - - nativeCheckInputs = [ - # tests/requirements/py3.txt - aiosmtpd - docutils - geoip2 - jinja2 - numpy - pillow - pylibmc - pymemcache - pywatchman - pyyaml - pytz - redis - selenium - tblib - tzdata - ] - ++ lib.concatAttrValues optional-dependencies; - - doCheck = - !stdenv.hostPlatform.isDarwin - # pywatchman depends on folly which does not support 32bits - && !stdenv.hostPlatform.is32bit; - - preCheck = '' - # make sure the installed library gets imported - rm -rf django - - # provide timezone data, works only on linux - export TZDIR=${tzdata}/${python.sitePackages}/tzdata/zoneinfo - ''; - - checkPhase = '' - runHook preCheck - - pushd tests - ${python.interpreter} runtests.py --settings=test_sqlite - popd - - runHook postCheck - ''; - - __darwinAllowLocalNetworking = true; - - meta = { - changelog = "https://docs.djangoproject.com/en/${lib.versions.majorMinor version}/releases/${version}/"; - description = "High-level Python Web framework that encourages rapid development and clean, pragmatic design"; - mainProgram = "django-admin"; - homepage = "https://www.djangoproject.com"; - license = lib.licenses.bsd3; - maintainers = with lib.maintainers; [ hexa ]; - }; -} diff --git a/pkgs/development/python-modules/django/django_4_set_geos_gdal_lib.patch b/pkgs/development/python-modules/django/django_4_set_geos_gdal_lib.patch deleted file mode 100644 index b3da31f1e109..000000000000 --- a/pkgs/development/python-modules/django/django_4_set_geos_gdal_lib.patch +++ /dev/null @@ -1,26 +0,0 @@ -diff --git a/django/contrib/gis/gdal/libgdal.py b/django/contrib/gis/gdal/libgdal.py -index 05b5732..91fafee 100644 ---- a/django/contrib/gis/gdal/libgdal.py -+++ b/django/contrib/gis/gdal/libgdal.py -@@ -14,7 +14,7 @@ try: - 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 --git a/django/contrib/gis/geos/libgeos.py b/django/contrib/gis/geos/libgeos.py -index 2cdb5d3..fac2d04 100644 ---- a/django/contrib/gis/geos/libgeos.py -+++ b/django/contrib/gis/geos/libgeos.py -@@ -24,7 +24,7 @@ def load_geos(): - from django.conf import settings - lib_path = settings.GEOS_LIBRARY_PATH - except (AttributeError, ImportError, ImproperlyConfigured, OSError): -- lib_path = None -+ lib_path = "@geos@/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_4_set_zoneinfo_dir.patch b/pkgs/development/python-modules/django/django_4_set_zoneinfo_dir.patch deleted file mode 100644 index d9848772b85a..000000000000 --- a/pkgs/development/python-modules/django/django_4_set_zoneinfo_dir.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/django/conf/__init__.py b/django/conf/__init__.py -index cb70a71791..5156f7dd73 100644 ---- a/django/conf/__init__.py -+++ b/django/conf/__init__.py -@@ -227,7 +227,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/development/python-modules/django/django_4_tests.patch b/pkgs/development/python-modules/django/django_4_tests.patch deleted file mode 100644 index 689e1ed652a8..000000000000 --- a/pkgs/development/python-modules/django/django_4_tests.patch +++ /dev/null @@ -1,51 +0,0 @@ -diff --git a/tests/admin_scripts/tests.py b/tests/admin_scripts/tests.py -index 6d67c2931a..0c1f407f88 100644 ---- a/tests/admin_scripts/tests.py -+++ b/tests/admin_scripts/tests.py -@@ -127,6 +127,7 @@ class AdminScriptTestCase(SimpleTestCase): - del test_environ["DJANGO_SETTINGS_MODULE"] - python_path = [base_dir, django_dir, tests_dir] - python_path.extend(ext_backend_base_dirs) -+ python_path.extend(sys.path) - test_environ["PYTHONPATH"] = os.pathsep.join(python_path) - test_environ["PYTHONWARNINGS"] = "" - -diff --git a/tests/auth_tests/test_hashers.py b/tests/auth_tests/test_hashers.py -index 36f22d5f09..6cc6888980 100644 ---- a/tests/auth_tests/test_hashers.py -+++ b/tests/auth_tests/test_hashers.py -@@ -1,4 +1,4 @@ --from unittest import mock, skipUnless -+from unittest import mock, skipUnless, skip - - from django.conf.global_settings import PASSWORD_HASHERS - from django.contrib.auth.hashers import ( -@@ -241,6 +241,7 @@ class TestUtilsHashPass(SimpleTestCase): - - @ignore_warnings(category=RemovedInDjango50Warning) - @skipUnless(crypt, "no crypt module to generate password.") -+ @skip("Legacy crypt algorithms are unsupported in nixpkgs") - @override_settings( - PASSWORD_HASHERS=["django.contrib.auth.hashers.CryptPasswordHasher"] - ) -diff --git a/tests/settings_tests/tests.py b/tests/settings_tests/tests.py -index 62cbffbee9..2f0ec718f8 100644 ---- a/tests/settings_tests/tests.py -+++ b/tests/settings_tests/tests.py -@@ -2,7 +2,7 @@ import os - import sys - import unittest - from types import ModuleType, SimpleNamespace --from unittest import mock -+from unittest import mock, skip - - from django.conf import ( - ENVIRONMENT_VARIABLE, -@@ -342,6 +342,7 @@ class SettingsTests(SimpleTestCase): - getattr(s, "foo") - - @requires_tz_support -+ @skip("Assertion fails, exception does not get raised") - @mock.patch("django.conf.global_settings.TIME_ZONE", "test") - def test_incorrect_timezone(self): - with self.assertRaisesMessage(ValueError, "Incorrect timezone setting: test"): diff --git a/pkgs/development/python-modules/sqlparse/default.nix b/pkgs/development/python-modules/sqlparse/default.nix index 652813e38ae4..20086d0bb43e 100644 --- a/pkgs/development/python-modules/sqlparse/default.nix +++ b/pkgs/development/python-modules/sqlparse/default.nix @@ -8,7 +8,6 @@ # for passthru.tests django, - django_4, django-silk, pgadmin4, }: @@ -36,7 +35,6 @@ buildPythonPackage rec { passthru.tests = { inherit django - django_4 django-silk pgadmin4 ; diff --git a/pkgs/top-level/python-aliases.nix b/pkgs/top-level/python-aliases.nix index 223f597fd1d0..3f7af9295e62 100644 --- a/pkgs/top-level/python-aliases.nix +++ b/pkgs/top-level/python-aliases.nix @@ -152,6 +152,7 @@ mapAliases { django-crispy-bootstrap5 = crispy-bootstrap5; # added 2025-06-11 django-modelsearch = modelsearch; # added 2026-03-02 django_3 = throw "Django 3 has reached it's EOL in 2024-04 and has therefore been removed."; # added 2025-01-25 + django_4 = throw "Django 4 has reached it's EOL in 2026-04 and has therefore been removed."; # added 2026-03-30 django_5_1 = throw "Django 5.1 has reached it's EOL in 2025-12 and has therefore been removed."; # added 2025-11-30" django_5_2 = django_5; # added 2026-01-18 django_appconf = throw "'django_appconf' has been renamed to/replaced by 'django-appconf'"; # Converted to throw 2025-10-29 diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index b667a6235c6c..115f36295c15 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -4443,8 +4443,6 @@ self: super: with self; { { }; # LTS in extended support phase - django_4 = callPackage ../development/python-modules/django/4.nix { }; - django_5 = callPackage ../development/python-modules/django/5.nix { }; django_6 = callPackage ../development/python-modules/django/6.nix { };