-
Notifications
You must be signed in to change notification settings - Fork 68
[PLT-1471] Remove pydantic v2 deprecate warnings #1838
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
53 commits
Select commit
Hold shift + click to select a range
0bbd7c2
Vb/fix ontology leaks plt 1379 (#1814)
vbrodsky 51ecfea
[PTDT-2553] Added integration tests for MMC MAL/GT imports
real-mjozwiak 8d078c8
[PTDT-2553] Added integration tests for MMC MAL/GT imports (#1795)
real-mjozwiak 24e0766
SDK release v.5.0.0 prep (#1823)
vbrodsky 2faf9a1
Vb/merge 5.0.0 (#1826)
vbrodsky 2c0c677
Revert "Vb/merge 5.0.0 (#1826)" (#1827)
vbrodsky c089215
Removed data types besides generic data row data
Gabefire 30819db
[PLT-1463] Removed ND deserialize from some unit test part 1 (#1804)
Gabefire 761b1e9
[PLT-1463] Removed ND deserialize from some unit test part 2 (#1815)
Gabefire 379171a
[PLT-1274] Vb/deprecate bulkimportrequest plt 1274 (#1821)
vbrodsky 5e87f4e
[PLT-1463] Remove deserialize completely (#1818)
Gabefire 5fc6ff3
[PLT-1488] Removed coco (#1820)
Gabefire 9cf28a1
Fixed video
Gabefire 7fc10bb
Removed data type test
Gabefire 8051d50
Merge branch 'solve_rebase_v6' into v6
Gabefire 0b810fb
Made fix
Gabefire f8b8fa3
Fix list of labels
Gabefire 556a5db
Merge branch 'v6' into gu/remove_data_types
Gabefire aa551e1
Merge branch 'gu/remove_data_types' of github.com:Labelbox/labelbox-p…
Gabefire 2329324
Removed add url
Gabefire 4457f25
Removed rest of tests
Gabefire f5b6c7d
Fix tests
Gabefire ce60b24
Finish PR
Gabefire 12aa8c5
Added back in tile data since some of its parameters are required
Gabefire f124e9d
Merge branch 'v6' of github.com:Labelbox/labelbox-python into v6
Gabefire b614ced
Removed data types besides generic data row data
Gabefire e31d118
Fixed video
Gabefire 1a8189a
Removed data type test
Gabefire 62f5fbd
Made fix
Gabefire 6c11e74
Fix list of labels
Gabefire 1ef53cc
Removed add url
Gabefire 159e227
Removed rest of tests
Gabefire 5f625c8
Fix tests
Gabefire 90c1a19
Finish PR
Gabefire f91a229
Added back in tile data since some of its parameters are required
Gabefire 709ca61
Merge branch 'gu/remove_data_types' of github.com:Labelbox/labelbox-p…
Gabefire fdabc94
Added tile back to __init__.py
Gabefire 5bb3c97
Fixed import
Gabefire 4888346
Removed some data tests
Gabefire c32bd71
Removed videoData
Gabefire 1c50842
Fix exception type for labeling service test (#1835)
vbrodsky 075f6c0
Merge branch 'v6' of github.com:Labelbox/labelbox-python into v6
Gabefire dd5ccdd
Merge branch 'v6' into gu/cut_down_warnings
Gabefire 3c7e72c
Removed some warnings
Gabefire a824f55
Merge remote-tracking branch 'origin' into gu/cut_down_warnings
Gabefire 3dd9911
Fix merge conflicts
Gabefire 4be8069
Add client back in
Gabefire 321cdaf
Remove test_labeling_service changes
Gabefire 673f367
Flip string remover to before validation
Gabefire d3ee85a
removed deprecated timezone from tests
Gabefire dd531ee
Fixed labeling service
Gabefire fb60c88
Swapped to Any
Gabefire 8782117
Revert some changes
Gabefire File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -27,6 +27,7 @@ | |
conlist, | ||
ConfigDict, | ||
model_serializer, | ||
BeforeValidator, | ||
) | ||
|
||
from labelbox.schema.ontology import SchemaId | ||
|
@@ -36,6 +37,12 @@ | |
format_iso_from_string, | ||
) | ||
|
||
Name = Annotated[ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. good |
||
str, | ||
BeforeValidator(lambda x: str.strip(str(x))), | ||
Field(min_length=1, max_length=100), | ||
] | ||
|
||
|
||
class DataRowMetadataKind(Enum): | ||
number = "CustomMetadataNumber" | ||
|
@@ -49,7 +56,7 @@ class DataRowMetadataKind(Enum): | |
# Metadata schema | ||
class DataRowMetadataSchema(BaseModel): | ||
uid: SchemaId | ||
name: str = Field(strip_whitespace=True, min_length=1, max_length=100) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. strip_whitespace is depercated in pydantic V2 and gives warnings to users |
||
name: Name | ||
reserved: bool | ||
kind: DataRowMetadataKind | ||
options: Optional[List["DataRowMetadataSchema"]] = None | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have a story to simplify this class