[3.13] gh-103956: Fix trace output in case of missing source line (GH-103958) (GH-118834)

Print only filename with lineno if linecache.getline() returns an empty string.
(cherry picked from commit 7c87ce777b)

Co-authored-by: Radislav Chugunov <52372310+chgnrdv@users.noreply.github.com>
This commit is contained in:
Miss Islington (bot) 2024-05-09 15:05:37 +02:00 • committed by GitHub
parent d86b494117
commit c4b853f2a5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 38 additions and 4 deletions

View file

@ -0,0 +1 @@
Fix lack of newline characters in :mod:`trace` module output when line tracing is enabled but source code line for current frame is not available.