Repository navigation
Remove support for eval_type_backport() - #13133
Merged
Merged
Conversation
Deploying pydantic-docs with
|
| Latest commit: |
643b3f6
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://8673f31a.pydantic-docs.pages.dev |
| Branch Preview URL: | https://vp-remove-eval-type-backport.pydantic-docs.pages.dev |
Viicos
force-pushed
the
vp/remove-eval-type-backport
branch
from
April 30, 2026 21:12
8bfea5a to
6af17bd
Compare
Merging this PR will improve performance by 22.03%
|
| Benchmark | BASE |
HEAD |
Efficiency | |
|---|---|---|---|---|
| ⚡ | test_tagged_union_with_callable_discriminator_schema_generation |
1.1 ms | 1.1 ms | +8.36% |
| ⚡ | test_simple_recursive_model_schema_generation |
771.2 µs | 632 µs | +22.03% |
Comparing vp/remove-eval-type-backport (643b3f6) with main (5c63f86)
Contributor
Coverage reportClick to see where and how coverage changed
This report was generated by python-coverage-comment-action |
||||||||||||||||||||||||||||||||||||
Viicos
force-pushed
the
vp/remove-eval-type-backport
branch
from
May 1, 2026 06:50
6af17bd to
3e37517
Compare
Viicos
force-pushed
the
vp/remove-eval-type-backport
branch
from
May 3, 2026 12:25
3e37517 to
9a56d43
Compare
Viicos
force-pushed
the
vp/remove-eval-type-backport
branch
from
May 5, 2026 10:29
d6e4386 to
9a56d43
Compare
davidhewitt
approved these changes
May 11, 2026
| ) -> Any: | ||
| """Evaluate the annotation using the provided namespaces. | ||
|
|
||
| This function relies on our own backport of `typing._eval_type()`, and provide better error messages |
Contributor
There was a problem hiding this comment.
Is our _eval_type below really a "backport"? Looks like it just makes sure we call _eval_type with the right arguments on each Python version, rather than bringing new features to older versions.
Member
Author
There was a problem hiding this comment.
I think I meant vendored, I updated it.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Change Summary
Fixes #10565 along the way, and clean up all the eval_type logic.
Related issue number
Checklist