From 4a67a6741660d32a31ed74b5c4b981553cd7be41 Mon Sep 17 00:00:00 2001 From: Skip Montanaro Date: Sun, 11 Feb 2007 18:41:56 +0000 Subject: [PATCH] backport: fix trace.py --ignore-dir --- Lib/trace.py | 2 +- Misc/NEWS | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/Lib/trace.py b/Lib/trace.py index 35edac2eea..364e3f7bc9 100644 --- a/Lib/trace.py +++ b/Lib/trace.py @@ -587,7 +587,7 @@ class Trace: """ if why == 'call': code = frame.f_code - filename = code.co_filename + filename = frame.f_globals.get('__file__', None) if filename: # XXX modname() doesn't work right for packages, so # the ignore support won't work right for packages diff --git a/Misc/NEWS b/Misc/NEWS index 0ac7328ea3..e6832c6fc8 100644 --- a/Misc/NEWS +++ b/Misc/NEWS @@ -169,6 +169,9 @@ Extension Modules Library ------- +- Patch 1571379: Make trace's --ignore-dir facility work in the face of + relative directory names. + - Bug #1600860: Search for shared python library in LIBDIR, not lib/python/config, on "linux" and "gnu" systems. -- 2.40.0