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 hpk
Recipients hpk
Date 2010-05-21.14:34:06
SpamBayes Score 2.8532604e-05
Marked as misclassified No
Message-id <1274452449.06.0.949392077471.issue8782@psf.upfronthosting.co.za>
In-reply-to
Content
Executing the attached "inspect_failure.py" under python2.6 or python3.1 results in an assertion error: Python fails to obtain the source code of a function that is defined at the end of a module whose last line does not contain a line ending character. 

After brief analysis i think there are two approaches to fixing it: normalizing newlines in inspect.findsource (see attached inspect.patch file against r312) or performing normalization in linecache.updatecache which does it already for source code obtained from PEP302 loaders. Or any other ideas?
History
Date User Action Args
2010-05-21 14:34:09hpksetrecipients: + hpk
2010-05-21 14:34:09hpksetmessageid: <1274452449.06.0.949392077471.issue8782@psf.upfronthosting.co.za>
2010-05-21 14:34:07hpklinkissue8782 messages
2010-05-21 14:34:06hpkcreate