-
-
Notifications
You must be signed in to change notification settings - Fork 32.2k
bpo-44632: Fix support of TypeVar in the union type #27139
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
bpo-44632: Fix support of TypeVar in the union type #27139
Conversation
int | TypeVar('T') returns now an instance of types.Union instead of typing.Union.
b36ae20
to
531338f
Compare
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.
LGTM. I was working on this too and I eventually came to the same solution as you :).
Hmm does this need news? Or are we bundling all the TypeVar issues into one news item later on? |
It has little effect on user. |
Thanks @serhiy-storchaka for the PR 🌮🎉.. I'm working now to backport this PR to: 3.10. |
GH-27143 is a backport of this pull request to the 3.10 branch. |
int | TypeVar('T') returns now an instance of types.Union instead of typing.Union. (cherry picked from commit a158b20) Co-authored-by: Serhiy Storchaka <[email protected]>
) int | TypeVar('T') returns now an instance of types.Union instead of typing.Union. (cherry picked from commit a158b20) Co-authored-by: Serhiy Storchaka <[email protected]>
|
https://bugs.python.org/issue44632