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
Add eval_type_backport to handle union operator and builtin generic subscripting in older Pythons #8209
Merged
Merged
Add eval_type_backport to handle union operator and builtin generic subscripting in older Pythons #8209
Changes from all commits
Commits
Show all changes
34 commits
Select commit
Hold shift + click to select a range
75986a9
Add eval_type_backport to handle union operator in older Pythons
alexmojaki ca60caa
Use modified get_type_hints in test_config
alexmojaki a163ea3
unskip a couple more tests in older pythons
alexmojaki 8033556
Use pipe operator in a bunch of tests
alexmojaki 0495f0f
various misc tidying up: use default localns=None, handle None values…
alexmojaki 780b46a
explain asserts
alexmojaki 4c536b6
type hints
alexmojaki d7f874b
inline node_to_ref
alexmojaki 09d2e93
is_unsupported_types_for_union_error
alexmojaki d7b1462
tidying
alexmojaki c65ae3d
remove more type: ignore comments
alexmojaki 3aa88da
docstrings and tidying
alexmojaki ca09a03
fix and tighten test_is_union
alexmojaki 4890fc8
Merge branch 'main' of github.com:pydantic/pydantic into eval_type_ba…
alexmojaki c2d9d22
Use `eval_type_backport` package
alexmojaki 40a41fb
Add test dependency
alexmojaki 7da17e0
Merge branch 'main' of github.com:pydantic/pydantic into eval_type_ba…
alexmojaki a998d14
upgrade eval_type_backport
alexmojaki 4f465a3
fix pdm.lock
alexmojaki 71ca7cf
upgrade eval_type_backport to handle fussy typing._type_check
alexmojaki f060876
update is_backport_fixable_error and move down, update eval_type_back…
alexmojaki 2b42d65
raise helpful error if eval_type_backport isn't installed. ensure tes…
alexmojaki dcbdd28
Restore skip, add another test for combination of backport and Pydant…
alexmojaki 959c755
Test that eval_type_backport is being called in the right places
alexmojaki 71c912e
test calling backport from get_type_hints
alexmojaki 9847058
upgrade eval_type_backport to handle working union operator
alexmojaki 6beab5b
unskip tests that can now pass in 3.8
alexmojaki b79692b
revert scattered test changes
alexmojaki 6bc0ee4
unskip more tests
alexmojaki f423659
upgrade eval_type_backport to copy ForwardRef attributes, allowing un…
alexmojaki d3d5584
Merge branch 'main' of github.com:pydantic/pydantic into eval_type_ba…
alexmojaki aa21092
revert moving part of pyproject.toml
alexmojaki 8da4294
Refine and test error raised when eval_type_backport isn't installed
alexmojaki 60aa70f
use a type annotation that's unsupported in 3.9, not just 3.8
alexmojaki File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.
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.
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.
why don't we need this anymore?
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.
AFAICT this could always have been replaced with
typing._eval_type
. Now it has to be, with the backport.