bpo-44490: Improve typing module compatibility with types.Union#27048
bpo-44490: Improve typing module compatibility with types.Union#27048gvanrossum merged 10 commits intopython:mainfrom
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? |
Fidget-Spinner
left a comment
There was a problem hiding this comment.
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 <28750310+Fidget-Spinner@users.noreply.github.com>
Co-authored-by: Ken Jin <28750310+Fidget-Spinner@users.noreply.github.com>
|
@Fidget-Spinner Could you please review this PR? |
There was a problem hiding this comment.
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? |
|
@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 <1998uriyyo@gmail.com>
https://bugs.python.org/issue44490