darcs patch: Initial port to Python 3.0 (and 2 more)

Simon Marlow marlowsd at gmail.com
Tue Dec 7 10:02:01 CET 2010


On 02/12/10 09:31, Clemens Fruhwirth wrote:
> More Python 3.0 fixes (resending also the previous patches).
>
> 3 patches for repository http://darcs.haskell.org/testsuite:
>
> Wed Dec  1 20:45:57 CET 2010  Clemens Fruhwirth<clemens at endorphin.org>
>    * Initial port to Python 3.0
>
> Wed Dec  1 22:17:34 CET 2010  Clemens Fruhwirth<clemens at endorphin.org>
>    * Add compatibility module for Python 2/3 iterators
>
> Thu Dec  2 09:38:30 CET 2010  Clemens Fruhwirth<clemens at endorphin.org>
>    * More Python 3.0 fixes

I don't know much about Python 3.0... but I suppose we should support 
it.  Most of these changes look harmless, but some make the code less 
readable (iterators instead of filter?  yeuch).  This doesn't look quite 
right:

 > +def lineFormat(line):
 > +    return "        " + line
 > +
 >   def summary(t, file):
 >
 >       file.write('\n')
 > hunk ./driver/testlib.py 1551
 >       file.write('OVERALL SUMMARY for test run started at ' \
 >                  + t.start_time + '\n'\
 > -               + string.rjust(`t.total_tests`, 8) \
 > +               + lineFormat(repr(t.total_tests)) \

There are quite a few whitespcae changes in there too.

Can I suggest breaking this up a bit: leave out the whitespace changes, 
and maybe put all the print() changes in one patch.

Cheers,
	Simon



More information about the Cvs-ghc mailing list