-
-
Notifications
You must be signed in to change notification settings - Fork 32.2k
bpo-46413: cover __or__
in _GenericAlias
and _SpecialGenericAlias
#30640
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
Conversation
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.
Thanks for your efforts to increase our code coverage. You might want to check if there are overlaps with https://github.com/python/cpython/blob/main/Lib/test/test_types.py#L628. The tests are in test_types
instead of test_typing
because the initial implementation used a types.UnionType instead of a typing.Union.
Yes, seems like some cases are covered there, but not all, like both Thanks for letting me know! 👍 |
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 I understand correctly, the _SpecialGenericAlias
and possibly _GenericAlias
code paths were not tested previously right? So that's what these tests are trying to cover.
Thanks again, I have a few comments and it'll be ready to merge.
Co-authored-by: Ken Jin <28750310+Fidget-Spinner@users.noreply.github.com>
Co-authored-by: Ken Jin <28750310+Fidget-Spinner@users.noreply.github.com>
Co-authored-by: Ken Jin <28750310+Fidget-Spinner@users.noreply.github.com>
Thanks @sobolevn for the PR, and @Fidget-Spinner for merging it 🌮🎉.. I'm working now to backport this PR to: 3.9. |
Thanks @sobolevn for the PR, and @Fidget-Spinner for merging it 🌮🎉.. I'm working now to backport this PR to: 3.10. |
GH-30693 is a backport of this pull request to the 3.9 branch. |
…ias` (pythonGH-30640) Co-authored-by: Ken Jin <28750310+Fidget-Spinner@users.noreply.github.com> (cherry picked from commit 0a49148) Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
…ias` (pythonGH-30640) Co-authored-by: Ken Jin <28750310+Fidget-Spinner@users.noreply.github.com> (cherry picked from commit 0a49148) Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
GH-30694 is a backport of this pull request to the 3.10 branch. |
CC @corona10 as my mentor
https://bugs.python.org/issue46413