msg143449 - (view) |
Author: Jeff McNeil (mcjeff) * |
Date: 2011-09-03 02:21 |
If cgitb.enable is ran with a logdir set and a format='text' argument, then a trailing message is printed that includes <p> tags. This should only happen if the format requested is HTML.
The following tiny script shows the problem:
import cgitb
cgitb.enable(format='text', logdir='/tmp')
1/0
Attaching a small patch which addresses. This is against tip on the default branch.
mcjeff@macbook:~/cpython$ ./python.exe --version
Python 3.3.0a0
|
msg147956 - (view) |
Author: Jeff McNeil (mcjeff) * |
Date: 2011-11-19 17:07 |
Is there anything else needed here?
|
msg147960 - (view) |
Author: Ezio Melotti (ezio.melotti) *  |
Date: 2011-11-19 17:27 |
A test?
|
msg147963 - (view) |
Author: Jeff McNeil (mcjeff) * |
Date: 2011-11-19 17:57 |
I didn't add one initially as I was just changing output format and not actual behavior. I guess I could add something to ensure it doesn't regress? I'll make sure there's coverage to begin with.
|
msg147965 - (view) |
Author: Jeff McNeil (mcjeff) * |
Date: 2011-11-19 18:20 |
Test to ensure html isn't included when the formatting is text. I don't seem to be able to update the stage.
|
msg147986 - (view) |
Author: Éric Araujo (eric.araujo) *  |
Date: 2011-11-20 12:20 |
Thanks for the updated patch. I made a review, you should have received an email. When you make a new patch, it would be most helpful if you could make one patch with code and tests changes, and then we’ll remove the old versions.
|
msg148005 - (view) |
Author: Jeff McNeil (mcjeff) * |
Date: 2011-11-20 19:43 |
Added everything to one file. Updated tests to also include a logdir argument as that is required to trigger the original bug. Weeded out a spurious write that occurred when format was set to text.
|
msg148056 - (view) |
Author: Éric Araujo (eric.araujo) *  |
Date: 2011-11-21 15:24 |
Latest patch is good to go.
|
msg155578 - (view) |
Author: Jeff McNeil (mcjeff) * |
Date: 2012-03-13 08:03 |
Did this ever get committed? Is there anything left for me to do here?
|
msg155596 - (view) |
Author: Éric Araujo (eric.araujo) *  |
Date: 2012-03-13 12:13 |
I’ll apply it shortly.
|
msg169161 - (view) |
Author: Ezio Melotti (ezio.melotti) *  |
Date: 2012-08-26 04:45 |
What about closing the </p> too (see attached patch)?
(I know the </p> is not necessary, but I prefer to add it.)
|
msg173958 - (view) |
Author: Roundup Robot (python-dev)  |
Date: 2012-10-27 18:57 |
New changeset 715e5b337c91 by R David Murray in branch '2.7':
#12890: don't emit <p> tags in text mode when logdir specified.
http://hg.python.org/cpython/rev/715e5b337c91
New changeset abbfb89055d3 by R David Murray in branch '3.2':
#12890: don't emit <p> tags in text mode when logdir specified.
http://hg.python.org/cpython/rev/abbfb89055d3
New changeset 45764e4bb504 by R David Murray in branch '3.3':
merge #12890: don't emit <p> tags in text mode when logdir specified.
http://hg.python.org/cpython/rev/45764e4bb504
New changeset b21c28258d3c by R David Murray in branch 'default':
merge #12890: don't emit <p> tags in text mode when logdir specified.
http://hg.python.org/cpython/rev/b21c28258d3c
|
msg173959 - (view) |
Author: R. David Murray (r.david.murray) *  |
Date: 2012-10-27 18:59 |
Committed with Ezio's <\p> and with simplification of the tests by using script_helper. Thanks, Jeff!
|
msg173980 - (view) |
Author: R. David Murray (r.david.murray) *  |
Date: 2012-10-27 21:33 |
The tests fail on Widows7 on the buildbots. (They work fine in my XP Windows VM.)
|
msg173982 - (view) |
Author: Roundup Robot (python-dev)  |
Date: 2012-10-27 21:40 |
New changeset 0e4574595674 by R David Murray in branch '3.3':
#12890: skip tests which fail on windows until fixed or rewritten.
http://hg.python.org/cpython/rev/0e4574595674
New changeset 57a33af85407 by R David Murray in branch 'default':
merge #12890: skip tests which fail on windows until fixed or rewritten.
http://hg.python.org/cpython/rev/57a33af85407
|
msg173984 - (view) |
Author: R. David Murray (r.david.murray) *  |
Date: 2012-10-27 21:41 |
I put in a skip until we either fix the tests or rewrite them as suggested in issue 15749.
|
msg174173 - (view) |
Author: Stephen Tonkin (sptonkin) * |
Date: 2012-10-30 01:21 |
Uploaded a patch which fixes the failing on Windows 7.
It was essentially an issue with the Windows path returned by temp_dir() containing unescaped backslashes. A repr() fixed this.
|
msg174174 - (view) |
Author: Aaron Iles (aliles) * |
Date: 2012-10-30 01:22 |
Patch successfully tested on Mac OSX 10.8. No regressions.
|
msg174177 - (view) |
Author: Michael Dorman (mjdorma) * |
Date: 2012-10-30 01:31 |
Patch (p12890-2.diff) successfully tested on Windows 7 64. No regressions.
|
msg174249 - (view) |
Author: Roundup Robot (python-dev)  |
Date: 2012-10-31 00:21 |
New changeset 7648b7ed6d91 by R David Murray in branch '3.3':
#12890: fix test on windows
http://hg.python.org/cpython/rev/7648b7ed6d91
New changeset d24befb680d6 by R David Murray in branch 'default':
#12890: fix test on windows
http://hg.python.org/cpython/rev/d24befb680d6
|
msg174250 - (view) |
Author: R. David Murray (r.david.murray) *  |
Date: 2012-10-31 00:22 |
Thanks everyone.
|
|
Date |
User |
Action |
Args |
2022-04-11 14:57:21 | admin | set | github: 57099 |
2012-10-31 00:22:24 | r.david.murray | set | status: open -> closed
messages:
+ msg174250 stage: patch review -> resolved |
2012-10-31 00:21:26 | python-dev | set | messages:
+ msg174249 |
2012-10-30 01:31:00 | mjdorma | set | nosy:
+ mjdorma messages:
+ msg174177
|
2012-10-30 01:22:06 | aliles | set | nosy:
+ aliles messages:
+ msg174174
|
2012-10-30 01:21:15 | sptonkin | set | files:
+ p12890-2.diff nosy:
+ sptonkin messages:
+ msg174173
|
2012-10-27 21:41:01 | r.david.murray | set | messages:
+ msg173984 |
2012-10-27 21:40:08 | python-dev | set | messages:
+ msg173982 |
2012-10-27 21:33:18 | r.david.murray | set | status: closed -> open assignee: eric.araujo -> messages:
+ msg173980
|
2012-10-27 18:59:26 | r.david.murray | set | status: open -> closed versions:
+ Python 3.4 nosy:
+ r.david.murray
messages:
+ msg173959
resolution: fixed |
2012-10-27 18:57:37 | python-dev | set | nosy:
+ python-dev messages:
+ msg173958
|
2012-08-26 04:45:56 | ezio.melotti | set | files:
+ issue12890.diff
messages:
+ msg169161 |
2012-03-13 12:13:32 | eric.araujo | set | assignee: eric.araujo messages:
+ msg155596 |
2012-03-13 08:03:57 | mcjeff | set | messages:
+ msg155578 |
2011-11-21 15:24:56 | eric.araujo | set | messages:
+ msg148056 versions:
+ Python 2.7, Python 3.2 |
2011-11-21 15:23:50 | eric.araujo | set | files:
- head-cgitb-display.patch |
2011-11-21 14:34:24 | mcjeff | set | files:
+ head-cgitb-display.patch |
2011-11-21 13:50:17 | eric.araujo | set | files:
- head-cgitb-display-tests.patch |
2011-11-21 13:50:14 | eric.araujo | set | files:
- head-cgitb-display.patch |
2011-11-20 19:43:43 | mcjeff | set | files:
+ head-cgitb-display.patch
messages:
+ msg148005 |
2011-11-20 12:20:32 | eric.araujo | set | nosy:
+ eric.araujo messages:
+ msg147986
|
2011-11-19 18:21:32 | ezio.melotti | set | stage: test needed -> patch review |
2011-11-19 18:20:41 | mcjeff | set | files:
+ head-cgitb-display-tests.patch
messages:
+ msg147965 |
2011-11-19 17:57:08 | mcjeff | set | messages:
+ msg147963 |
2011-11-19 17:27:51 | ezio.melotti | set | type: behavior messages:
+ msg147960 stage: test needed |
2011-11-19 17:07:40 | mcjeff | set | messages:
+ msg147956 |
2011-09-08 10:26:09 | ezio.melotti | set | nosy:
+ ezio.melotti
|
2011-09-03 02:22:00 | mcjeff | create | |