[lxml-dev] Python 3 changes in lxml 2.1

Martijn Faassen faassen at startifact.com
Fri May 30 16:55:24 CEST 2008


Hi there,

Stefan Behnel wrote:
[snip]
> The ugliest problem I found so far is with doctests. There just isn't a way to
> write a Py2/Py3 portable doctest that accepts exactly a byte string or unicode
> strings as output, as both look different in Py2 and Py3. Also, exception
> names are now fully qualified, so that tracebacks look different. Tons of
> failing tests for nothing...

I wonder whether doctest can be extended/adapted so it can normalize 
strings.

I think by the way it might be valuable to bring up this issue on the 
Py3K mailing list. The doctest module is after all in the standard 
library, and perhaps people can think up a way to break less.

Regards,

Martijn



More information about the lxml-dev mailing list