From 077a0b2ee6d9a317252cf72c0f339d99281d41e2 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Thu, 13 Jan 2022 17:38:57 +0100 Subject: [PATCH] python310Packages.marshmallow-dataclass: ignore DeprecationWarning --- .../marshmallow-dataclass/default.nix | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/pkgs/development/python-modules/marshmallow-dataclass/default.nix b/pkgs/development/python-modules/marshmallow-dataclass/default.nix index 145005fd5e39..4b36ee9b74ef 100644 --- a/pkgs/development/python-modules/marshmallow-dataclass/default.nix +++ b/pkgs/development/python-modules/marshmallow-dataclass/default.nix @@ -4,6 +4,7 @@ , marshmallow , marshmallow-enum , pytestCheckHook +, pythonAtLeast , pythonOlder , typeguard , typing-inspect @@ -34,7 +35,20 @@ buildPythonPackage rec { typeguard ]; - pythonImportsCheck = [ "marshmallow_dataclass" ]; + pytestFlagsArray = [ + # DeprecationWarning: The distutils package is deprecated and slated for removal in Python 3.12. + "-W" + "ignore::DeprecationWarning" + ]; + + disabledTests = lib.optionals (pythonAtLeast "3.10") [ + # TypeError: UserId is not a dataclass and cannot be turned into one. + "test_newtype" + ]; + + pythonImportsCheck = [ + "marshmallow_dataclass" + ]; meta = with lib; { description = "Automatic generation of marshmallow schemas from dataclasses";