From 7cead3b24f2412ecc81938c6aac55ff75081a6f8 Mon Sep 17 00:00:00 2001 From: Noa Aarts Date: Sat, 2 Nov 2024 15:24:55 +0100 Subject: [PATCH] google-cloud-iot: fix derivation Replaced the old `including_default_value_fields` with `always_print_fields_with_no_presence` to make the tests pass --- .../python-modules/google-cloud-iot/default.nix | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/pkgs/development/python-modules/google-cloud-iot/default.nix b/pkgs/development/python-modules/google-cloud-iot/default.nix index 4cd4dc257fda..73ece34efc16 100644 --- a/pkgs/development/python-modules/google-cloud-iot/default.nix +++ b/pkgs/development/python-modules/google-cloud-iot/default.nix @@ -39,6 +39,15 @@ buildPythonPackage rec { pytestCheckHook ]; + # including_default_value_fields was deprecated, the new version is called + # always_print_fields_with_no_presence + postPatch = '' + substituteInPlace "tests/unit/gapic/iot_v1/test_device_manager.py" \ + --replace-fail "including_default_value_fields" "always_print_fields_with_no_presence" + substituteInPlace "google/cloud/iot_v1/services/device_manager/transports/rest.py" \ + --replace-fail "including_default_value_fields" "always_print_fields_with_no_presence" + ''; + disabledTests = [ # requires credentials "test_list_device_registries"