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 to pydantic v2 #2178

Merged
merged 3 commits into from
Jul 1, 2024
Merged

Migrate to pydantic v2 #2178

merged 3 commits into from
Jul 1, 2024

Commits on Jul 1, 2024

  1. update requirements

    AdeelH committed Jul 1, 2024
    Configuration menu
    Copy the full SHA
    9b5e8cd View commit details
    Browse the repository at this point in the history
  2. update base Config class

    Note: default serialization behavior has changed in pydantic v2. See https://docs.pydantic.dev/latest/concepts/serialization/#serializing-with-duck-typing. We use model_dump(serialize_as_any=True) to get the old behavior.
    AdeelH committed Jul 1, 2024
    Configuration menu
    Copy the full SHA
    07508f1 View commit details
    Browse the repository at this point in the history
  3. update config validators and fix some type hints

    - v1's validator and root_validator have been changed to field_validator and model_validator respectively
    - move some type definitions to core.utils.types
    - update some type hints to newer syntax
    AdeelH committed Jul 1, 2024
    Configuration menu
    Copy the full SHA
    be455b9 View commit details
    Browse the repository at this point in the history