Skip to content

[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 53 commits into from
Sep 25, 2024
Merged

Conversation

Gabefire
Copy link
Collaborator

@Gabefire Gabefire commented Sep 23, 2024

Description

  • Removed pydantic warnings from SDK.
  • Removed datetime.utcnow from test which is also deprecated

vbrodsky and others added 30 commits September 16, 2024 18:05
Co-authored-by: Gabe <33893811+Gabefire@users.noreply.github.com>

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__(
Copy link
Collaborator Author

@Gabefire Gabefire Sep 23, 2024

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)
Copy link
Collaborator Author

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[
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good

Copy link
Contributor

@vbrodsky vbrodsky left a 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

@Gabefire Gabefire merged commit b6675f3 into v6 Sep 25, 2024
19 of 26 checks passed
@Gabefire Gabefire deleted the gu/cut_down_warnings branch September 25, 2024 17:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants