diff options
author | Alyssa Ross <hi@alyssa.is> | 2024-03-24 11:04:41 +0100 |
---|---|---|
committer | Alyssa Ross <hi@alyssa.is> | 2024-03-24 11:04:41 +0100 |
commit | 5423cabbbf2b6dec5568f1ecabd288d5d9a642ec (patch) | |
tree | f316a6a921bfefd3a63bd4502c2eb50ff1644f67 /nixpkgs/pkgs/development/python-modules/pydantic/default.nix | |
parent | 46a88117a05c3469af5d99433af140c3de8ca088 (diff) | |
parent | 8aa81f34981add12aecada6c702ddbbd0375ca36 (diff) | |
download | nixlib-5423cabbbf2b6dec5568f1ecabd288d5d9a642ec.tar nixlib-5423cabbbf2b6dec5568f1ecabd288d5d9a642ec.tar.gz nixlib-5423cabbbf2b6dec5568f1ecabd288d5d9a642ec.tar.bz2 nixlib-5423cabbbf2b6dec5568f1ecabd288d5d9a642ec.tar.lz nixlib-5423cabbbf2b6dec5568f1ecabd288d5d9a642ec.tar.xz nixlib-5423cabbbf2b6dec5568f1ecabd288d5d9a642ec.tar.zst nixlib-5423cabbbf2b6dec5568f1ecabd288d5d9a642ec.zip |
Merge branch 'nixos-unstable-small' of https://github.com/NixOS/nixpkgs
Diffstat (limited to 'nixpkgs/pkgs/development/python-modules/pydantic/default.nix')
-rw-r--r-- | nixpkgs/pkgs/development/python-modules/pydantic/default.nix | 31 |
1 files changed, 26 insertions, 5 deletions
diff --git a/nixpkgs/pkgs/development/python-modules/pydantic/default.nix b/nixpkgs/pkgs/development/python-modules/pydantic/default.nix index c81b46a20586..bb0a4bedde49 100644 --- a/nixpkgs/pkgs/development/python-modules/pydantic/default.nix +++ b/nixpkgs/pkgs/development/python-modules/pydantic/default.nix @@ -1,6 +1,7 @@ { lib , buildPythonPackage , fetchFromGitHub +, fetchpatch , pythonOlder # build-system @@ -26,28 +27,37 @@ buildPythonPackage rec { pname = "pydantic"; - version = "2.5.3"; + version = "2.6.3"; pyproject = true; - disabled = pythonOlder "3.7"; + disabled = pythonOlder "3.8"; src = fetchFromGitHub { owner = "pydantic"; repo = "pydantic"; rev = "refs/tags/v${version}"; - hash = "sha256-YTNV67uKGRag6ICkNjjY9YrOiKFB1hSZkKcUXjSrhwM="; + hash = "sha256-neTdG/IcXopCmevzFY5/XDlhPHmOb6dhyAnzaobmeG8="; }; + patches = [ + (fetchpatch { + # https://github.com/pydantic/pydantic/pull/8678 + name = "fix-pytest8-compatibility.patch"; + url = "https://github.com/pydantic/pydantic/commit/825a6920e177a3b65836c13c7f37d82b810ce482.patch"; + hash = "sha256-Dap5DtDzHw0jS/QUo5CRI9sLDJ719GRyC4ZNDWEdzus="; + }) + ]; + buildInputs = lib.optionals (pythonOlder "3.9") [ libxcrypt ]; - nativeBuildInputs = [ + build-system = [ hatch-fancy-pypi-readme hatchling ]; - propagatedBuildInputs = [ + dependencies = [ annotated-types pydantic-core typing-extensions @@ -76,6 +86,17 @@ buildPythonPackage rec { --replace "'--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" |