[Python-checkins] r45326 - in python/branches/release24-maint: Lib/test/test_traceback.py Lib/traceback.py Misc/NEWS (original) (raw)
anthony.baxter python-checkins at python.org
Thu Apr 13 03:29:12 CEST 2006
- Previous message: [Python-checkins] r45325 - python/trunk/Python/compile.c
- Next message: [Python-checkins] r45327 - in python/trunk: Lib/test/test_traceback.py Lib/traceback.py Misc/NEWS
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Author: anthony.baxter Date: Thu Apr 13 03:29:10 2006 New Revision: 45326
Modified: python/branches/release24-maint/Lib/test/test_traceback.py python/branches/release24-maint/Lib/traceback.py python/branches/release24-maint/Misc/NEWS Log: reverting r45322 - "traceback.format_exception_only() now prepends the exception's module name to non-builtin exceptions, like the interpreter itself does."
Reverting because: A - broke tests B - changed behaviour of 2.4.
Modified: python/branches/release24-maint/Lib/test/test_traceback.py
--- python/branches/release24-maint/Lib/test/test_traceback.py (original) +++ python/branches/release24-maint/Lib/test/test_traceback.py Thu Apr 13 03:29:10 2006 @@ -5,9 +5,6 @@ import traceback -class TbError(Exception): - pass
class TracebackCases(unittest.TestCase): # For now, a very minimal set of tests. I want to be sure that # formatting of SyntaxErrors works based on changes for 2.1. @@ -88,24 +85,6 @@ os.unlink(os.path.join(testdir, f)) os.rmdir(testdir) - def raise_tberror(self): - raise TbError
- def raise_typeerror(self):
raise TypeError
- def test_modulename(self):
# Bug 860326: format_exception_only should prepend module name
# to exceptions not in "exceptions", like PyErr_Print does.
err = self.get_exception_format(self.raise_tberror, TbError)
self.assertEquals(len(err), 1)
self.assert_(err[0] == '__main__.TbError\n' or
err[0] == 'test.test_traceback.TbError\n')
err = self.get_exception_format(self.raise_typeerror, TypeError)
self.assertEquals(err[0], 'TypeError\n')
- def test_main(): run_unittest(TracebackCases)
Modified: python/branches/release24-maint/Lib/traceback.py
--- python/branches/release24-maint/Lib/traceback.py (original) +++ python/branches/release24-maint/Lib/traceback.py Thu Apr 13 03:29:10 2006 @@ -159,10 +159,6 @@ list = [] if type(etype) == types.ClassType: stype = etype.name
if not hasattr(etype, '__module__'):
stype = '<unknown>.' + stype
elif etype.__module__ != 'exceptions':
else: stype = etype if value is None:stype = etype.__module__ + '.' + stype
Modified: python/branches/release24-maint/Misc/NEWS
--- python/branches/release24-maint/Misc/NEWS (original) +++ python/branches/release24-maint/Misc/NEWS Thu Apr 13 03:29:10 2006 @@ -23,10 +23,6 @@ Library
-- Patch #860326: traceback.format_exception_only() now prepends the - exception's module name to non-builtin exceptions, like the interpreter - itself does.
- The email module's parsedate_tz function now sets the daylight savings flag to -1 (unknown) since it can't tell from the date whether it should be set.
- Previous message: [Python-checkins] r45325 - python/trunk/Python/compile.c
- Next message: [Python-checkins] r45327 - in python/trunk: Lib/test/test_traceback.py Lib/traceback.py Misc/NEWS
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]