[pypy-dev] Porting PyPy/rpython to Python 3

Armin Rigo arigo at tunes.org
Mon Apr 20 10:15:52 CEST 2015


Hi Ronan,

On 19 April 2015 at 19:49, Ronan Lamy <ronan.lamy at gmail.com> wrote:
> Well, I think that the only sane way to port something as big as RPython is
> to do it incrementally - by getting tests to pass on 3 one subpackage at a
> time. The parts that are ported will have to be written in mixed 2/3 style,
> but having tests will prevent regressions in Python 3 compatibility: I don't
> see why it would be harder than maintaining compatibility with "obscure"
> platforms such as Windows.

The model we use for Windows would not work.  Imagine we have a
buildbot running nightly the tests on Python 3 (or some subset of them
that were already ported).  If we make small changes anywhere in the
rpython directory, we're likely to ignore Python 3 most of the time,
just like we can ignore Windows most of the time.  The problem is that
the latter is fine --- most changes to the rpython directory don't
affect Windows specifically --- but the former is not --- these
changes will likely add some SyntaxError or something for Python 3.
So we need a team whose only job is to look at this Py3 buildbot and
fix things the next day.

This has two problems.  The first is that someone doing so for a long
time is implausible (certainly not the kind of job I'd like myself).
The second problem is that it is going to annoy a lot the original
author of the patch, as the next day he's likely to continue working
on the same parts and does not expect the source to have been
thouroughly "fixed" under his feet, creating a lot of conflicts.

So, definitely -1 on that variant of the idea.

I think I still prefer the "upgrade everything at once and forget
about Python 2" approach.  Third-party users of RPython on Python 2
don't have to upgrade at the same time as long as they use the "2.7"
branch in our repo.  They might have to upgrade to Python 3 later if
they want to benefit from new features or bug fixes we add from that
point.  We can even backport a few selected bug fixes for a while,
based on requests.


A bientôt,

Armin


More information about the pypy-dev mailing list