Skip to content
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

Migrate pydantic to v2 #182

Merged
merged 1 commit into from
Aug 5, 2024
Merged

Conversation

SantanaTiago
Copy link
Collaborator

This PR removes pydantic v1 compatibility of use import pydantic.v1 and applies need changes to pydantic v2 such as:

  • dict(), parse_obj(), parse_file() methods replace with model_dump(), model_validate(), model_validate_json()
  • validate_arguments decorator renamed to validate_call, root_validator to model_validator
  • add dependency pydantic-settings, new repo where settings class moved such as BaseSettings and updated imports
  • add custom validator for unique items

Copy link
Contributor

@dolfim-ibm dolfim-ibm left a comment

Choose a reason for hiding this comment

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

LGTM

@dolfim-ibm dolfim-ibm merged commit 5b172db into DS4SD:main Aug 5, 2024
6 checks passed
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.

2 participants