Mailman3 3.2.2-1 is incompatible with Python3 3.8.2-0

Bug #1877701 reported by Mark Sapiro
54
This bug affects 9 people
Affects Status Importance Assigned to Milestone
mailman3 (Debian)
Fix Released
Unknown
mailman3 (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

Ubuntu focal (20.04LTS) packages Mailman3 3.2.2-1 with Python3 3.8.2-0.

These are incompatible. Mailman3 < 3.3.0 does not support Python3 >= 3.8.0.

This leads to issues such as discissed in the thread at https://<email address hidden>/thread/K65RN3YNZ42T7Z6EOWJIGG6E4AK2YXLK/

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in mailman3 (Ubuntu):
status: New → Confirmed
Revision history for this message
Matthew Alberti (matthewalberti) wrote :

I am seeing this issue manifest as shunted Mailman messages. Below (and attached) is output seen in various logs when the problem occurs.

/var/log/mailman3/smtp.log

Jun 01 06:22:53 2020 (1640) Peer: ('127.0.0.1', 47078)
Jun 01 06:22:53 2020 (1640) ('127.0.0.1', 47078) handling connection
Jun 01 06:22:53 2020 (1640) ('127.0.0.1', 47078) Data: b'LHLO mail-01.********.org'
Jun 01 06:22:53 2020 (1640) ('127.0.0.1', 47078) Data: b'MAIL FROM:<malberti@********.org>'
Jun 01 06:22:53 2020 (1640) ('127.0.0.1', 47078) sender: malberti@********.org
Jun 01 06:22:53 2020 (1640) ('127.0.0.1', 47078) Data: b'RCPT TO:<********@********.org>'
Jun 01 06:22:53 2020 (1640) ('127.0.0.1', 47078) recip: ********@********.org
Jun 01 06:22:53 2020 (1640) ('127.0.0.1', 47078) Data: b'DATA'
Jun 01 06:22:53 2020 (1640) ('127.0.0.1', 47078) Data: b'QUIT'
Jun 01 06:22:53 2020 (1640) ('127.0.0.1', 47078) connection lost
Jun 01 06:22:53 2020 (1640) Connection lost during _handle_client()

/var/log/mailman3/mailman.log

Jun 01 06:22:54 2020 (1639) No cached copy of the public suffix list found
Jun 01 06:22:54 2020 (1639) Uncaught runner exception: module 'time' has no attribute 'clock'
Jun 01 06:22:54 2020 (1639) Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/mailman/core/runner.py", line 173, in _one_iteration
    self._process_one_file(msg, msgdata)
  File "/usr/lib/python3/dist-packages/mailman/core/runner.py", line 266, in _process_one_file
    keepqueued = self._dispose(mlist, msg, msgdata)
  File "/usr/lib/python3/dist-packages/mailman/runners/incoming.py", line 79, in _dispose
    process(mlist, msg, msgdata, start_chain)
  File "/usr/lib/python3/dist-packages/mailman/core/chains.py", line 79, in process
    link.function(mlist, msg, msgdata)
  File "/usr/lib/python3/dist-packages/mailman/chains/hold.py", line 147, in _process
    request_id = hold_message(mlist, msg, msgdata, SEMISPACE.join(reasons))
  File "/usr/lib/python3/dist-packages/mailman/app/moderator.py", line 88, in hold_message
    request_id = requestsdb.hold_request(
  File "/usr/lib/python3/dist-packages/mailman/database/transaction.py", line 85, in wrapper
    return function(args[0], config.db.store, *args[1:], **kws)
  File "/usr/lib/python3/dist-packages/mailman/model/requests.py", line 100, in hold_request
    token = getUtility(IPendings).add(pendable, timedelta(days=5000))
  File "/usr/lib/python3/dist-packages/mailman/database/transaction.py", line 85, in wrapper
    return function(args[0], config.db.store, *args[1:], **kws)
  File "/usr/lib/python3/dist-packages/mailman/model/pending.py", line 91, in add
    token = token_factory.new()
  File "/usr/lib/python3/dist-packages/mailman/utilities/uid.py", line 79, in new
    return self._next_unpredictable_id()
  File "/usr/lib/python3/dist-packages/mailman/utilities/uid.py", line 155, in _next_unpredictable_id
    x = random.random() + right_now % 1.0 + time.clock() % 1.0
AttributeError: module 'time' has no attribute 'clock'
Jun 01 06:22:54 2020 (1639) SHUNTING: 1590992574.436434+66babc08367b6351481ae56e1789e3a6a13d28d7

Changed in mailman3 (Debian):
status: Unknown → Fix Committed
Revision history for this message
Matthew Alberti (matthewalberti) wrote :

Is it possible to have the Mailman packages updated to the latest stable, in time for 20.04.1 LTS? That seems to be a good way to bring Mailman on Ubuntu up to speed. I believe Debian upstream is headed that direction.

Revision history for this message
soletan (soletan) wrote :

When transferring MTA setup to latest Ubuntu LTS I am trying to upgrade to latest mailman for running it another 4 years. As far as I can see there is no progress on this one and I'm currently stumbling right over this issue. mailman3 seems to be non-functional in Ubuntu 20.04 ... maybe you could at least mark mailman3 as unstable/beta to prevent other interested users from trying to installed it for the whole setup is far from being well-documented and straight forward. After days of spending in trying to set up mailman3 this issue being unresolved for months is a bummer.

Revision history for this message
soletan (soletan) wrote :

FWIW I was able to fix it temporarily by replacing

   time.clock()

near end of file /usr/lib/python3/dist-packages/mailman/utilities/uid.py with

   time.process_time()

Changed in mailman3 (Debian):
status: Fix Committed → Fix Released
Revision history for this message
Simon Brown (zotan) wrote :

I've just upgraded my list server from 18.04 to 20.04 and this bug is a show-stopper for 20.04. Without the hand-patching mentioned before, mailman will fail to do things like hold mail for moderation, which makes it close to unusable.

I would very much like to see a fix backported.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Bug attachments

Remote bug watches

Bug watches keep track of this bug in other bug trackers.