[Pkg-mailman-hackers] Bug#962284: mailman: File "/usr/lib/mailman/cron/cull_bad_shunt", line 77 SyntaxError with Python 3
Dominic Hargreaves
dom at earth.li
Sun Jun 7 15:52:55 BST 2020
On Fri, Jun 05, 2020 at 08:56:57AM -0600, Joe Pfeiffer wrote:
> Got the following this morning, after switching to Python 3:
>
> From: root at pfeifferfamily.net (Cron Daemon)
> To: list at pfeifferfamily.net
> Subject: Cron <list at snowball> [ -x /usr/lib/mailman/cron/cull_bad_shunt ] && /usr/lib/mailman/cron/cull_bad_shunt
> Date: Fri, 05 Jun 2020 04:30:01 -0600
> Content-Type: text/plain; charset=UTF-8
> X-Bogosity: Ham, tests=bogofilter, spamicity=0.000028, version=1.2.4
>
> File "/usr/lib/mailman/cron/cull_bad_shunt", line 77
> except getopt.error, msg:
> ^
> SyntaxError: invalid syntax
>
> The issue appears to be that Python3 no longer accepts the comma in an
> except block.
Mailman 2 will never support python 3 and it has been removed from
unstable and testing (see mailman3 for the future, but bear in mind it's
very much not a transparent upgrade). That said, as far as I can tell even
in unstable, /usr/bin/python is still pointing to /usr/bin/python2.7,
so you must have manually changed the link in /usr/bin/python behind
the packaging system's back?
It does appear to be a bug in this package that /usr/bin/python is used
(Python policy says that /usr/bin/python2 must be used if the
application requires a specific major version of python), but
in practical terms it doesn't appear need fixing since the default isn't
going to change in the stable releases.
I've attached a trivial patch for completeness (which I prepared before
I realised that there is no supported mechanism to actually switch
/usr/bin/python that I can see) in case it's of help. If you're manually
changing files in /usr/bin, you could of course just fix the scripts
to specify /usr/bin/python2 by hand, though I don't recommend this
approach.
Dominic
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mailman-use-python2.patch
Type: text/x-diff
Size: 465 bytes
Desc: not available
URL: <http://alioth-lists.debian.net/pipermail/pkg-mailman-hackers/attachments/20200607/9824af49/attachment.patch>
More information about the Pkg-mailman-hackers
mailing list