Repository navigation
Closed
Description
| BPO | 1047397 |
|---|---|
| Nosy | @devdanzin, @ethanfurman, @iritkatriel |
| PRs | |
| Files |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
assignee = None
closed_at = <Date 2022-03-13.17:34:55.090>
created_at = <Date 2004-10-14.22:23:50.000>
labels = ['easy', 'type-bug', 'library']
title = 'cgitb failures'
updated_at = <Date 2022-03-13.17:34:55.089>
user = 'https://bugs.python.org/rgbecker'bugs.python.org fields:
activity = <Date 2022-03-13.17:34:55.089>
actor = 'iritkatriel'
assignee = 'none'
closed = True
closed_date = <Date 2022-03-13.17:34:55.090>
closer = 'iritkatriel'
components = ['Library (Lib)']
creation = <Date 2004-10-14.22:23:50.000>
creator = 'rgbecker'
dependencies = []
files = ['1427', '1428', '1429', '1430', '1431', '35995']
hgrepos = []
issue_num = 1047397
keywords = ['patch', 'easy']
message_count = 8.0
messages = ['22695', '22696', '22697', '82098', '114382', '223448', '223464', '415057']
nosy_count = 6.0
nosy_names = ['jhylton', 'rgbecker', 'ajaksu2', 'ethan.furman', 'wam', 'iritkatriel']
pr_nums = ['15094']
priority = 'normal'
resolution = 'wont fix'
stage = 'resolved'
status = 'closed'
superseder = None
type = 'behavior'
url = 'https://bugs.python.org/issue1047397'
versions = ['Python 2.7', 'Python 3.4', 'Python 3.5']
Activity
rgbecker commentedon Oct 14, 2004
cgitb fails when evaluating various reprs/getattrs. The bug
demonstrator is cgitbbug.py. Below is the run output
for two bugs. Fixes are possible by putting try: except
around various evaluations. Although the test is
artificial we found these could happen in real code.
This is with 2.4a3 Windows XP
Sample output
C:\Python24>
rgbecker commentedon Oct 14, 2004
Logged In: YES
user_id=6946
Bug fix added
jhylton commentedon Nov 7, 2004
Logged In: YES
user_id=31392
The formatting of this patch is wrong. There is a long line
(>80 chars) and missing whitespace around commas, operators,
etc.
devdanzin commentedon Feb 14, 2009
Confirmed on trunk.
BreamoreBoy commentedon Aug 19, 2010
Anyone interested in running with this as it's still a problem in all versions?
BreamoreBoy commentedon Jul 18, 2014
The output now is
Thus the madness has been fixed and this can be closed as "out of date".
rgbecker commentedon Jul 19, 2014
I'll repeat the post I made to BreamoreBoy regarding this bug:
"re: http://bugs.python.org/issue1047397
this bug is now 10 years old. I'm not sure why it's to be considered
closed because the original intent of the bug report was that the html
output of the cgitb module could be confused and errors during
evaluation could make the html output fail. So far as I can tell by
modifying the original cgitbbug.py to run under python 3.4.1 it still
fails to correctly produce html when a bug occurs in cgitb.html.
Producing a more reasonable traceback is certainly a step forward, but
I think that has been true since at least 3.1. The whole point of
cgitb is to produce something reasonable for an html consumer."
I have re-created the original 002 patch with mods for python 3.4.1. It's a bit of a shame that this wasn't fixed 10 years ago. Hopefully any style pedants will find this patch more acceptable. Personally I don't think style errors should prevent a working fix from being adopted. I would have just fixed the fix style and carped afterwards.
iritkatriel commentedon Mar 13, 2022
cgi/cgitb are deprecated as per PEP-594, so there won't be further enhancements to them.