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 schema build for nested dataclasses / TypedDicts with discriminators #8950
Conversation
Deploying with Cloudflare Pages
|
Please review |
CodSpeed Performance ReportMerging #8950 will not alter performanceComparing Summary
|
Co-authored-by: David Montague <35119617+dmontagu@users.noreply.github.com>
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.
If this fixes the new test cases and doesn't break others this seems good to me. Great job on the comments by the way!
Do we have any sort of benchmark tests for this stuff? My main concern with future changes is that evidently modifying 1 line of code can take us from linear to exponential complexity. Maybe we can add a really naive test that just calls time()
on 1
input and time()
on 1000
input and make sure it's <= 5k times slower (so give or take linear)?
Revisit the changes made in #7646, which introduced a few bugs for edge cases when building schemas for nested dataclasses / TypedDicts with discriminators.
Fix #8271
Fix #8628
Selected Reviewer: @hramezani