testtools-dev team mailing list archive
-
testtools-dev team
-
Mailing list archive
-
Message #00222
[Bug 663600] Re: Use Python 3 style qualified exception names in tracebacks
Python 2.7.0+ (trunk, Oct 25 2010, 18:06:24) [MSC v.1500 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import socket, traceback
>>> traceback.format_exception_only(socket.error, socket.error("fish"))
['error: fish\n']
Python 3.2a3+ (py3k, Oct 25 2010, 17:22:39) [MSC v.1500 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import socket, traceback
>>> traceback.format_exception_only(socket.error, socket.error("fish"))
['socket.error: fish\n']
The testtools code does basically the same thing the Python 2 code does.
--
Use Python 3 style qualified exception names in tracebacks
https://bugs.launchpad.net/bugs/663600
You received this bug notification because you are a member of testtools
developers, which is subscribed to testtools.
Status in testtools: Triaged
Bug description:
Originally as part of my unicode traceback work I had the module name included when printing exceptions, as Python 3 does. However it broke a few tests, and wasn't really a requirement to get non-ascii tracebacks working so I removed that logic. Putting it back in would be particularly useful for things called 'error', is that socket.error or pywintypes.error or...?
References