I’ve been devoting much of my time to testing on the Python 3.1 standard library, and let me say that it is really frustrating. I’ve been trying to make various sufficiently standalone modules pass their associated tests (also run with 3to2), and I’ve been successful in some ways. In particular, Lib/site.py passes all the tests in Lib/test/test_site.py, which I’m really happy about. However, in other cases like Lib/io.py, there’s such a strong reliance on the behavior pre-compiled builtin C modules that I can’t possibly get it to work 3to2′d.
And there’s so much that depends on the io module that I am having a really hard time hunting down lib3to2 bugs that exist beyond throwing basic SyntaxErrors. Also, I’m sure there might be a few bugs in there that are being masked by failures resulting in comparing strings like ‘test output’ with u’test output’, which aren’t technically bugs with lib3to2, but rather with the level of specificity given by the testing code.
So as a result, I’m going to again spend the rest of the GSoC time again looking for well-tested third-party Python 3 code and trying it out with 3to2, since the Py3k standard library is a little bit too complicated a beast for me.
To that end, here’s what I’ve tested, and the results:
httplib2 from PyPI: All tests passed except for 1 error in iri2uri: iterations over bytes objects return an int value in py3k but a str of length 1 in py2k. The specific error can be fixed by calling ord() on each value returned.
brain from PyPI: Less than a third of all functional test cases pass.