[ python-Bugs-1515163 ] traceback now masks some string exceptions
SourceForge.net
noreply at sourceforge.net
Mon Jul 24 16:12:06 CEST 2006
Bugs item #1515163, was opened at 2006-06-30 14:34
Message generated for change (Comment added) made by gbrandl
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1515163&group_id=5470
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Python Library
Group: Python 2.5
>Status: Closed
>Resolution: Fixed
Priority: 5
Submitted By: Jim Jewett (jimjjewett)
Assigned to: Nobody/Anonymous (nobody)
Summary: traceback now masks some string exceptions
Initial Comment:
With 2.5, exceptions became new-style. Unfortunately,
the traceback module wasn't fully updated to still
properly handle all (admittedly deprecated) string
exceptions. I noticed this because of its affect on
unittest, where the original exception was masked.
Under 2.4.3:
>>> import traceback
>>> traceback.format_exception_only("strtype",
"strvalue")
['strtype: strvalue\n']
Under 2.5b1:
>>> import traceback
>>> traceback.format_exception_only("strtype",
"strvalue")
Traceback (most recent call last):
File "<pyshell#1>", line 1, in <module>
traceback.format_exception_only("strtype",
"strvalue")
File "C:\Python25\lib\traceback.py", line 168, in
format_exception_only
if issubclass(etype, SyntaxError):
TypeError: issubclass() arg 1 must be a class
I will also be entering a patch, but know that we need
a bug number at this stage.
----------------------------------------------------------------------
>Comment By: Georg Brandl (gbrandl)
Date: 2006-07-24 14:12
Message:
Logged In: YES
user_id=849994
Your patch was applied. Thanks!
----------------------------------------------------------------------
Comment By: Jim Jewett (jimjjewett)
Date: 2006-06-30 22:09
Message:
Logged In: YES
user_id=764593
Patch 1515343 fixes this.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1515163&group_id=5470
More information about the Python-bugs-list
mailing list