Unverified Commit 1094ca55 authored by Minijackson's avatar Minijackson
Browse files

python3Packages.djangorestframework: disable pytz when django >= 5

The use of pytz is deprecated for Django >= 4
and removed for Django >= 5.
Building djangorestframework with django_5 and pytz caused test failures.

And add pytz back in django-timezone-field as native check input
parent 130e852f
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -7,6 +7,7 @@
  djangorestframework,
  pytestCheckHook,
  pytest-django,
  pytz,
}:

buildPythonPackage rec {
@@ -29,6 +30,7 @@ buildPythonPackage rec {
    djangorestframework
    pytestCheckHook
    pytest-django
    pytz
  ];

  env.DJANGO_SETTINGS_MODULE = "tests.settings";
+2 −0
Original line number Diff line number Diff line
@@ -9,6 +9,7 @@
  pytestCheckHook,
  pytest-django,
  pytest-lazy-fixture,
  pytz,
}:

buildPythonPackage rec {
@@ -43,6 +44,7 @@ buildPythonPackage rec {
    pytestCheckHook
    pytest-django
    pytest-lazy-fixture
    pytz
  ];

  meta = with lib; {
+2 −7
Original line number Diff line number Diff line
@@ -35,14 +35,9 @@ buildPythonPackage rec {
    hash = "sha256-G914NvxRmKGkxrozoWNUIoI74YkYRbeNcQwIG4iSeXU=";
  };

  build-system = [
    setuptools
  ];
  build-system = [ setuptools ];

  dependencies = [
    django
    pytz
  ];
  dependencies = [ django ] ++ (lib.optional (lib.versionOlder django.version "5.0.0") pytz);

  nativeCheckInputs = [
    pytest-django