[Mailman-Users] Mailman 2.1.12 - Python 2.4.[456]incompatibility

Mark Sapiro mark at msapiro.net
Thu Apr 23 04:20:28 CEST 2009


Barry Finkel wrote:

>On Mon, 16 Mar 2009 10:52:05 Mark Sapiro wrote:
>
>>There is an internal inconsistency in the 3.0.2 email package that
>>shipped with Python 2.4.4 through 2.4.6. This has to do with the
>>Charset.Charset() constructor setting input_charset to a unicode which
>>then causes TypeError: decoding Unicode is not supported exceptions in
>>other parts of the email package. This problem does not seem to occur
>>with email 3.0.1 and Python 2.4.[123].
>>
>>This (along with other stuff) is discussed in the bug report at
>><https://bugs.launchpad.net/mailman/+bug/328353> and there is a patch
>>for email/Charset.py at
>><http://launchpadlibrarian.net/23670138/Charset.py.patch>
>>
>>At this point, the best advice seems to be use Python 2.5 or 2.6 with
>>Mailman 2.1.12.
>
>The patch is to module Charset.py.  I was looking for that in my
>2.1.12 directories, and I cannot find it.  In comparing my 2.1.11
>directories with my 2.1.12 directories I find the "problem".
>These directories are where I built my Ubuntu packages from the
>SourceForge source.


Charset.py is not a Mailman module; it is a Python email module.

In 2.1.11, we actually install email 2.5.8 in Mailman's pythonlib.
Beginning in 2.1.12, we import email during configure, and if it is
new enough, we do not install email 2.5.8 in pythonlib.

This is where the problem arises. If you have a python installed that
includes email 3.0.2 (python 2.4.4 - 2.4.6), we will accept that, and
it is that email library that has the inconsistency.


[various observations snipped]
>
>I am confused.  Is the 2.1.12 build using the Python-supplied e-mail
>library, and thus the patch to Charset.py has to be made there?


Yes. That's exactly the issue.


>Or do I have to specify something to get the Mailman-supplied
>e-mail package untarred?  Thanks.


That would be another approach. After running ./configure and before
running any make commands, you could edit misc/Makefile to replace the
line

     EMAILPKG=

with

     EMAILPKG=       email-2.5.8

to install email 2.5.8 in Mailman's pythonlib. Then you wouldn't need
to patch anything. But, how this fits with the Ubuntu package, I don't
know.

Note that the only Charset.py that needs patching is the one from email
3.0.2 which shipped only with Python 2.4.4 through python 2.4.6

-- 
Mark Sapiro <mark at msapiro.net>        The highway is for gamblers,
San Francisco Bay Area, California    better use your sense - B. Dylan



More information about the Mailman-Users mailing list