-
-
Notifications
You must be signed in to change notification settings - Fork 31.7k
bpo-44490: Improve typing module compatibility with types.Union #27048
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
@Fidget-Spinner Could you please review this PR? |
The Python typing parts LGTM. But I need to do some revision for the C parts. |
Hmm I wonder if it would be better if you split out the pure Python changes (like the nested My reasoning follows that the Python changes can easily be backported. The C changes not so much and will require much more deliberation. What do you think Guido? @gvanrossum |
Agreed, this currently looks like two independent changes. See also the NEWS file. |
@Fidget-Spinner @gvanrossum Thats makes sense. I will convert this PR into containing only |
@Fidget-Spinner Could you please review this PR? |
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. Some minor questions and comments below.
Misc/NEWS.d/next/Core and Builtins/2021-07-06-22-22-15.bpo-44490.BJxPbZ.rst
Outdated
Show resolved
Hide resolved
…90.BJxPbZ.rst Co-authored-by: Ken Jin <[email protected]>
Co-authored-by: Ken Jin <[email protected]>
@Fidget-Spinner Could you please review this PR? |
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.
Yurii, sorry for the delay. Was a little busy. This LGTM. Thanks for submitting this PR.
BTW, it looks like the C changes to types.Union in the other PR won't make to 3.10 (we missed the beta 4 deadline). So we don't have to worry about backporting anymore.
Thanks for review, should we mention those changes at |
Yes I was just thinking about that ;). I recommend we mention in whatsnew for 3.11 that union now supports nested type parameters. |
Great, should it be done at separate PR? |
Please do! I don't think the other C changes to fix typing.Annotated are whatsnew worthy. So you can start on it. |
@gvanrossum Could you please review this PR? |
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.
Great work! I will merge.
@Fidget-Spinner Do you think this is worth a backport to 3.10? IIUC @serhiy-storchaka is backporting his types.Union improvements. |
I think it's worth a backport but we can't since the PR adding |
Never mind then. I guess that’s fine. |
Thanks to Serhiy's Mass Cleanup, we can now backport this. |
Thanks @uriyyo for the PR, and @gvanrossum for merging it 🌮🎉.. I'm working now to backport this PR to: 3.10. |
GH-27220 is a backport of this pull request to the 3.10 branch. |
…onGH-27048) (cherry picked from commit bf89ff9) Co-authored-by: Yurii Karabas <[email protected]>
…7048) (#27222) (cherry picked from commit bf89ff9) Co-authored-by: Yurii Karabas <[email protected]>
https://bugs.python.org/issue44490