]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
bpo-17735: inspect.findsource now raises OSError when co_lineno is out of range ...
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Fri, 4 Dec 2020 22:41:58 +0000 (14:41 -0800)
committerGitHub <noreply@github.com>
Fri, 4 Dec 2020 22:41:58 +0000 (00:41 +0200)
commitd1f07419c7560ed3ba52ba4f667f4eec9b5fe95d
tree199831e3749b67236926270f989c218e00271379
parent40b92f1cc06f9aaba813ae38266f424e0969b089
bpo-17735: inspect.findsource now raises OSError when co_lineno is out of range (GH-23633)

This can happen when a file was edited after it was imported.
(cherry picked from commit 2e0760bb2edb595050aff82f236cd32b44d3dfb3)

Co-authored-by: Irit Katriel <iritkatriel@yahoo.com>
Lib/inspect.py
Lib/test/test_inspect.py
Misc/NEWS.d/next/Library/2020-12-03-22-22-24.bpo-17735.Qsaaue.rst [new file with mode: 0644]