Subject: Re: Bug#962284: mailman: File "/usr/lib/mailman/cron/cull_bad_shunt", line 77 SyntaxError with Python 3

From: Joe Pfeiffer <[email-masked]>
Date: Sun, 7 Jun 2020 11:30:55 -0600

Dominic Hargreaves writes:
>
>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).

Yeah, the amount of work I anticipate for the switch is why I've been
procrastinating.  I wasn't aware it had been removed from unstable and
testing; it sounds like I'm going to have to bite the bullet sooner
rather than later....

>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?

At this point, update-alternatives lists python3 as the "auto"
alternative, so that appears to be the default (I'm nothing resembling
an expert on Debian policies or packaging, so it's entirely possible
I'm reading more into that than I should).

>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.

That's what I've wound up doing (after filing the bug report, I found
several more scripts in mailman that also break with python3).
-- 
Joe Pfeiffer                                   575.525.2764 (H)
1440 Tierra del Sol Dr                         575.496.3501 (C)
Las Cruces, NM 88007-5548