This is the output of python-modernize.

python-modernize -w --compat-unicode .
Fix some obvious things modernize doesn't do.

Like urlparse imports, basestring references, metaclasses etc.
Fix StringIO imports, views/iterator access, cmp.
Fix some unicode issues.

This assumes a unicode string as the internal format. Filters will receive a BytesIO.
Close file properly in test framework.

Gets rid of hundred of warnings.
Port ExternalTool metaclass syntax.
Fix more StringIO imports.
Fix nose yielding classes on Py3.

This seems to be this issue:

http://stackoverflow.com/questions/15281881/nose-generator-for-testcase-based-classes