bpo-44490: Improve typing module compatibility with types.Union#27048
bpo-44490: Improve typing module compatibility with types.Union#27048gvanrossum merged 10 commits into
Conversation
The Python typing parts LGTM. But I need to do some revision for the C parts. |
Sorry, something went wrong.
|
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 |
Sorry, something went wrong.
|
Agreed, this currently looks like two independent changes. See also the NEWS file. |
Sorry, something went wrong.
|
@Fidget-Spinner @gvanrossum Thats makes sense. I will convert this PR into containing only |
Sorry, something went wrong.
Fidget-Spinner
left a comment
There was a problem hiding this comment.
LGTM. Some minor questions and comments below.
Sorry, something went wrong.
…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>
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.
Sorry, something went wrong.
|
Thanks for review, should we mention those changes at |
Sorry, something went wrong.
Yes I was just thinking about that ;). I recommend we mention in whatsnew for 3.11 that union now supports nested type parameters. |
Sorry, something went wrong.
|
Great, should it be done at separate PR? |
Sorry, something went wrong.
Please do! I don't think the other C changes to fix typing.Annotated are whatsnew worthy. So you can start on it. |
Sorry, something went wrong.
gvanrossum
left a comment
There was a problem hiding this comment.
Great work! I will merge.
Sorry, something went wrong.
|
@Fidget-Spinner Do you think this is worth a backport to 3.10? IIUC @serhiy-storchaka is backporting his types.Union improvements. |
Sorry, something went wrong.
|
I think it's worth a backport but we can't since the PR adding |
Sorry, something went wrong.
|
Never mind then. I guess that’s fine. |
Sorry, something went wrong.
|
Thanks to Serhiy's Mass Cleanup, we can now backport this. |
Sorry, something went wrong.
|
Thanks @uriyyo for the PR, and @gvanrossum for merging it 🌮🎉.. I'm working now to backport this PR to: 3.10. |
Sorry, something went wrong.
…onGH-27048) (cherry picked from commit bf89ff9) Co-authored-by: Yurii Karabas <1998uriyyo@gmail.com>
https://bugs.python.org/issue44490