python313Packages.django-stubs-ext: 5.2.0 -> 5.2.2, python313Packages.django-stubs: 5.2.0 -> 5.2.2, python313Packages.djangorestframework-stubs: 3.16.0 -> 3.16.1 (#432253)

This commit is contained in:
Fabian Affolter
2025-08-10 10:40:49 +02:00
committed by GitHub
3 changed files with 48 additions and 26 deletions

View File

@@ -7,13 +7,13 @@
pytestCheckHook, pytestCheckHook,
pythonOlder, pythonOlder,
redis, redis,
setuptools, hatchling,
typing-extensions, typing-extensions,
}: }:
buildPythonPackage rec { buildPythonPackage rec {
pname = "django-stubs-ext"; pname = "django-stubs-ext";
version = "5.2.0"; version = "5.2.2";
pyproject = true; pyproject = true;
disabled = pythonOlder "3.10"; disabled = pythonOlder "3.10";
@@ -21,10 +21,10 @@ buildPythonPackage rec {
src = fetchPypi { src = fetchPypi {
pname = "django_stubs_ext"; pname = "django_stubs_ext";
inherit version; inherit version;
hash = "sha256-AMSuMHtTj1ZDr3YakUw/jk4/JfTnxtcJjxkGwNjyqsk="; hash = "sha256-2dFRuRn+JDh2D1vZOPA+HLCMhNBlH55ZF/ExOQfkJoM=";
}; };
build-system = [ setuptools ]; build-system = [ hatchling ];
dependencies = [ dependencies = [
django django
@@ -36,7 +36,8 @@ buildPythonPackage rec {
oracle = [ oracledb ]; oracle = [ oracledb ];
}; };
nativeCheckInputs = [ pytestCheckHook ]; # Tests are not shipped with PyPI
doCheck = false;
pythonImportsCheck = [ "django_stubs_ext" ]; pythonImportsCheck = [ "django_stubs_ext" ];

View File

@@ -1,38 +1,38 @@
{ {
lib, lib,
buildPythonPackage, buildPythonPackage,
django,
django-stubs-ext, django-stubs-ext,
fetchPypi, django,
fetchFromGitHub,
hatchling,
mypy, mypy,
oracledb,
pytestCheckHook, pytestCheckHook,
pytest-mypy-plugins,
pythonOlder, pythonOlder,
setuptools, redis,
tomli, tomli,
types-pytz, types-pytz,
types-pyyaml, types-pyyaml,
types-redis,
typing-extensions, typing-extensions,
}: }:
buildPythonPackage rec { buildPythonPackage rec {
pname = "django-stubs"; pname = "django-stubs";
version = "5.2.0"; version = "5.2.2";
pyproject = true; pyproject = true;
disabled = pythonOlder "3.8"; disabled = pythonOlder "3.10";
src = fetchPypi { src = fetchFromGitHub {
pname = "django_stubs"; owner = "typeddjango";
inherit version; repo = "django-stubs";
hash = "sha256-B+JcLTy/9b5UAif/N3GcyJ8hXfqqpesDinWwG7+7JyI="; tag = version;
hash = "sha256-kF5g0/rkMQxYTfSrTqzZ6BuqGlE42K/AVhc1/ARc+/c=";
}; };
postPatch = '' build-system = [ hatchling ];
substituteInPlace pyproject.toml \
--replace-fail "setuptools<79.0.0" setuptools
'';
build-system = [ setuptools ];
dependencies = [ dependencies = [
django django
@@ -45,15 +45,31 @@ buildPythonPackage rec {
optional-dependencies = { optional-dependencies = {
compatible-mypy = [ mypy ]; compatible-mypy = [ mypy ];
oracle = [ oracledb ];
redis = [
redis
types-redis
];
}; };
nativeCheckInputs = [ nativeCheckInputs = [
pytest-mypy-plugins
pytestCheckHook pytestCheckHook
] ]
++ lib.flatten (builtins.attrValues optional-dependencies); ++ lib.flatten (builtins.attrValues optional-dependencies);
pythonImportsCheck = [ "django-stubs" ]; 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; { meta = with lib; {
description = "PEP-484 stubs for Django"; description = "PEP-484 stubs for Django";
homepage = "https://github.com/typeddjango/django-stubs"; homepage = "https://github.com/typeddjango/django-stubs";

View File

@@ -19,21 +19,26 @@
buildPythonPackage rec { buildPythonPackage rec {
pname = "djangorestframework-stubs"; pname = "djangorestframework-stubs";
version = "3.16.0"; version = "3.16.1";
pyproject = true; pyproject = true;
disabled = pythonOlder "3.9"; disabled = pythonOlder "3.10";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "typeddjango"; owner = "typeddjango";
repo = "djangorestframework-stubs"; repo = "djangorestframework-stubs";
tag = version; 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 django-stubs
requests requests
types-pyyaml types-pyyaml
@@ -54,7 +59,7 @@ buildPythonPackage rec {
] ]
++ lib.flatten (builtins.attrValues optional-dependencies); ++ 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; doCheck = false;
pythonImportsCheck = [ "rest_framework-stubs" ]; pythonImportsCheck = [ "rest_framework-stubs" ];