Phil Stracchino writes:

 > Rewriting without breaking is hard.

True.

 > There is a Python framework called Twisted.

Not an example appropriate to Mailman, though.  The Twisted people were
doing amazing things with str, to which Unicode was irrelevant, because
their job was to shovel bytes from here to there correctly but as fast
as possible.  (Mercurial has a similar story, and a similar visceral
hatred for Python 3.)

Mailman has the opposite problem.  We *wish* str was Unicode from the
get-go, but it wasn't, and Mailman 2 is rife with potential encoded/
decoded confusion because of the nature of email and the dual usage of
str in Python 1, and the history of Mailman as an MLM for an American
rock band (who needs no steekin' accents, we just hammer and bend the
strings!)  There are two decades of hacks and patches in Mailman 2 to
catch the squirmers that somehow manage to be str where unicode is
needed or vice versa, and every single one of those would need to be
reverse engineered in a Python 3 environment.  Not a job I would want
to do: like Barry, I would rewrite from scratch (and probably redesign
as well).  But every part converted would be a joy to work with in
the future.

 > As best I can determine, the task of updating it to be Python 3
 > compatible has now been under way for ten years (with most of that
 > time, only one person working on it).

But that's because Python 3 deliberately encouraged decoding streams
of bytes, by making it hard to process bytes the same way as str in
Python 2.  It wouldn't have been hard to make the bytes type identical
to str except for the internal representation, so that programs like
Twisted and Mercurial would just need to be converted so that
*everything* was bytes except for the error messages.  But that was
deliberately avoided: a lot of (Python 2) str methods were not
inherited by bytes.  (In fact, some were re-added later, but too late
to make the bit-shovelers happy.)  So the Twisted people hated Python
3 with a passion.

I'm not surprised that only one person would work on the port, I'm
surprised they found even one!

Steve
------------------------------------------------------
Mailman-Users mailing list Mailman-Users@python.org
https://mail.python.org/mailman/listinfo/mailman-users
Mailman FAQ: http://wiki.list.org/x/AgA3
Security Policy: http://wiki.list.org/x/QIA9
Searchable Archives: http://www.mail-archive.com/mailman-users%40python.org/
Unsubscribe: 
https://mail.python.org/mailman/options/mailman-users/archive%40jab.org

Reply via email to