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 BTaskaya
Recipients BTaskaya, gvanrossum, yselivanov
Date 2020-12-23.13:33:57
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1608730438.02.0.643840163874.issue41960@roundup.psfhosted.org>
In-reply-to
Content
> It's been a while, I've lost context for this idea. What problem are you trying to solve here? Are there issues where people have reported problems that this would allow them to solve?

Context: https://github.com/python/cpython/pull/20434#discussion_r499289645

tl;dr: 
import inspect

def foo():
    class F: ...
    def foo(bar: F): ...
    print(inspect.signature(foo))

foo()

Normally, if inspect.signature is able to resolve annotations with the current globals()/locals() it will give the resolved version, if not the string version. So adding this would allow people to choose which namespace inspect.signature will pass to the typing.get_type_hints. (inspect.signature(foo, localns=locals()) would give directly the F object instead of 'F', etc.)
History
Date User Action Args
2020-12-23 13:33:58BTaskayasetrecipients: + BTaskaya, gvanrossum, yselivanov
2020-12-23 13:33:58BTaskayasetmessageid: <1608730438.02.0.643840163874.issue41960@roundup.psfhosted.org>
2020-12-23 13:33:58BTaskayalinkissue41960 messages
2020-12-23 13:33:57BTaskayacreate