Skip to content

Commit 182aa67

Browse files
authored
[PLT-1583] Deprecated export v2 (#1865)
1 parent 8e89cec commit 182aa67

File tree

6 files changed

+43
-0
lines changed

6 files changed

+43
-0
lines changed

libs/labelbox/src/labelbox/schema/catalog.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
from typing import Any, Dict, List, Optional, Tuple, Union
2+
import warnings
23
from labelbox.orm.db_object import experimental
34
from labelbox.schema.export_filters import CatalogExportFilters, build_filters
45

@@ -45,6 +46,13 @@ def export_v2(
4546
>>> task.wait_till_done()
4647
>>> task.result
4748
"""
49+
50+
warnings.warn(
51+
"You are currently utilizing export_v2 for this action, which will be deprecated in a V7. Please refer to docs for export alternatives. https://docs.labelbox.com/reference/export-overview#export-methods",
52+
DeprecationWarning,
53+
stacklevel=2,
54+
)
55+
4856
task, is_streamable = self._export(task_name, filters, params)
4957
if is_streamable:
5058
return ExportTask(task, True)

libs/labelbox/src/labelbox/schema/data_row.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
from enum import Enum
33
from typing import TYPE_CHECKING, List, Optional, Tuple, Union, Any
44
import json
5+
import warnings
56

67
from labelbox.orm import query
78
from labelbox.orm.db_object import (
@@ -277,6 +278,13 @@ def export_v2(
277278
>>> task.wait_till_done()
278279
>>> task.result
279280
"""
281+
282+
warnings.warn(
283+
"You are currently utilizing export_v2 for this action, which will be deprecated in a V7. Please refer to docs for export alternatives. https://docs.labelbox.com/reference/export-overview#export-methods",
284+
DeprecationWarning,
285+
stacklevel=2,
286+
)
287+
280288
task, is_streamable = DataRow._export(
281289
client, data_rows, global_keys, task_name, params
282290
)

libs/labelbox/src/labelbox/schema/dataset.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -358,6 +358,13 @@ def export_v2(
358358
>>> task.wait_till_done()
359359
>>> task.result
360360
"""
361+
362+
warnings.warn(
363+
"You are currently utilizing export_v2 for this action, which will be deprecated in a V7. Please refer to docs for export alternatives. https://docs.labelbox.com/reference/export-overview#export-methods",
364+
DeprecationWarning,
365+
stacklevel=2,
366+
)
367+
361368
task, is_streamable = self._export(task_name, filters, params)
362369
if is_streamable:
363370
return ExportTask(task, True)

libs/labelbox/src/labelbox/schema/model_run.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -539,6 +539,12 @@ def export_v2(
539539
>>> export_task = export_v2("my_export_task", params={"media_attributes": True})
540540
541541
"""
542+
543+
warnings.warn(
544+
"You are currently utilizing export_v2 for this action, which will be deprecated in a V7. Please refer to docs for export alternatives. https://docs.labelbox.com/reference/export-overview#export-methods",
545+
DeprecationWarning,
546+
stacklevel=2,
547+
)
542548
task, is_streamable = self._export(task_name, params)
543549
if is_streamable:
544550
return ExportTask(task, True)

libs/labelbox/src/labelbox/schema/project.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -415,6 +415,13 @@ def export_v2(
415415
>>> task.wait_till_done()
416416
>>> task.result
417417
"""
418+
419+
warnings.warn(
420+
"You are currently utilizing export_v2 for this action, which will be deprecated in a V7. Please refer to docs for export alternatives. https://docs.labelbox.com/reference/export-overview#export-methods",
421+
DeprecationWarning,
422+
stacklevel=2,
423+
)
424+
418425
task, is_streamable = self._export(task_name, filters, params)
419426
if is_streamable:
420427
return ExportTask(task, True)

libs/labelbox/src/labelbox/schema/slice.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,13 @@ def export_v2(
127127
>>> task.wait_till_done()
128128
>>> task.result
129129
"""
130+
131+
warnings.warn(
132+
"You are currently utilizing export_v2 for this action, which will be deprecated in a V7. Please refer to docs for export alternatives. https://docs.labelbox.com/reference/export-overview#export-methods",
133+
DeprecationWarning,
134+
stacklevel=2,
135+
)
136+
130137
task, is_streamable = self._export(task_name, params)
131138
if is_streamable:
132139
return ExportTask(task, True)

0 commit comments

Comments
 (0)