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 <>
Example code:
code = """
import typing
T = typing.TypeVar("T")
exec(code, {})

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "<string>", line 3, in <module>
  File "C:\Python38\lib\", 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 will also raise when platform doesn't have `sys._getframe()`
Date User Action Args
2020-03-12 00:11:51jack1142setrecipients: + jack1142
2020-03-12 00:11:51jack1142setmessageid: <>
2020-03-12 00:11:51jack1142linkissue39942 messages
2020-03-12 00:11:51jack1142create