On Fri, Jun 05, 2020 at 08:56:57AM -0600, Joe Pfeiffer wrote: > Got the following this morning, after switching to Python 3: > > From: r...@pfeifferfamily.net (Cron Daemon) > To: l...@pfeifferfamily.net > Subject: Cron <list@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
diff -Nru mailman-2.1.29/debian/rules mailman-2.1.29/debian/rules --- mailman-2.1.29/debian/rules 2018-06-23 14:14:21.000000000 +0100 +++ mailman-2.1.29/debian/rules 2020-06-07 15:01:34.000000000 +0100 @@ -38,7 +38,8 @@ --with-groupname=list \ --with-mail-gid=daemon --with-cgi-gid=www-data \ --without-permcheck --with-mailhost=localhost \ - --with-urlhost=localhost + --with-urlhost=localhost \ + --with-python=/usr/bin/python2 clean: dh_testdir