diff options
Diffstat (limited to 'pkgs/development/python-modules/pydantic-compat/default.nix')
| -rw-r--r-- | pkgs/development/python-modules/pydantic-compat/default.nix | 32 |
1 files changed, 20 insertions, 12 deletions
diff --git a/pkgs/development/python-modules/pydantic-compat/default.nix b/pkgs/development/python-modules/pydantic-compat/default.nix index 7878fa03ba12..e47211217593 100644 --- a/pkgs/development/python-modules/pydantic-compat/default.nix +++ b/pkgs/development/python-modules/pydantic-compat/default.nix @@ -2,13 +2,12 @@ lib, buildPythonPackage, fetchFromGitHub, - git, hatch-vcs, hatchling, + gitMinimal, importlib-metadata, pydantic, pytestCheckHook, - pythonOlder, }: buildPythonPackage rec { @@ -16,36 +15,45 @@ buildPythonPackage rec { version = "0.1.2"; pyproject = true; - disabled = pythonOlder "3.7"; - src = fetchFromGitHub { owner = "pyapp-kit"; repo = "pydantic-compat"; tag = "v${version}"; - hash = "sha256-YJUfWu+nyGlwpJpxYghCKzj3CasdAaqYoNVCcfo/7YE="; leaveDotGit = true; + hash = "sha256-YJUfWu+nyGlwpJpxYghCKzj3CasdAaqYoNVCcfo/7YE="; }; - nativeBuildInputs = [ - git + build-system = [ hatch-vcs hatchling ]; - propagatedBuildInputs = [ + nativeBuildInputs = [ + gitMinimal + ]; + + dependencies = [ importlib-metadata pydantic ]; + pythonImportsCheck = [ "pydantic_compat" ]; + nativeCheckInputs = [ pytestCheckHook ]; - pythonImportsCheck = [ "pydantic_compat" ]; + pytestFlagsArray = [ + "-W" + # pydantic.warnings.PydanticDeprecatedSince211: Accessing this attribute on the instance is + # deprecated, and will be removed in Pydantic V3. Instead, you should access this attribute from + # the model class. Deprecated in Pydantic V2.11 to be removed in V3.0. + "ignore::pydantic.warnings.PydanticDeprecatedSince211" + ]; - meta = with lib; { + meta = { description = "Compatibility layer for pydantic v1/v2"; homepage = "https://github.com/pyapp-kit/pydantic-compat"; changelog = "https://github.com/pyapp-kit/pydantic-compat/releases/tag/v${version}"; - license = licenses.bsd3; - maintainers = with maintainers; [ fab ]; + license = lib.licenses.bsd3; + maintainers = with lib.maintainers; [ fab ]; }; } |
