-
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
Conversation
Co-authored-by: Gabe <33893811+Gabefire@users.noreply.github.com>
…ython into gu/remove_data_types
|
||
DType = TypeVar("DType") | ||
DShape = TypeVar("DShape") | ||
|
||
|
||
class _TypedArray(np.ndarray, Generic[DType, DShape]): | ||
@classmethod | ||
def __get_validators__(cls): | ||
yield cls.validate | ||
def __get_pydantic_core_schema__( |
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
@@ -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 comment
The reason will be displayed to describe this comment to others. Learn more.
strip_whitespace is depercated in pydantic V2 and gives warnings to users
@@ -36,6 +37,12 @@ | |||
format_iso_from_string, | |||
) | |||
|
|||
Name = Annotated[ |
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.
good
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.
Can we also remove some more warnings re
DeprecationWarning: datetime.datetime.utcnow()
Also can you squash these 53 commits?
Also can you add to the end of the epic to make sure we remove / do not have sdk deprecation warnings
Description