Skip to content

Commit 8f49b09

Browse files
committed
deprecated export_v2
1 parent d38ac45 commit 8f49b09

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
@@ -400,6 +400,13 @@ def export_v2(
400400
>>> task.wait_till_done()
401401
>>> task.result
402402
"""
403+
404+
warnings.warn(
405+
"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",
406+
DeprecationWarning,
407+
stacklevel=2,
408+
)
409+
403410
task, is_streamable = self._export(task_name, filters, params)
404411
if is_streamable:
405412
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
@@ -418,6 +418,13 @@ def export_v2(
418418
>>> task.wait_till_done()
419419
>>> task.result
420420
"""
421+
422+
warnings.warn(
423+
"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",
424+
DeprecationWarning,
425+
stacklevel=2,
426+
)
427+
421428
task, is_streamable = self._export(task_name, filters, params)
422429
if is_streamable:
423430
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
@@ -164,6 +164,13 @@ def export_v2(
164164
>>> task.wait_till_done()
165165
>>> task.result
166166
"""
167+
168+
warnings.warn(
169+
"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",
170+
DeprecationWarning,
171+
stacklevel=2,
172+
)
173+
167174
task, is_streamable = self._export(task_name, params)
168175
if is_streamable:
169176
return ExportTask(task, True)

0 commit comments

Comments
 (0)