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.

classification
Title: traceback now masks some string exceptions
Type: Stage:
Components: Library (Lib) Versions: Python 2.5
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: georg.brandl, jimjjewett
Priority: normal Keywords:

Created on 2006-06-30 14:34 by jimjjewett, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Messages (3)
msg28998 - (view) Author: Jim Jewett (jimjjewett) Date: 2006-06-30 14:34
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.
msg28999 - (view) Author: Jim Jewett (jimjjewett) Date: 2006-06-30 22:09
Logged In: YES 
user_id=764593

Patch 1515343 fixes this.
msg29000 - (view) Author: Georg Brandl (georg.brandl) * (Python committer) Date: 2006-07-24 14:12
Logged In: YES 
user_id=849994

Your patch was applied. Thanks!
History
Date User Action Args
2022-04-11 14:56:18adminsetgithub: 43587
2006-06-30 14:34:26jimjjewettcreate