Issue 10685: trace does not ignore --ignore-module (original) (raw)

Created on 2010-12-12 12:34 by RusiMody, last changed 2022-04-11 14:57 by admin.

Files
File name Uploaded Description Edit
trace.diff tomhines,2013-10-31 15:09 Patch for trace.py
test_ignoredir.py tomhines,2015-05-26 07:24 Test --ignore-dir for --listfuncs and --trackcalls
Messages (8)
msg123836 - (view) Author: Rusi (RusiMody) Date: 2010-12-12 12:34
When running trace, I get a a lot of lines like: filename: /usr/lib/python2.7/cmd.py, modulename: cmd, funcname: Cmd That is to say system modules are shown in the trace whereas I only want to see the code I am working on Ive tried python2.7 -m trace --listfuncs tt.py --ignore-dir '/usr/lib' > const-dir.trace python2.7 -m trace --listfuncs --ignore-module cmd tt.py > const.trace python2.7 -m trace --ignore-module --listfuncs cmd tt.py > const.trace
msg124264 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2010-12-17 23:29
Please try the recent 2.7.1 release. This needs to be tested with current 3.1.3 or 3.1.b+ also.
msg201822 - (view) Author: Tom Hines (tomhines) * Date: 2013-10-31 15:09
The trace module ignores the --ignore-dir option for both the --listfuncs and --trackcalls modes. I have attached a patch.
msg243438 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2015-05-18 00:41
Tom, please sign the PSF Contributor Agreement https://www.python.org/psf/contrib/ https://www.python.org/psf/contrib/contrib-form/
msg243462 - (view) Author: Tom Hines (tomhines) * Date: 2015-05-18 07:11
Done. On Sun, May 17, 2015 at 8:42 PM, Terry J. Reedy <report@bugs.python.org> wrote: > > Terry J. Reedy added the comment: > > Tom, please sign the PSF Contributor Agreement > https://www.python.org/psf/contrib/ > https://www.python.org/psf/contrib/contrib-form/ > > ---------- > > _______________________________________ > Python tracker <report@bugs.python.org> > <http://bugs.python.org/issue10685> > _______________________________________ >
msg243510 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2015-05-18 17:45
(When replying by email to an email, please remove any quotation, except possibly for a specific line or two. The message already appears about yours on the tracker.) Good. It will take about a week for the * to appear after your name. As the diff is posted, hg could not find trace.py to patch. Changing --- Lib/trace.py Fri Feb 24 15:58:24 2012 +++ Lib/trace.py Wed Oct 30 16:35:49 2013 --- a/Lib/trace.py Fri Feb 24 15:58:24 2012 +++ b/Lib/trace.py Wed Oct 30 16:35:49 2013 fixed that problem, and 3/4 chunks apply to 3.4 (map has already been replaced). Running test/test_trace.py (with repository 3.4) gives the same errors as without the patch. The changes look sensible. However, a test is needed that fails without the patch and passes with it. Can you write one that could be added to the test file, or at least pieces of a test and a manual test procedure?
msg244086 - (view) Author: Tom Hines (tomhines) * Date: 2015-05-26 07:24
Test attached. Paste into test/test_trace.py. I tested in 2.7 and 3.4. Feel free to modify it.
msg315250 - (view) Author: Tom Hines (tomhines) * Date: 2018-04-13 16:39
bump
History
Date User Action Args
2022-04-11 14:57:10 admin set github: 54894
2018-04-13 16:39:57 tomhines set messages: +
2015-05-26 07:24:52 tomhines set files: + test_ignoredir.pymessages: +
2015-05-18 17:45:25 terry.reedy set messages: + stage: test needed
2015-05-18 07:11:55 tomhines set messages: +
2015-05-18 00:42:00 terry.reedy set messages: +
2013-11-05 03:26:12 terry.reedy set nosy: + belopolsky
2013-10-31 15:09:08 tomhines set files: + trace.diffnosy: + tomhinesmessages: + keywords: + patch
2012-07-15 03:56:38 eli.bendersky set nosy: - eli.bendersky
2010-12-17 23:29:01 terry.reedy set nosy: + eli.bendersky, terry.reedymessages: + title: trace does nto ignore --ignore-module -> trace does not ignore --ignore-module
2010-12-12 12:34:28 RusiMody create