Author Eric.Wieser
Recipients Claudiu.Popa, Eric.Wieser, belopolsky, christian.heimes, gpolo, michele_s, pitrou, python-dev, yselivanov, ysj.ray
Date 2018-07-31.06:13:44
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
This now leaves `inspect.getsource` inconsistent with `inspect.getsourcefile`:

>>> import inspect
>>> from contextlib import contextmanager

>>> @contextmanager
... def func():
...    yield

>>> inspect.getsource(func)
'@contextmanager\ndef func():\n    yield\n'
'C:\\Program Files\\Python 3.5\\lib\\'

Should `getsourcefile` be changed to match?

This is causing numpy/numpy#11639, but it's not clear if this is a bug or by design.
Date User Action Args
2018-07-31 06:13:44Eric.Wiesersetrecipients: + Eric.Wieser, michele_s, belopolsky, pitrou, christian.heimes, gpolo, ysj.ray, Claudiu.Popa, python-dev, yselivanov
2018-07-31 06:13:44Eric.Wiesersetmessageid: <>
2018-07-31 06:13:44Eric.Wieserlinkissue1764286 messages
2018-07-31 06:13:44Eric.Wiesercreate