Issue 1571379: make trace.py --ignore-dir work (original) (raw)

Issue1571379

Created on 2006-10-05 13:10 by clintonroy, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
trace.patch clintonroy,2006-10-05 13:10
Messages (5)
msg51202 - (view) Author: Clinton Roy (clintonroy) Date: 2006-10-05 13:10
The co_filename attribute is only ever the relative filename, where as the __file__ value of the frame globals is absolute, which lets the ignore() stuff do its thing.
msg51203 - (view) Author: Skip Montanaro (skip.montanaro) * (Python triager) Date: 2006-10-07 10:25
Logged In: YES user_id=44345 Without digging too deeply, can you explain why only this one instance of using code.co_filename needs to be changed?
msg51204 - (view) Author: Clinton Roy (clintonroy) Date: 2006-10-08 12:02
Logged In: YES user_id=31446 Hi Skip, This patch only addresses --ignore-dir working, I didn't initally look at the other uses. Now that I have, they're all passed to linecache, which itself looks in $prefix for a matching filename, so it only needs the relative filename to be passed. My patch specifically just targets the filename param passed to ignore.names() so that it can actually work. cheers,
msg51205 - (view) Author: Skip Montanaro (skip.montanaro) * (Python triager) Date: 2007-02-11 18:38
Checked in on SVN head as rev 53735. Checked in on 2.4 branch as rev 53736. Will also backport to 2.5 once I figure out why svn thinks I have a conflict in Misc/NEWS.
msg51206 - (view) Author: Skip Montanaro (skip.montanaro) * (Python triager) Date: 2007-02-11 18:42
2.5 versions is rev 53537.
History
Date User Action Args
2022-04-11 14:56:20 admin set github: 44086
2006-10-05 13:10:15 clintonroy create