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

Fix unit test errors due to new version of pydantic #8

Merged
merged 1 commit into from
Jul 20, 2023

Conversation

eggmaster
Copy link
Collaborator

Pydantic updated to v2.x, so a bunch of pipeline unit tests started failing. This patch follows the migration recommendations from pydantic to get the tests passing again.

jguiditta
jguiditta previously approved these changes Jul 13, 2023
Copy link
Member

@jguiditta jguiditta left a comment

Choose a reason for hiding this comment

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

One comment to consider for a future patch, unless I am just being dense. Otherwise, looks good!


class ConfigDict(BaseModel):
model_config = ConfigDict(extra='forbid')
Copy link
Member

Choose a reason for hiding this comment

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

This seems oddly recursive, I wonder if we should consider renaming this class (could be in a different patch) to make it less confusing?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

oops! good catch.

Copy link

Choose a reason for hiding this comment

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

I was wondering as well... and I think that's why we have to "import pydantic" instead of just having a specific class import on the next line, like for the other imports? After I asked the question, I realised it would conflict with our custom class, but would agree otherwise on maybe renaming for clarity in a later patch, if that is possible.

Pydantic updated to v2.x, so a bunch of pipeline unit tests started failing.
This patch follows the migration recommendations from pydantic to get the
tests passing again.
@jpichon jpichon merged commit 8ebfa07 into release-depot:main Jul 20, 2023
7 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.

3 participants