Sorry for being all curmudgeonly, but we're using 2to3 in the benchmark suite at http://hg.python.org/benchmarks/, and, since many of the non-CPython implementations are still only 2.5-compatible, the version there needs to run under python 2.5. At the same time, we'd like to be able to use the benchmark version of 2to3 to convert benchmarks to python-3, so we can benchmark changes to CPython's py3k branch. To do that, it'd be nice to be able to import the official 2to3 repository to pick up bug fixes. Therefore, it would be nice for the official repository to run under 2.5. Here's a patch accomplishing that. It passes its test suite under both 2.5 and 2.6, and can convert itself, and then the converted version can reconvert the original version and get the same result. You can also review the patch at http://codereview.appspot.com/996043.
In what way will my patch break test_parser on Windows? I preserved the behavior of re-opening the file in text mode after determining the encoding. Do I need to add 'U' to open()'s mode string?
2010/4/30 Jeffrey Yasskin <report@bugs.python.org>: > > Jeffrey Yasskin <jyasskin@gmail.com> added the comment: > > In what way will my patch break test_parser on Windows? I preserved the behavior of re-opening the file in text mode after determining the encoding. Do I need to add 'U' to open()'s mode string? Sorry, my mind was in other Python versions. It looks fine.
2010/4/30 Jeffrey Yasskin <report@bugs.python.org>: > > Jeffrey Yasskin <jyasskin@gmail.com> added the comment: > > Thanks. Committed as r80668. May I update http://python.org/dev/peps/pep-0291/ to reflect that 2to3 should continue working on python-2.5? I suppose it can't hurt, but I don't know that anyone actually looks at the either.