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 jack1142
Recipients jack1142
Date 2020-03-12.00:11:51
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1583971911.89.0.874740392795.issue39942@roundup.psfhosted.org>
In-reply-to
Content
Example code:
```
code = """
import typing
T = typing.TypeVar("T")
"""
exec(code, {})
```

Traceback:
```
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "<string>", line 3, in <module>
  File "C:\Python38\lib\typing.py", line 603, in __init__
    def_mod = sys._getframe(1).f_globals['__name__']  # for pickling
KeyError: '__name__'
```

If this problem with `__name__` is not something that needs to be fixed, then I also noticed that the same line in typing.py will also raise when platform doesn't have `sys._getframe()`
History
Date User Action Args
2020-03-12 00:11:51jack1142setrecipients: + jack1142
2020-03-12 00:11:51jack1142setmessageid: <1583971911.89.0.874740392795.issue39942@roundup.psfhosted.org>
2020-03-12 00:11:51jack1142linkissue39942 messages
2020-03-12 00:11:51jack1142create