[issue42233] GenericAlias does not support union type expressions

2021-11-21 Thread Dávid Nemeskey
Dávid Nemeskey added the comment: @kj Sorry, for some reason, I thought the that issue affected Union as well, but I have just re-tested it and found that it works. -- ___ Python tracker

[issue42233] GenericAlias does not support union type expressions

2021-11-19 Thread Ken Jin
Ken Jin added the comment: @Dávid No it won't land in 3.9. Union type expressions (PEP 604) were only officially added in 3.10. We don't backport new features, only bugfixes. Sorry! -- ___ Python tracker

[issue42233] GenericAlias does not support union type expressions

2021-11-19 Thread Dávid Nemeskey
Dávid Nemeskey added the comment: Guys, any chance the fix will land in 3.9? It is affected as well. -- nosy: +nemeskeyd ___ Python tracker ___

[issue42233] GenericAlias does not support union type expressions

2020-11-08 Thread Ken Jin
Change by Ken Jin : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ ___

[issue42233] GenericAlias does not support union type expressions

2020-11-08 Thread Guido van Rossum
Guido van Rossum added the comment: New changeset 4eb41d055e8307b8206f680287e492a6db068acd by kj in branch 'master': bpo-42233: Add union type expression support for GenericAlias and fix de-duplicating of GenericAlias (GH-23077)

[issue42233] GenericAlias does not support union type expressions

2020-11-07 Thread miss-islington
miss-islington added the comment: New changeset e81e09bfc8a29a44a649a962870a26fe0c097cfa by Miss Islington (bot) in branch '3.9': bpo-42233: Correctly repr GenericAlias when used with typing module (GH-23081) https://github.com/python/cpython/commit/e81e09bfc8a29a44a649a962870a26fe0c097cfa

[issue42233] GenericAlias does not support union type expressions

2020-11-01 Thread miss-islington
Change by miss-islington : -- pull_requests: +22000 pull_request: https://github.com/python/cpython/pull/23082 ___ Python tracker ___

[issue42233] GenericAlias does not support union type expressions

2020-11-01 Thread miss-islington
miss-islington added the comment: New changeset 1f7dfb277e5b88cddc13e5024766be787a3e9127 by kj in branch 'master': bpo-42233: Correctly repr GenericAlias when used with typing module (GH-23081) https://github.com/python/cpython/commit/1f7dfb277e5b88cddc13e5024766be787a3e9127 --

[issue42233] GenericAlias does not support union type expressions

2020-11-01 Thread Ken Jin
Change by Ken Jin : -- pull_requests: +21999 pull_request: https://github.com/python/cpython/pull/23081 ___ Python tracker ___ ___

[issue42233] GenericAlias does not support union type expressions

2020-11-01 Thread Ken Jin
Ken Jin added the comment: @Serhiy, wow interesting find, it seems to be typing's repr problem rather than the actual types itself: >>> typing.Union[dict[int, str], list[str]] typing.Union[dict, list] >>> typing.Union[dict[int, str], list[str]].__args__ (dict[int, str], list[str]) The

[issue42233] GenericAlias does not support union type expressions

2020-11-01 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: There is also a problem with typing module. >>> typing.List[int] | dict[float, str] typing.Union[typing.List[int], dict] -- nosy: +serhiy.storchaka ___ Python tracker

[issue42233] GenericAlias does not support union type expressions

2020-11-01 Thread Ken Jin
Change by Ken Jin : -- keywords: +patch pull_requests: +21997 stage: -> patch review pull_request: https://github.com/python/cpython/pull/23077 ___ Python tracker ___

[issue42233] GenericAlias does not support union type expressions

2020-11-01 Thread Ken Jin
New submission from Ken Jin : Union type expressions added in PEP 604 throw an error when both operands are GenericAlias objects. Eg the following works:: int | list[str] The following throws TypeError:: list[int] | dict[float, str] Traceback (most recent call last): File "", line 1, in