Skip to content

Commit 9907beb

Browse files
Merge pull request #859 from Labelbox/kkim/AL-4767
[AL-4767] Deprecation notice for deletedDataRowGlobalKeys portion of results in…
2 parents 95b56ca + 1cacdff commit 9907beb

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

labelbox/client.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1159,6 +1159,10 @@ def get_data_row_ids_for_global_keys(
11591159
"""
11601160
Gets data row ids for a list of global keys.
11611161
1162+
Deprecation Notice: This function will soon no longer return 'Deleted Data Rows'
1163+
as part of the 'results'. Global keys for deleted data rows will soon be placed
1164+
under 'Data Row not found' portion.
1165+
11621166
Args:
11631167
A list of global keys
11641168
Returns:
@@ -1243,6 +1247,13 @@ def _format_failed_rows(rows: List[str],
12431247
"There are errors present. Please look at 'errors' in the returned dict for more details"
12441248
)
12451249

1250+
# Deprecation notice for deletedDataRowGlobalKeys portion of results
1251+
if len(data['deletedDataRowGlobalKeys']) > 0:
1252+
logger.warning(
1253+
"""Deprecation Notice: This function will soon no longer return 'Deleted Data Rows'
1254+
as part of the 'results'. Global keys for deleted data rows will soon be placed under
1255+
'Data Row not found' portion.""")
1256+
12461257
return {"status": status, "results": results, "errors": errors}
12471258
elif res["dataRowsForGlobalKeysResult"]['jobStatus'] == "FAILED":
12481259
raise labelbox.exceptions.LabelboxError(

0 commit comments

Comments
 (0)