Bug 169209 - Mailman is broken with latest python in rawhide
Mailman is broken with latest python in rawhide
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: python (Show other bugs)
rawhide
All Linux
medium Severity medium
: ---
: ---
Assigned To: Mihai Ibanescu
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2005-09-24 18:11 EDT by Reuben Farrelly
Modified: 2007-11-30 17:11 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2005-09-27 10:09:52 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Reuben Farrelly 2005-09-24 18:11:29 EDT
mailman is broken with the latest versions of python in rawhide.  Immediately
after upgrading from the release versions in FC4 to latest python, mailman
cronjobs start to fail:

-bash-3.00$ /usr/lib/mailman/cron/checkdbs 
Traceback (most recent call last):
  File "/usr/lib/mailman/cron/checkdbs", line 34, in ?
    import paths
ImportError: No module named paths
-bash-3.00

I'm unsure if this is a problem with python or mailman, but if I downgrade
python it works again.

Both today and yesterdays pythons seem to cause the problem.
Comment 1 John Dennis 2005-09-26 10:10:04 EDT
The import the module "paths" is failing, but that module should be in the
directory with the cron script, so python should be able to find it. Please
verify that /usr/lib/mailman/cron has a file called paths.py. There may also be
a compiled version called paths.pyc.

Normally python has the directory containing the scrip in its search path, thus
it should find it if its there. It would find it there because of the sys.path
variable:

As initialized upon program startup, the first item of this list, path[0], is
the directory containing the script that was used to invoke the Python
interpreter. If the script directory is not available (e.g. if the interpreter
is invoked interactively or if the script is read from standard input), path[0]
is the empty string, which directs Python to search modules in the current
directory first. 

It is possible it is this behavior that has changed in the new python. To verify
add this at the top of the failing cron script

import sys
print sys.path

execute the script, what is the first item in the array?
Comment 2 Reuben Farrelly 2005-09-27 02:30:52 EDT
[root@tornado ~]# ls -la /usr/lib/mailman/cron/paths.py
-rw-r--r--  1 root mailman 2410 Mar  8  2005 /usr/lib/mailman/cron/paths.py
[root@tornado ~]# 

The error shows up in my postfix log, so with that extra statement in
/usr/lib/mailman/scripts/post it looks like this:

[it's the post script which is sick, but if you execute
/usr/lib/mailman/cron/checkdbs from the command line, it dies with the same error]

Sep 27 18:22:01 tornado postfix/pickup[2221]: BB88418925: uid=41 from=<mailman>
Sep 27 18:22:01 tornado postfix/cleanup[4420]: BB88418925:
message-id=<20050927062201.BB88418925@tornado.reub.net>
Sep 27 18:22:01 tornado postfix/qmgr[2222]: BB88418925: from=<mailman@reub.net>,
size=645, nrcpt=1 (queue active)
Sep 27 18:22:01 tornado postfix/local[4425]: BB88418925: to=<mailman@reub.net>,
orig_to=<mailman>, relay=local, delay=0, dsn=5.3.0, status=bounced (Command died
with status 1: "/usr/lib/mailman/mail/mailman post mailman". Command output:
['', '/usr/lib/mailman', '/usr/lib/python24.zip', '/usr/lib/python2.4/',
'/usr/lib/python2.4/plat-linux2', '/usr/lib/python2.4/lib-tk',
'/usr/lib/python2.4/lib-dynload'] Traceback (most recent call last):   File
"/usr/lib/mailman/scripts/post", line 32, in ?     import paths ImportError: No
module named paths )
Sep 27 18:22:01 tornado postfix/cleanup[4420]: DBB2B18926:
message-id=<20050927062201.DBB2B18926@tornado.reub.net>
Sep 27 18:22:01 tornado postfix/qmgr[2222]: DBB2B18926: from=<>, size=3037,
nrcpt=1 (queue active)
Sep 27 18:22:01 tornado postfix/qmgr[2222]: BB88418925: removed
Sep 27 18:22:02 tornado postfix/local[4425]: DBB2B18926: to=<mailman@reub.net>,
relay=local, delay=1, dsn=5.3.0, status=bounced (Command died with status 1:
"/usr/lib/mailman/mail/mailman post mailman". Command output: ['',
'/usr/lib/mailman', '/usr/lib/python24.zip', '/usr/lib/python2.4/',
'/usr/lib/python2.4/plat-linux2', '/usr/lib/python2.4/lib-tk',
'/usr/lib/python2.4/lib-dynload'] Traceback (most recent call last):   File
"/usr/lib/mailman/scripts/post", line 32, in ?     import paths ImportError: No
module named paths )
Sep 27 18:22:02 tornado postfix/qmgr[2222]: DBB2B18926: removed
Comment 3 John Dennis 2005-09-27 08:40:27 EDT
The thing to note here is that the first entry in the path array is '', this
means python's normal behavior of adding the script's local directory to the
first element is not in effect. I can't say why, but given the problem as you
report is directly related to the new python, and backing the python version off
removes the problem, I would have to conclude this is a python issue, not
mailman. I'm reassigning to python.
Comment 4 Peter Jones 2005-09-27 10:09:52 EDT
Fixed in rawhide.

Note You need to log in before you can comment on or make changes to this bug.