Handle types.GenericAlias types properly during validation#27633
Merged
tvalentyn merged 5 commits intoapache:masterfrom Jul 25, 2023
Merged
Handle types.GenericAlias types properly during validation#27633tvalentyn merged 5 commits intoapache:masterfrom
tvalentyn merged 5 commits intoapache:masterfrom
Conversation
Codecov Report
@@ Coverage Diff @@
## master #27633 +/- ##
==========================================
- Coverage 71.10% 70.94% -0.16%
==========================================
Files 859 861 +2
Lines 104544 104795 +251
==========================================
+ Hits 74335 74346 +11
- Misses 28652 28892 +240
Partials 1557 1557
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 14 files with indirect coverage changes 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
tvalentyn
approved these changes
Jul 24, 2023
sdks/python/apache_beam/typehints/native_type_compatibility_test.py
Outdated
Show resolved
Hide resolved
tvalentyn
approved these changes
Jul 24, 2023
Contributor
|
Assigning reviewers. If you would like to opt out of this review, comment R: @damccorm for label python. Available commands:
The PR bot will only process comments in the main thread (not review comments). |
Contributor
Author
|
@tvalentyn PTAL at the small changes |
tvalentyn
reviewed
Jul 24, 2023
tvalentyn
approved these changes
Jul 25, 2023
Contributor
|
codecov fails b/c it runs on Python 3.8, we should be good w/ test coverage. |
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.
A bug was found by a user jumping from Python 3.10 to Python 3.11 failing a parameterized generic type check improperly. The root cause seems to be a lack of support for the PEP-585 types.GenericAlias class, which was not being treated as a typing generic by the type hinting code. This corrects that issue and adds a unit test case that reproduced the original issue.
Thank you for your contribution! Follow this checklist to help us incorporate your contribution quickly and easily:
addresses #123), if applicable. This will automatically add a link to the pull request in the issue. If you would like the issue to automatically close on merging the pull request, commentfixes #<ISSUE NUMBER>instead.CHANGES.mdwith noteworthy changes.See the Contributor Guide for more tips on how to make review process smoother.
To check the build health, please visit https://github.com/apache/beam/blob/master/.test-infra/BUILD_STATUS.md
GitHub Actions Tests Status (on master branch)
See CI.md for more information about GitHub Actions CI.