From 1cacdff2c23ce1351ccf4801dd1ee6764d041821 Mon Sep 17 00:00:00 2001 From: Kevin Kim Date: Thu, 26 Jan 2023 15:53:39 -0800 Subject: [PATCH] Deprecation notice for deletedDataRowGlobalKeys portion of results in get_data_row_ids_for_global_keys --- labelbox/client.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/labelbox/client.py b/labelbox/client.py index e5e09d172..e8a89c047 100644 --- a/labelbox/client.py +++ b/labelbox/client.py @@ -1159,6 +1159,10 @@ def get_data_row_ids_for_global_keys( """ Gets data row ids for a list of global keys. + Deprecation Notice: This function will soon no longer return 'Deleted Data Rows' + as part of the 'results'. Global keys for deleted data rows will soon be placed + under 'Data Row not found' portion. + Args: A list of global keys Returns: @@ -1243,6 +1247,13 @@ def _format_failed_rows(rows: List[str], "There are errors present. Please look at 'errors' in the returned dict for more details" ) + # Deprecation notice for deletedDataRowGlobalKeys portion of results + if len(data['deletedDataRowGlobalKeys']) > 0: + logger.warning( + """Deprecation Notice: This function will soon no longer return 'Deleted Data Rows' + as part of the 'results'. Global keys for deleted data rows will soon be placed under + 'Data Row not found' portion.""") + return {"status": status, "results": results, "errors": errors} elif res["dataRowsForGlobalKeysResult"]['jobStatus'] == "FAILED": raise labelbox.exceptions.LabelboxError(