[Python-3000] Strategy for porting to 3.0?

skip at pobox.com skip at pobox.com
Sun Mar 23 13:46:56 CET 2008


(Diverting from python-3000 to spambayes-dev.)

    Skip> After the next SpamBayes release I plan to branch the code and
    Skip> work on porting it to Python 3.0, mostly as an experiment in
    Skip> porting code from Python 2.x to 3.x whose results I can feed back
    Skip> to the larger Python community.

    Tony> Cool :)

    Skip> I'm curious about how best to approach the problem.

    Tony> It's a guess, but I think SpamBayes supporting Python 2.2 will
    Tony> cause issues with this.  I'm sure that it'll be possible to create
    Tony> code that works (when 2to3'd) with Python 2.6 and Python 3.0 -
    Tony> maybe even 2.5 or 2.4 as well.  However, having a single version
    Tony> (plus 2to3'd copy) that works with 2.2, 2.3, 2.4, 2.5, 2.6 and 3.0
    Tony> seems to be asking for a lot.

I'm thinking we will have to give up support for 2.2 at least.  I can't see
that continuing to support it is buying us much at this point.  There's also
the possibility of just maintaining separate 2.x and 3.x branches of the
code.  This would only affect the source distribution.  Windows users would
just get whatever we bundled in the binary installer.

    Tony> This probably belongs on spambayes-dev as much as here (although
    Tony> maybe someone here will tell me that 2.2 and 3.0 will be fine),
    Tony> but perhaps SpamBayes 1.2 (2.0?) could require 2.4 or 2.5?  It's
    Tony> obviously not a problem for OS X/Windows people, and most *nix
    Tony> users running SB would be at 2.4 by now, right?  (Or if not,
    Tony> unlikely to upgrade SB either?)

    Skip> My first thought is to run as many SpamBayes apps and tests as I
    Skip> can with the -3 flag and resolve as many problems as it finds.

    Tony> (This bit in particular probably ought to be @spambayes-dev).  I
    Tony> think I'll probably have some time in 2008 to actually work on
    Tony> SpamBayes again (and check in all my local changes!), so sing out
    Tony> if you want help with this.  I'm also quite curious, since I wrote
    Tony> chunks of the code and am familiar with most of it, so it'll
    Tony> possibly correspond with how well other code I have will migrate
    Tony> (in 2010, probably).

La La La!  I spoke briefly with Mark Hammond at PyCon.  (I think we must
have gotten interrupted at least three times by people wanting to talk to
Mark about totally unrelated topics!  He's one popular guy!)  If you have
some local changes you think are stable enough for a 1.1 release now would
be a good time to check them in.  We talked about terminating this seemingly
neverending chain alpha releases and just push 1.1 out the door (maybe a
quick beta, then 1.1 final).

    Martin> Sure. As an exercise, I think it would be most useful if you
    Martin> actually tried to implement some strategy for SpamBayes that you
    Martin> think other projects could realistically also follow, and the
    Martin> report if and how this strategy falls short.

    Tony> If you're (Skip) willing to be this methodical (even notes in SVN
    Tony> or a wiki or something would be good) that would be great from my
    Tony> perspective (unrelated to my SpamBayes [once-]developer status).

My thought would be to try and be pretty methodical with a page on either the
Python or SpamBayes wikis.  There is a page here:

    http://wiki.python.org/moin/Early2to3Migrations

with links to other software already being ported.

Skip



More information about the Python-3000 mailing list