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: Update schema due to new pydantic version #604

Closed
wants to merge 1 commit into from

Conversation

tnatt
Copy link
Collaborator

@tnatt tnatt commented Apr 12, 2024

PR to fix our failing tests.
Pydantic has done a change to how they handle enum literals pydantic/pydantic#8944
This causes changes to the schema.

@tnatt
Copy link
Collaborator Author

tnatt commented Apr 12, 2024

It was not as easy as just updating the schema.. they must have introduced other changes as well. I will fix :)

@tnatt
Copy link
Collaborator Author

tnatt commented Apr 12, 2024

OK, more tricky than expected... somehow the Enum objects are now being dumped as objects instead of values when dumping to dictionary. There exists an option use_enum_values=True to turn off this behaviour.. but for some reason I can't get it to work! And I know it worked before because I added it to the PR #599:
Could the change here https://github.com/pydantic/pydantic/pull/8920/files have impacted it?
You will need to have a look with me on Mobnday @mferrera 🙂

@tnatt
Copy link
Collaborator Author

tnatt commented Apr 13, 2024

See pydantic issue #9235
https://github.com/pydantic/pydantic/issues/

probably related

@perolavsvendsen
Copy link
Member

I don't fully understand this PR - only the (generated) schema has changed (?)

@mferrera
Copy link
Collaborator

mferrera commented Apr 18, 2024

The new Pydantic version has changed how it handles values that come from enums, which I guess is that their source (an enum) is now described in the schema. This Pydantic version has a bug that isn't resolved yet, so it's possible that this may change again.

Not sure how these schema changes stand with respect to validating. I don't think we've checked yet since Pydantic hasn't fixed the issue yet (#600)

@tnatt tnatt closed this Apr 23, 2024
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