]> 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 21:44:53 +0000 (13:44 -0800)
committerGitHub <noreply@github.com>
Fri, 4 Dec 2020 21:44:53 +0000 (13:44 -0800)
commita4e7d5f750e06e31a80a83c2af02b1a40cecd0ff
treef2ffb6db1be56eea428b87f1b04fe83482dd60cb
parent3b14f18205b17d1634e21bd7bc48152247590d9f
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]