]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
Issue #24485: Function source inspection fails on closures.
authorMeador Inge <meadori@gmail.com>
Fri, 24 Jul 2015 03:52:49 +0000 (22:52 -0500)
committerMeador Inge <meadori@gmail.com>
Fri, 24 Jul 2015 03:52:49 +0000 (22:52 -0500)
commitf98c35a8160e7e373da0de4f348bbeaa3b718041
treea67a34548e2ca3d18bea7908fd94b7a0705a4de7
parentc6fde85c68981565a1177dfc21abaa61549d19c4
parent5b718d7f4fc3ad28ffb774aa96324a81f5f3e742
Issue #24485: Function source inspection fails on closures.

The fix for Issue #21217 introduced a regression that caused
`inspect.getsource` to return incorrect results on nested
functions.  The root cause of the regression was due to
switching the implementation to analyze the underlying
bytecode instead of the source code.

This commit switches things back to analyzing the source code
in a more complete way.  The original bug and the regression
are both fixed by the new source code analysis.
Lib/inspect.py
Lib/test/test_inspect.py
Misc/NEWS