Message106245
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? |
|
Date |
User |
Action |
Args |
2010-05-21 14:34:09 | hpk | set | recipients:
+ hpk |
2010-05-21 14:34:09 | hpk | set | messageid: <1274452449.06.0.949392077471.issue8782@psf.upfronthosting.co.za> |
2010-05-21 14:34:07 | hpk | link | issue8782 messages |
2010-05-21 14:34:06 | hpk | create | |
|