[26.05] python3Packages.datamodel-code-generator: 0.55.0 -> 0.71.0 (#548361)

This commit is contained in:
Vladimír Čunát
2026-08-12 06:33:59 +00:00
committed by GitHub
4 changed files with 77 additions and 5 deletions

View File

@@ -3,15 +3,21 @@
argcomplete,
black,
buildPythonPackage,
email-validator,
fetchFromGitHub,
genson,
graphql-core,
grpcio-tools,
hatch-vcs,
hatchling,
httpx,
hypothesis,
hypothesis-jsonschema,
inflect,
inline-snapshot,
isort,
jsonschema,
msgspec,
jinja2,
openapi-spec-validator,
packaging,
@@ -20,6 +26,8 @@
pydantic,
pysnooper,
pytest-mock,
pytest-timeout,
pytest-xdist,
pytestCheckHook,
pyyaml,
time-machine,
@@ -28,14 +36,14 @@
buildPythonPackage rec {
pname = "datamodel-code-generator";
version = "0.55.0";
version = "0.71.0";
pyproject = true;
src = fetchFromGitHub {
owner = "koxudaxi";
repo = "datamodel-code-generator";
tag = version;
hash = "sha256-zsLJv7gKhmnEIS/AUvnBzm+07QFQoMdiFo/PkfRyHek=";
hash = "sha256-0vh/iynZzmMzvdUXNScb+JWANdSrzPLT1qt+jyKleg4=";
};
pythonRelaxDeps = [
@@ -65,6 +73,7 @@ buildPythonPackage rec {
debug = [ pysnooper ];
graphql = [ graphql-core ];
http = [ httpx ];
protobuf = [ grpcio-tools ];
ruff = [ ruff ];
validation = [
openapi-spec-validator
@@ -76,20 +85,31 @@ buildPythonPackage rec {
};
nativeCheckInputs = [
email-validator
inline-snapshot
hypothesis
hypothesis-jsonschema
jsonschema
msgspec
pytest-mock
pytest-timeout
pytest-xdist
pytestCheckHook
time-machine
]
++ optional-dependencies.all;
pythonImportsCheck = [ "datamodel_code_generator" ];
pytestFlags = [
"--maxfail=2"
];
disabledTests = [
# remote testing, name resolution failure.
"test_openapi_parser_parse_remote_ref"
];
pythonImportsCheck = [ "datamodel_code_generator" ];
meta = {
description = "Pydantic model and dataclasses.dataclass generator for easy conversion of JSON, OpenAPI, JSON Schema, and YAML data sources";
homepage = "https://github.com/koxudaxi/datamodel-code-generator";

View File

@@ -0,0 +1,50 @@
{
lib,
buildPythonPackage,
fetchPypi,
setuptools,
hypothesis,
jsonschema,
pytest-cov-stub,
pytestCheckHook,
}:
buildPythonPackage (finalAttrs: {
pname = "hypothesis-jsonschema";
version = "0.23.1";
pyproject = true;
__structuredAttrs = true;
# no git tags
src = fetchPypi {
inherit (finalAttrs) pname version;
hash = "sha256-9KwDICQ0KkFJoQJTmE9aVza4Kz/ir7CIjzg0oxFT8hU=";
};
build-system = [
setuptools
];
dependencies = [
hypothesis
jsonschema
];
doCheck = false; # sdist does not include everything to run the tests
nativeCheckInputs = [
pytest-cov-stub
pytestCheckHook
];
pythonImportsCheck = [
"hypothesis_jsonschema"
];
meta = {
description = "Generate test data from JSON schemata with Hypothesis";
homepage = "https://github.com/Zac-HD/hypothesis-jsonschema";
license = lib.licenses.mpl20;
};
})

View File

@@ -21,14 +21,14 @@
buildPythonPackage rec {
pname = "inline-snapshot";
version = "0.32.5";
version = "0.34.2";
pyproject = true;
src = fetchFromGitHub {
owner = "15r10nk";
repo = "inline-snapshot";
tag = version;
hash = "sha256-xnooMIm0UiNOWrZ4JZwbpFzliGsTF7b1DAXi1fxMb30=";
hash = "sha256-4Uvc925/6RxJRHjP3SZaB7T+gqky5KlL9agHy/14Jd0=";
};
build-system = [ hatchling ];

View File

@@ -7415,6 +7415,8 @@ self: super: with self; {
hypothesis-auto = callPackage ../development/python-modules/hypothesis-auto { };
hypothesis-jsonschema = callPackage ../development/python-modules/hypothesis-jsonschema { };
hypothesis_6_136 = callPackage ../development/python-modules/hypothesis/hypothesis_6_136.nix { };
hypothesmith = callPackage ../development/python-modules/hypothesmith { };