This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author kj
Recipients ROpdebee, gvanrossum, kj, serhiy.storchaka, uriyyo
Date 2021-07-19.17:03:27
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
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/", line 298, in inner
    return cached(*args, **kwds)
  File "/Users/ruben/.pyenv/versions/3.10.0b3/lib/python3.10/", line 1594, in __class_getitem__
    return _AnnotatedAlias(origin, metadata)
  File "/Users/ruben/.pyenv/versions/3.10.0b3/lib/python3.10/", line 1520, in __init__
    super().__init__(origin, origin)
  File "/Users/ruben/.pyenv/versions/3.10.0b3/lib/python3.10/", 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:27kjsetrecipients: + kj, gvanrossum, serhiy.storchaka, uriyyo, ROpdebee
2021-07-19 17:03:27kjsetmessageid: <>
2021-07-19 17:03:27kjlinkissue44662 messages
2021-07-19 17:03:27kjcreate