-
Notifications
You must be signed in to change notification settings - Fork 4
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
Pydantic 2.7.1 causes IOC instance generation warnings (and test failures) #217
Comments
Rather appears like a possible bug? related to type Literal pydantic/pydantic#9402 - In
So each entity class type field is serialized as an enum. I believe this is then why we get the According to pydantic/pydantic#6565 seems |
Thanks @marcelldls that seems like a decent fix. Do you know if this affects the Definition arg type enum? I assume there is a test for this arg type already so hopefully that would have been picked up. @coretl do any of our other pragmatic projects use the type literal approach. Maybe if so they are affected too? |
Maybe pvi too? @GDYendell |
I have updated pvi to use pydantic>2.7 and it just meant updating the schemas. The tests still passed. Is it the case for ibek that it is just a schema change or does it actually not work? pvi does use |
Thanks @marcelldls your suggestion fixed the issue and the dependabot PR is merged. |
It looks like the latest Pydantic has changed the way in which it validates enums.
If I upgrade to Pydantic 2.7.1 and run
tests/generate_samples.sh
the first line that tries to generate IOC runtime assets gets multiple errors of the form below.I'm assigning this issue to @marcelldls because it might be a good introduction to Pydantic and ibek's use of it.
Also see #210 where dependabot tries out this version of Pydantic/
The text was updated successfully, but these errors were encountered: