Movatterモバイル変換


[0]ホーム

URL:


homepage

Issue39942

This issue trackerhas been migrated toGitHub, and is currentlyread-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title:Making instance of `TypeVar` fails because of missing `__name__`
Type:behaviorStage:resolved
Components:Library (Lib)Versions:Python 3.9, Python 3.8, Python 3.7
process
Status:closedResolution:fixed
Dependencies:Superseder:
Assigned To:Nosy List: hongweipeng, jack1142, levkivskyi, miss-islington
Priority:normalKeywords:patch

Created on2020-03-12 00:11 byjack1142, last changed2022-04-11 14:59 byadmin. This issue is nowclosed.

Pull Requests
URLStatusLinkedEdit
PR 19616mergedhongweipeng,2020-04-20 07:45
PR 19626mergedmiss-islington,2020-04-20 20:04
PR 19627mergedmiss-islington,2020-04-20 20:04
Messages (4)
msg363990 -(view)Author: Jakub Kuczys (jack1142)*Date: 2020-03-12 00:11
Example code:```code = """import typingT = 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 picklingKeyError: '__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()`
msg366872 -(view)Author: Ivan Levkivskyi (levkivskyi)*(Python committer)Date: 2020-04-20 20:02
New changeseta25a04fea5446b1712cde0cff556574be139285a by HongWeipeng in branch 'master':bpo-39942:Fix failure in `TypeVar` when missing `__name__` (GH-19616)https://github.com/python/cpython/commit/a25a04fea5446b1712cde0cff556574be139285a
msg366874 -(view)Author: miss-islington (miss-islington)Date: 2020-04-20 20:22
New changeset694a95ff437613e6295f531336b5bc7cab9e3713 by Miss Islington (bot) in branch '3.7':bpo-39942:Fix failure in `TypeVar` when missing `__name__` (GH-19616)https://github.com/python/cpython/commit/694a95ff437613e6295f531336b5bc7cab9e3713
msg366876 -(view)Author: miss-islington (miss-islington)Date: 2020-04-20 20:24
New changeset41660cac63c1a216e43335007e329e213054100e by Miss Islington (bot) in branch '3.8':bpo-39942:Fix failure in `TypeVar` when missing `__name__` (GH-19616)https://github.com/python/cpython/commit/41660cac63c1a216e43335007e329e213054100e
History
DateUserActionArgs
2022-04-11 14:59:28adminsetgithub: 84123
2020-04-20 20:28:52levkivskyisetstatus: open -> closed
resolution: fixed
stage: patch review -> resolved
2020-04-20 20:24:42miss-islingtonsetmessages: +msg366876
2020-04-20 20:22:41miss-islingtonsetmessages: +msg366874
2020-04-20 20:04:38miss-islingtonsetpull_requests: +pull_request18955
2020-04-20 20:04:31miss-islingtonsetnosy: +miss-islington
pull_requests: +pull_request18954
2020-04-20 20:02:00levkivskyisetnosy: +levkivskyi
messages: +msg366872
2020-04-20 07:45:56hongweipengsetkeywords: +patch
nosy: +hongweipeng

pull_requests: +pull_request18948
stage: patch review
2020-03-12 00:11:51jack1142create
Supported byThe Python Software Foundation,
Powered byRoundup
Copyright © 1990-2022,Python Software Foundation
Legal Statements

[8]ページ先頭

©2009-2026 Movatter.jp