Skip to content

Commit 6060cc3

Browse files
author
Val Brodsky
committed
Remove legacy time isoformat monkey patch
1 parent b29eff3 commit 6060cc3

File tree

1 file changed

+2
-9
lines changed

1 file changed

+2
-9
lines changed

labelbox/schema/project.py

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -25,23 +25,16 @@
2525
from labelbox.schema.export_filters import ProjectExportFilters, validate_datetime, build_filters
2626
from labelbox.schema.export_params import ProjectExportParams
2727
from labelbox.schema.export_task import ExportTask
28+
from labelbox.schema.identifiable import DataRowIdentifiers, IdType, UniqueIds, strings_to_identifiable
2829
from labelbox.schema.media_type import MediaType
2930
from labelbox.schema.queue_mode import QueueMode
3031
from labelbox.schema.resource_tag import ResourceTag
3132
from labelbox.schema.task import Task
3233
from labelbox.schema.task_queue import TaskQueue
33-
from labelbox.schema.user import User
3434

3535
if TYPE_CHECKING:
3636
from labelbox import BulkImportRequest
3737

38-
try:
39-
datetime.fromisoformat # type: ignore[attr-defined]
40-
except AttributeError:
41-
from backports.datetime_fromisoformat import MonkeyPatch
42-
43-
MonkeyPatch.patch_fromisoformat()
44-
4538
try:
4639
from labelbox.data.serialization import LBV1Converter
4740
except ImportError:
@@ -643,7 +636,7 @@ def labeler_performance(self) -> PaginatedCollection:
643636
def create_labeler_performance(client, result):
644637
result["user"] = Entity.User(client, result["user"])
645638
# python isoformat doesn't accept Z as utc timezone
646-
result["lastActivityTime"] = datetime.fromisoformat(
639+
result["lastActivityTime"] = utils.format_iso_from_string(
647640
result["lastActivityTime"].replace('Z', '+00:00'))
648641
return LabelerPerformance(**{
649642
utils.snake_case(key): value for key, value in result.items()

0 commit comments

Comments
 (0)