From 3ef5cc311650f366cfa59904e5f672621f4d0db1 Mon Sep 17 00:00:00 2001 From: Sarah Clark Date: Tue, 15 Jul 2025 12:08:00 -0700 Subject: [PATCH] python3Packages.fabric: fix build Build from github source, disable two outdated tests --- .../python-modules/fabric/default.nix | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/pkgs/development/python-modules/fabric/default.nix b/pkgs/development/python-modules/fabric/default.nix index fbf4528d5d39..cc77add86616 100644 --- a/pkgs/development/python-modules/fabric/default.nix +++ b/pkgs/development/python-modules/fabric/default.nix @@ -3,14 +3,13 @@ buildPythonPackage, decorator, deprecated, - fetchPypi, + fetchFromGitHub, icecream, invoke, mock, paramiko, pytest-relaxed, pytestCheckHook, - pythonOlder, setuptools, }: @@ -19,11 +18,11 @@ buildPythonPackage rec { version = "3.2.2"; pyproject = true; - disabled = pythonOlder "3.10"; - - src = fetchPypi { - inherit pname version; - hash = "sha256-h4PKQuOwB28IsmkBqsa52bHxnEEAdOesz6uQLBhP9KM="; + src = fetchFromGitHub { + owner = "fabric"; + repo = "fabric"; + tag = version; + hash = "sha256-7qC2UuI0RP5xlKIYSz1sLyK/nQYegXOou1mlJYFk7M0="; }; build-system = [ setuptools ]; @@ -58,6 +57,10 @@ buildPythonPackage rec { "preserves_remote_mode_by_default" "proxy_jump" "raises_TypeError_for_disallowed_kwargs" + # Assertion failures on mocks + # https://github.com/fabric/fabric/issues/2341 + "client_defaults_to_a_new_SSHClient" + "defaults_to_auto_add" ]; meta = {