You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Making instance of TypeVar fails because of missing __name__ #84123
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
assignee=Noneclosed_at=<Date2020-04-20.20:28:52.865>created_at=<Date2020-03-12.00:11:51.865>labels= ['3.7', '3.8', 'type-bug', 'library', '3.9']
title='Making instance of `TypeVar` fails because of missing `__name__`'updated_at=<Date2020-04-20.20:28:52.865>user='https://github.com/jack1142'
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()
Activity
jack1142 commentedon Mar 12, 2020
Example code:
Traceback:
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 havesys._getframe()ilevkivskyi commentedon Apr 20, 2020
New changeset a25a04f by HongWeipeng in branch 'master':
bpo-39942:Fix failure in
TypeVarwhen missing__name__(GH-19616)a25a04f
miss-islington commentedon Apr 20, 2020
New changeset 694a95f by Miss Islington (bot) in branch '3.7':
bpo-39942:Fix failure in
TypeVarwhen missing__name__(GH-19616)694a95f
miss-islington commentedon Apr 20, 2020
New changeset 41660ca by Miss Islington (bot) in branch '3.8':
bpo-39942:Fix failure in
TypeVarwhen missing__name__(GH-19616)41660ca