From e31f337b068c20a93aeada1456e60b638c4ffd5c Mon Sep 17 00:00:00 2001 From: Gaetan Lepage Date: Sun, 1 Feb 2026 10:31:03 +0000 Subject: [PATCH] python3Packages.polyfactory: skip failing tests on python>=3.14 Tracking: https://github.com/NixOS/nixpkgs/issues/475732 --- .../python-modules/polyfactory/default.nix | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/pkgs/development/python-modules/polyfactory/default.nix b/pkgs/development/python-modules/polyfactory/default.nix index 1c17443aae4d..3a1208d79cc8 100644 --- a/pkgs/development/python-modules/polyfactory/default.nix +++ b/pkgs/development/python-modules/polyfactory/default.nix @@ -2,6 +2,7 @@ lib, buildPythonPackage, fetchFromGitHub, + pythonAtLeast, # build-system hatchling, @@ -58,11 +59,31 @@ buildPythonPackage (finalAttrs: { "tests/test_beanie_factory.py" ]; + enabledTestPaths = [ + "tests/test_msgspec_factory.py" + ]; + disabledTests = [ # Unsupported type: LiteralAlias "test_type_alias" # Unsupported type: 'JsonValue' on field '' from class RecursiveTypeModelFactory. "test_recursive_type_annotation" + ] + ++ lib.optionals (pythonAtLeast "3.14") [ + # AttributeError: 'Foo' object has no attribute 'set_field' + "test_other_basic_types" + + # KeyError: 'foo_field' + "test_with_nested_struct" + + # AttributeError: 'Foo' object has no attribute 'unset' + "test_msgspec_types" + + # Failed: DID NOT RAISE + "test_datetime_constraints" + + # assert == 10 + "test_use_default_with_callable_default" ]; pythonImportsCheck = [ "polyfactory" ];