[Mailman-Developers] Python 3
barry at list.org
Mon Dec 22 19:47:34 CET 2014
One of my top priorities has been to port Mailman 3 (core) to Python 3. This
work is now complete, and ready to be merged into trunk. No doubt bugs still
lurk, but at least the entire test suite is passing. My intent is to merge
this to trunk and do another beta release before the end of the year.
If you want to take a look at the branch, try this:
$ bzr branch lp:~barry/mailman/py3
The diff is available online via the merge proposal:
It's a big diff.
$ bzr diff . --old ../3.0 | diffstat -s
166 files changed, 1881 insertions(+), 1538 deletions(-)
Python 3.4 will be the minimum required version. (It make work with earlier
Python 3's but I will not officially support anything earlier.)
There are a few things to keep an eye out for, especially if you are currently
experimenting with Mailman 3 in production:
* A few database columns have changed from LargeBinary to Unicode. I have not
yet figured out how to add the Alembic schema migrations to handle this, but
I'll do so before the release.
* The internal format of the requests table has changed. While the column
type is a string, the internal format was a sort of home baked pickle-like
format. This turned out to be incompatible with Python 3, due to some
assumptions made about the format. I've changed this to using a JSON
representation, which is safe and platform independent. This means that any
held requests (subscriptions, unsubscriptions, held posts) must be cleared
before switching to the Python 3 code. I don't think it's worth trying to
migrate this internal format.
* The new email API in Python 3 is really wonderful, but I am mostly not yet
taking advantage of it. The one area that required a significant rewrite is
in the Subject prefix munging code. Some Python 2 behavior is different in
Python 3 and the old algorithms had to be rewritten. I've added a lot of
tests, but there are probably bugs in the new code, especially when various
mixed charsets appear in the Subject header.
Please do test, review, grouse, compliment, curse, rejoice, and enjoy. Over
the holidays I'll spend some time cleaning a few things up (especially the
documentation), then I'll merge this to trunk and do a 3.0b5 release as a
Python 3-only application. Mailman 3 will not be bilingual so Python 2
support will be dropped.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 819 bytes
Desc: OpenPGP digital signature
More information about the Mailman-Developers