mirror of
https://github.com/python/cpython.git
synced 2025-11-20 02:50:14 +00:00
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.
This commit is contained in:
commit
f98c35a816
3 changed files with 29 additions and 5 deletions
|
|
@ -57,6 +57,9 @@ Core and Builtins
|
|||
Library
|
||||
-------
|
||||
|
||||
- Issue #22485: Fixed an issue that caused `inspect.getsource` to return incorrect
|
||||
results on nested functions.
|
||||
|
||||
- Issue #22153: Improve unittest docs. Patch from Martin Panter and evilzero.
|
||||
|
||||
- Issue #24580: Symbolic group references to open group in re patterns now are
|
||||
|
|
@ -579,6 +582,10 @@ Library
|
|||
- Issue #23342: Add a subprocess.run() function than returns a CalledProcess
|
||||
instance for a more consistent API than the existing call* functions.
|
||||
|
||||
- Issue #21217: inspect.getsourcelines() now tries to compute the start and end
|
||||
lines from the code object, fixing an issue when a lambda function is used as
|
||||
decorator argument. Patch by Thomas Ballinger and Allison Kaptur.
|
||||
|
||||
- Issue #24521: Fix possible integer overflows in the pickle module.
|
||||
|
||||
- Issue #22931: Allow '[' and ']' in cookie values.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue