From: Skip Montanaro Date: Sun, 11 Feb 2007 18:37:54 +0000 (+0000) Subject: backport: fix trace.py --ignore-dir X-Git-Tag: v2.4.5c1~17 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fd8367ff26bfb4f2bc6a4d4c7b5946b60cca19c5;p=thirdparty%2FPython%2Fcpython.git backport: fix trace.py --ignore-dir --- diff --git a/Lib/trace.py b/Lib/trace.py index 799c30280840..967dfd04130d 100644 --- a/Lib/trace.py +++ b/Lib/trace.py @@ -583,7 +583,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 8aa13bad0bc6..280b6aa34936 100644 --- a/Misc/NEWS +++ b/Misc/NEWS @@ -192,6 +192,9 @@ Extension Modules Library ------- +- Patch 1571379: Make trace's --ignore-dir facility work in the face of + relative directory names. + - Bug #1545341: The 'classifier' keyword argument to the Distutils setup() function now accepts tuples as well as lists.