[Mailman-Developers] Importing email 0.96 problem
Barry A. Warsaw
barry@zope.com
Mon, 28 Jan 2002 17:56:40 -0500
>>>>> "JRM" == Jason R Mastaler
>>>>> <jason-list-mailman-developers@mastaler.com> writes:
>> Also, you may want to try upgrading to Python 2.1.2 to see if
>> that fixes the problem.
JRM> Why not upgrade to Python 2.2 instead? Since 2.2 comes with
JRM> the email module, he won't have to worry about installing it
JRM> separately which seems to be the crux of his problem.
That may not help, for a few reasons. First, there are some patches
to the email package that got applied after 2.2 was released. For
these, upgrading to Python 2.2.1 -- when it's ready -- would take care
of the problem.
Second, Ben Gertzfield is working on some enhancements to the email
package to better support Japanese (presumably, this extends to
Korean, Chinese, etc.). Since those are new features, they won't make
it into Python proper until 2.3, but I will add them to the email
add-on package. So if you're probably best off still installing the
add-on even in Python 2.2.
(Aside: I just realized that I'll have to change the order in which
directories are added to sys.path in Defaults.py.in so that
site-packages appears /before/ the default paths, otherwise you
wouldn't get the add-on email package in Python 2.2. Hope that
doesn't have any ugly consequences. :( We'll see...).
>> to decrease startup costs, all Mailman cgi and mail filter
>> programs effectively run with the -S option, which inhibits
>> importing site.py, and thus does not add any of the
>> site-packages folders to sys.path.
JRM> I'm just curious, how much startup cost does this save? I
JRM> hadn't thought of doing this before.
I don't remember the details, and they've likely changed since Python
2.0 when I made this change. If you want to get a feel for it, strace
an interactive Python startup with and without -S. Enjoy the stat()'s
:) IIRC they're significant, but with MM2.1's current architecture it
will only hurt you during cgi startup, since the email side of things
is done in a daemon now.
-Barry