Author terry.reedy
Recipients bkcsfi sfi, malthe, terry.reedy, yselivanov
Date 2015-06-26.20:46:38
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
The test suite must lack, and therefore needs, a simple testcase as in

In 3.4 and 3.5, getsource() joins the list of lines returned by getsourcelines().  In both versions, getsourcelines uses findsource(), which seems to be unchanged.  In 3.5, the output of findsource for code, function, and method objects is postprocessed by _line_number_helper(code_object).  The bug applies to methods also.

class C:
    def outer():
        def inner():
from inspect import getsource

omits 'inner1', but getsource(C) does not.  I believe the regression is due to ac86e5b2d45b in #21217.  (At first glance, it would seem that the fixup in _line_number_helper should be in the code object part of findsource itself.)  I requested on that issue that the authors take a look at this.
Date User Action Args
2015-06-26 20:46:38terry.reedysetrecipients: + terry.reedy, yselivanov, malthe, bkcsfi sfi
2015-06-26 20:46:38terry.reedysetmessageid: <>
2015-06-26 20:46:38terry.reedylinkissue24485 messages
2015-06-26 20:46:38terry.reedycreate