From 80b973067eaa3e118b56617352b3a48592b9d210 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sat, 9 Aug 2025 12:33:43 +0200 Subject: [PATCH 1/3] python313Packages.django-stubs-ext: 5.2.0 -> 5.2.2 Changelog: https://github.com/typeddjango/django-stubs/releases/tag/5.2.2 --- .../python-modules/django-stubs-ext/default.nix | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/pkgs/development/python-modules/django-stubs-ext/default.nix b/pkgs/development/python-modules/django-stubs-ext/default.nix index 40464d29fcff..c0c9b8d8a706 100644 --- a/pkgs/development/python-modules/django-stubs-ext/default.nix +++ b/pkgs/development/python-modules/django-stubs-ext/default.nix @@ -7,13 +7,13 @@ pytestCheckHook, pythonOlder, redis, - setuptools, + hatchling, typing-extensions, }: buildPythonPackage rec { pname = "django-stubs-ext"; - version = "5.2.0"; + version = "5.2.2"; pyproject = true; disabled = pythonOlder "3.10"; @@ -21,10 +21,10 @@ buildPythonPackage rec { src = fetchPypi { pname = "django_stubs_ext"; inherit version; - hash = "sha256-AMSuMHtTj1ZDr3YakUw/jk4/JfTnxtcJjxkGwNjyqsk="; + hash = "sha256-2dFRuRn+JDh2D1vZOPA+HLCMhNBlH55ZF/ExOQfkJoM="; }; - build-system = [ setuptools ]; + build-system = [ hatchling ]; dependencies = [ django @@ -36,7 +36,8 @@ buildPythonPackage rec { oracle = [ oracledb ]; }; - nativeCheckInputs = [ pytestCheckHook ]; + # Tests are not shipped with PyPI + doCheck = false; pythonImportsCheck = [ "django_stubs_ext" ]; From f0aabe9a10071e21e542c76f846da40c6fa243af Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sat, 9 Aug 2025 15:03:25 +0200 Subject: [PATCH 2/3] python313Packages.django-stubs: 5.2.0 -> 5.2.2 Changelog: https://github.com/typeddjango/django-stubs/releases/tag/5.2.2 --- .../python-modules/django-stubs/default.nix | 46 +++++++++++++------ 1 file changed, 31 insertions(+), 15 deletions(-) diff --git a/pkgs/development/python-modules/django-stubs/default.nix b/pkgs/development/python-modules/django-stubs/default.nix index bc7897dd6ba9..1bc25588fcd8 100644 --- a/pkgs/development/python-modules/django-stubs/default.nix +++ b/pkgs/development/python-modules/django-stubs/default.nix @@ -1,38 +1,38 @@ { lib, buildPythonPackage, - django, django-stubs-ext, - fetchPypi, + django, + fetchFromGitHub, + hatchling, mypy, + oracledb, pytestCheckHook, + pytest-mypy-plugins, pythonOlder, - setuptools, + redis, tomli, types-pytz, types-pyyaml, + types-redis, typing-extensions, }: buildPythonPackage rec { pname = "django-stubs"; - version = "5.2.0"; + version = "5.2.2"; pyproject = true; - disabled = pythonOlder "3.8"; + disabled = pythonOlder "3.10"; - src = fetchPypi { - pname = "django_stubs"; - inherit version; - hash = "sha256-B+JcLTy/9b5UAif/N3GcyJ8hXfqqpesDinWwG7+7JyI="; + src = fetchFromGitHub { + owner = "typeddjango"; + repo = "django-stubs"; + tag = version; + hash = "sha256-kF5g0/rkMQxYTfSrTqzZ6BuqGlE42K/AVhc1/ARc+/c="; }; - postPatch = '' - substituteInPlace pyproject.toml \ - --replace-fail "setuptools<79.0.0" setuptools - ''; - - build-system = [ setuptools ]; + build-system = [ hatchling ]; dependencies = [ django @@ -45,15 +45,31 @@ buildPythonPackage rec { optional-dependencies = { compatible-mypy = [ mypy ]; + oracle = [ oracledb ]; + redis = [ + redis + types-redis + ]; }; nativeCheckInputs = [ + pytest-mypy-plugins pytestCheckHook ] ++ lib.flatten (builtins.attrValues optional-dependencies); pythonImportsCheck = [ "django-stubs" ]; + disabledTests = [ + # AttributeError: module 'django.contrib.auth.forms' has no attribute + "test_find_classes_inheriting_from_generic" + ]; + + disabledTestPaths = [ + # Skip type checking + "tests/typecheck/" + ]; + meta = with lib; { description = "PEP-484 stubs for Django"; homepage = "https://github.com/typeddjango/django-stubs"; From 359e3ac531f1efe1d62489feba77c362d238bc9e Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sat, 9 Aug 2025 15:03:53 +0200 Subject: [PATCH 3/3] python313Packages.djangorestframework-stubs: 3.16.0 -> 3.16.1 Changelog: https://github.com/typeddjango/djangorestframework-stubs/releases/tag/3.16.1 --- .../djangorestframework-stubs/default.nix | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/pkgs/development/python-modules/djangorestframework-stubs/default.nix b/pkgs/development/python-modules/djangorestframework-stubs/default.nix index b0434f169f43..f78eba4dc99f 100644 --- a/pkgs/development/python-modules/djangorestframework-stubs/default.nix +++ b/pkgs/development/python-modules/djangorestframework-stubs/default.nix @@ -19,21 +19,26 @@ buildPythonPackage rec { pname = "djangorestframework-stubs"; - version = "3.16.0"; + version = "3.16.1"; pyproject = true; - disabled = pythonOlder "3.9"; + disabled = pythonOlder "3.10"; src = fetchFromGitHub { owner = "typeddjango"; repo = "djangorestframework-stubs"; tag = version; - hash = "sha256-q/9tCMT79TMHIQ4KH8tiunaTt7L6IItwNYBFlbNxBcE="; + hash = "sha256-TTv6v7G3LODrUDSYSNNa4+dujih7QElmvK3mMQg9EuQ="; }; - nativeBuildInputs = [ setuptools ]; + postPatch = '' + substituteInPlace pyproject.toml \ + --replace-fail "<79.0.0" "" + ''; - propagatedBuildInputs = [ + build-system = [ setuptools ]; + + dependencies = [ django-stubs requests types-pyyaml @@ -54,7 +59,7 @@ buildPythonPackage rec { ] ++ lib.flatten (builtins.attrValues optional-dependencies); - # Upstream recommends mypy > 1.7 which we don't have yet, thus all testsare failing with 3.14.5 and below + # Upstream recommends mypy > 1.7 which we don't have yet, thus all tests are failing with 3.14.5 and below doCheck = false; pythonImportsCheck = [ "rest_framework-stubs" ];