From 9139d9faca9c3a96dd0a2816e62a2d718400e8b2 Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Mon, 31 Mar 2025 04:01:38 +0200 Subject: [PATCH] python313Packages.pydantic: 2.10.6 -> 2.11.1 https://github.com/pydantic/pydantic/releases/tag/v2.11.0 https://github.com/pydantic/pydantic/releases/tag/v2.11.1 --- .../python-modules/pydantic/default.nix | 33 +++++++------------ 1 file changed, 11 insertions(+), 22 deletions(-) diff --git a/pkgs/development/python-modules/pydantic/default.nix b/pkgs/development/python-modules/pydantic/default.nix index 4d8da843963d..5f1723538f0f 100644 --- a/pkgs/development/python-modules/pydantic/default.nix +++ b/pkgs/development/python-modules/pydantic/default.nix @@ -8,13 +8,11 @@ hatchling, hatch-fancy-pypi-readme, - # native dependencies - libxcrypt, - # dependencies annotated-types, pydantic-core, typing-extensions, + typing-inspection, # tests cloudpickle, @@ -22,14 +20,16 @@ dirty-equals, jsonschema, pytestCheckHook, + pytest-codspeed, pytest-mock, + pytest-run-parallel, eval-type-backport, rich, }: buildPythonPackage rec { pname = "pydantic"; - version = "2.10.6"; + version = "2.11.1"; pyproject = true; disabled = pythonOlder "3.8"; @@ -38,10 +38,12 @@ buildPythonPackage rec { owner = "pydantic"; repo = "pydantic"; tag = "v${version}"; - hash = "sha256-vkXvHQ5ipcLfx4qJKY6J4rKXCAfP2rj88GnwGMjM2go="; + hash = "sha256-82knT2Dzm/p0dz56bH0sZ4WffgFnN5cukbipPBO65fQ="; }; - buildInputs = lib.optionals (pythonOlder "3.9") [ libxcrypt ]; + postPatch = '' + sed -i "/--benchmark/d" pyproject.toml + ''; build-system = [ hatch-fancy-pypi-readme @@ -52,6 +54,7 @@ buildPythonPackage rec { annotated-types pydantic-core typing-extensions + typing-inspection ]; optional-dependencies = { @@ -63,7 +66,9 @@ buildPythonPackage rec { cloudpickle dirty-equals jsonschema + pytest-codspeed pytest-mock + pytest-run-parallel pytestCheckHook rich ] @@ -72,24 +77,8 @@ buildPythonPackage rec { preCheck = '' export HOME=$(mktemp -d) - substituteInPlace pyproject.toml \ - --replace-fail "'--benchmark-columns', 'min,mean,stddev,outliers,rounds,iterations'," "" \ - --replace-fail "'--benchmark-group-by', 'group'," "" \ - --replace-fail "'--benchmark-warmup', 'on'," "" \ - --replace-fail "'--benchmark-disable'," "" ''; - pytestFlagsArray = [ - # suppress warnings with pytest>=8 - "-Wignore::pydantic.warnings.PydanticDeprecatedSince20" - "-Wignore::pydantic.json_schema.PydanticJsonSchemaWarning" - ]; - - disabledTests = [ - # disable failing test with pytest>=8 - "test_assert_raises_validation_error" - ]; - disabledTestPaths = [ "tests/benchmarks"