Code review comment for lp:~lifeless/bzr/subunit

Revision history for this message
Robert Collins (lifeless) wrote :

On Mon, 2009-12-14 at 21:38 +0000, Martin [gz] wrote:
> Doesn't seem as big a code complexity win as I'd hope for adding a whole new dependency.

How big is big enough ?

> +traceback._some_str = _clever_some_str
>
> Not sure monkeypatching a builtin module in the middle of a several thousand line script is a good idea.

Sadly, python 2.x is broken in this regard: __str__ on an exception with
a (a_str,) as its args, does an implicit decode of the string. We work
around this in bzrlib.errors by subclassing exception and reimplementing
__str__, but we can't do that for all errors that may be raised by
tests.

-Rob

« Back to merge proposal