This issue tracker has been migrated to GitHub ,
and is currently read-only.
For more information,
see the GitHub FAQs in the Python's Developer Guide.
Created on 2012年04月05日 13:01 by Claudiu.Popa, last changed 2022年04月11日 14:57 by admin. This issue is now closed.
| Files | ||||
|---|---|---|---|---|
| File name | Uploaded | Description | Edit | |
| gprof.patch | Claudiu.Popa, 2012年04月05日 13:01 | |||
| gprof.patch | Claudiu.Popa, 2012年04月06日 08:10 | review | ||
| Messages (6) | |||
|---|---|---|---|
| msg157580 - (view) | Author: PCManticore (Claudiu.Popa) * (Python triager) | Date: 2012年04月05日 13:01 | |
Tools/gprof2html.py uses "file" to open a file. Also, the opened file passed to add_escapes was never closed. There's a test included in the patch. |
|||
| msg157631 - (view) | Author: R. David Murray (r.david.murray) * (Python committer) | Date: 2012年04月06日 01:25 | |
I'm getting 'malformed patch at line 30' when I try to apply your patch. Also, while it's not wrong, I don't think there's much point in catching the NameError and doing a fail. The second Exception clause is definitely wrong, though, we don't want other errors to pass silently. So I think the test should just do the call to gprof.main, with a comment mentioning this bug and saying that the call used to raise a NameError. (If it does fail for some other reason, then the test will need to get a little more complicated so that it doesn't.) |
|||
| msg157646 - (view) | Author: Éric Araujo (eric.araujo) * (Python committer) | Date: 2012年04月06日 06:21 | |
Should also use with statements IMO. |
|||
| msg157651 - (view) | Author: PCManticore (Claudiu.Popa) * (Python triager) | Date: 2012年04月06日 08:10 | |
Hello. I've attached the new version of the patch. I used with statement in add_escapes and the test was rewritten according to David's suggestion. |
|||
| msg158069 - (view) | Author: Roundup Robot (python-dev) (Python triager) | Date: 2012年04月11日 19:17 | |
New changeset 4d603d6782db by R David Murray in branch '3.2': #14508: make gprof2html script runnable under python3 http://hg.python.org/cpython/rev/4d603d6782db New changeset 73fba223c0a5 by R David Murray in branch 'default': #14508: make gprof2html script runnable under python3 http://hg.python.org/cpython/rev/73fba223c0a5 |
|||
| msg158070 - (view) | Author: R. David Murray (r.david.murray) * (Python committer) | Date: 2012年04月11日 19:20 | |
Thanks for the patch. I don't think you ran the test though, since it didn't pass, and there was a mistake in your patch :) I had to change the test considerably, and only applied the test part on 3.3 since I used mock. |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022年04月11日 14:57:28 | admin | set | github: 58713 |
| 2012年04月11日 19:20:58 | r.david.murray | set | status: open -> closed resolution: fixed messages: + msg158070 stage: resolved |
| 2012年04月11日 19:17:51 | python-dev | set | nosy:
+ python-dev messages: + msg158069 |
| 2012年04月06日 08:10:46 | Claudiu.Popa | set | files:
+ gprof.patch messages: + msg157651 |
| 2012年04月06日 06:21:26 | eric.araujo | set | nosy:
+ eric.araujo messages: + msg157646 |
| 2012年04月06日 01:25:42 | r.david.murray | set | nosy:
+ r.david.murray messages: + msg157631 |
| 2012年04月05日 13:01:07 | Claudiu.Popa | create | |