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

Fixes for Pydantic v2 compat #275

Merged
merged 1 commit into from
Aug 31, 2023
Merged

Fixes for Pydantic v2 compat #275

merged 1 commit into from
Aug 31, 2023

Conversation

kabirkhan
Copy link
Contributor

Description

We have a mixture of imports for the pydantic BaseModel from both v2 and v1.
This PR standardizes imports around v1 by adding BaseModel, ValidationError and validator to the compat module. Fixes the need for cls.construct for the relations module.

Corresponding documentation PR

Types of change

Enhancment

Checklist

  • I confirm that I have the right to submit this contribution under the project's MIT license.
  • I ran all tests in tests and usage_examples/tests, and all new and existing tests passed. This includes
    • all external tests (i. e. pytest ran with --external)
    • all tests requiring a GPU (i. e. pytest ran with --gpu)
  • My changes don't require a change to the documentation, or if they do, I've added all required information.

@kabirkhan kabirkhan changed the base branch from main to develop August 31, 2023 18:27
Copy link
Member

@svlandeg svlandeg left a comment

Choose a reason for hiding this comment

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

Thanks, looks good!

@svlandeg svlandeg merged commit 4602c99 into develop Aug 31, 2023
19 checks passed
@svlandeg svlandeg deleted the kab/pydantic-compat-fixes branch August 31, 2023 18:43
@svlandeg svlandeg added the enhancement Improvement of existing feature label Sep 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Improvement of existing feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants