- Sponsor
-
Notifications
You must be signed in to change notification settings - Fork 228
feat: Upgrade internal Pydantic use to v2. Thanks @KristinnVikar! #779
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
Conversation
Looking at tests shows me that str as key instead of ClassName is more expected?
Local tests seem to be mostly working, only tests failing are So I went about a different approach to roughly match the content of the GeneratorError instead of exact match (Since the Pydantic version is included in GeneratorError.detail) |
Codecov Report
@@ Coverage Diff @@
## main #779 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 49 49
Lines 1971 1918 -53
=========================================
- Hits 1971 1918 -53
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
* Schema union ordering try Schema before Reference * Support for boolean values in Schema.enum * Missing default=None in SecurityScheme.security_scheme_in which is enforced by Pydantic V2 * Update Pydantic to V2.1.1
Did some minor fixes with missing default in Field & schema ordering. Running it on the project I'm using this tool for seems to work just fine as of this last commit! Hoping someone else can test it as well to see if there's any issues I need to fix! |
Thanks for this @KristinnVikar! Just wanted to drop a link to some thoughts I had written on another thread about the motivation for this change |
For what it's worth, I have tested it for my use cases and did not encounter any issues :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks so much for doing this!
Inital changes required for Pydantic v2 support, both hand updating + bump pydantic
Blockers
Currently
142 out of 449 tests are failing, all of which are due to the issue above.