Message397816
Nosied over people from issue44490. This issue addresses msg396895:
Thanks to Ruben for the catch. (message copied over):
```
It also lacks the __module__ attribute, causing it to be unusable in PEP 593 typing.Annotated types:
from typing import Annotated
x: Annotated[int | str, 'test']
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Users/ruben/.pyenv/versions/3.10.0b3/lib/python3.10/typing.py", line 298, in inner
return cached(*args, **kwds)
File "/Users/ruben/.pyenv/versions/3.10.0b3/lib/python3.10/typing.py", line 1594, in __class_getitem__
return _AnnotatedAlias(origin, metadata)
File "/Users/ruben/.pyenv/versions/3.10.0b3/lib/python3.10/typing.py", line 1520, in __init__
super().__init__(origin, origin)
File "/Users/ruben/.pyenv/versions/3.10.0b3/lib/python3.10/typing.py", line 976, in __init__
self.__module__ = origin.__module__
AttributeError: 'types.Union' object has no attribute '__module__'. Did you mean: '__reduce__'?
``` |
|
Date |
User |
Action |
Args |
2021-07-19 17:03:27 | kj | set | recipients:
+ kj, gvanrossum, serhiy.storchaka, uriyyo, ROpdebee |
2021-07-19 17:03:27 | kj | set | messageid: <1626714207.64.0.461005517129.issue44662@roundup.psfhosted.org> |
2021-07-19 17:03:27 | kj | link | issue44662 messages |
2021-07-19 17:03:27 | kj | create | |
|