From 6d0e1c8478cbf3d16f7dd9ef3c947de8c9a46a11 Mon Sep 17 00:00:00 2001 From: "Miss Islington (bot)" <31488909+miss-islington@users.noreply.github.com> Date: Wed, 29 Oct 2025 17:26:38 +0100 Subject: [PATCH] [3.14] gh-140228: Avoid making unnecessary syscalls in linecache for frozen modules (GH-140377) (#140738) gh-140228: Avoid making unnecessary syscalls in linecache for frozen modules (GH-140377) (cherry picked from commit c41f84ff61c52e3ff7ef86b0c66208b29613d23d) Co-authored-by: tconley1428 --- Lib/linecache.py | 5 ++++- .../Library/2025-10-28-17-43-51.gh-issue-140228.8kfHhO.rst | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) create mode 100644 Misc/NEWS.d/next/Library/2025-10-28-17-43-51.gh-issue-140228.8kfHhO.rst diff --git a/Lib/linecache.py b/Lib/linecache.py index 87d7d6fda657..2b5a31b3e75b 100644 --- a/Lib/linecache.py +++ b/Lib/linecache.py @@ -131,9 +131,12 @@ def updatecache(filename, module_globals=None): if _source_unavailable(filename): return [] - if filename.startswith('