-
Notifications
You must be signed in to change notification settings - Fork 235
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
Optimized traversal of schema tree for schema cleaning (GenerateSchema.clean_schema
)
#1487
base: main
Are you sure you want to change the base?
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1487 +/- ##
==========================================
- Coverage 90.21% 89.13% -1.09%
==========================================
Files 106 113 +7
Lines 16339 17915 +1576
Branches 36 40 +4
==========================================
+ Hits 14740 15968 +1228
- Misses 1592 1927 +335
- Partials 7 20 +13
... and 51 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
|
CodSpeed Performance ReportMerging #1487 will not alter performanceComparing Summary
|
18a29c4
to
f2b4fc2
Compare
please review |
GenerateSchema.clean_schema
)
0ea8bb3
to
7eae801
Compare
Change Summary
Adds schema tree traversal which gathers necessary schema nodes and information for schema inlining and discriminator handling. Schema tree traversal is done in a single pass gathering the needed information. This is used in
GenerateSchema.clean_schema
handling. Required for PR pydantic/pydantic#10655 This makes schema cleaning much more efficient where the biggest bottleneck has been the Python side tree traversal. This especially with lots of models or deep models.Related issue number
See above Pydantic side PR.
Checklist
pydantic-core
(except for expected changes)Selected Reviewer: @sydney-runkle