Hi gang,
I probably have already developed an uneviable reputation of being able to produce the finest of mess. I stay true to form here.
In my 3.12 installation when my admin clicks to view the held messages, he gets an internal server error. The error comes from postorius, where the log entry is
2026-04-15 12:45:25 [FALCON] [ERROR] GET /3.1/lists/bibnez@folks.email/held => Traceback (most recent call last): File "falcon/app.py", line 440, in falcon.app.App.__call__ File "/usr/local/mailman/venv/lib/python3.12/site-packages/mailman/rest/post_moderation.py", line 194, in on_get resource = self._make_collection(request) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/mailman/venv/lib/python3.12/site-packages/mailman/rest/helpers.py", line 189, in _make_collection [etag(resource) for resource in entries] ^^^^^^^^^^^^^^ File "/usr/local/mailman/venv/lib/python3.12/site-packages/mailman/rest/helpers.py", line 104, in etag return json.dumps(resource, cls=ExtendedEncoder, ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.12/json/__init__.py", line 238, in dumps **kw).encode(obj) ^^^^^^^^^^^ File "/usr/lib/python3.12/json/encoder.py", line 200, in encode chunks = self.iterencode(o, _one_shot=True) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.12/json/encoder.py", line 258, in iterencode return _iterencode(o, 0) ^^^^^^^^^^^^^^^^^ File "/usr/local/mailman/venv/lib/python3.12/site-packages/mailman/rest/helpers.py", line 68, in default return super().default(obj) ^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.12/json/encoder.py", line 180, in default raise TypeError(f'Object of type {o.__class__.__name__} ' TypeError: Object of type set is not JSON serializable
Checking the actual set that is returned, by converting the set into a string and writing it to a file (by enhancing helpers.py), I discover that what is returned is as set of 53 email addresses, not of 24 messages as the web interface suggests.
Intrestingly, my admin reports that the he is correctly informed about the held messages via email. The then forwards those that need posting to the list.
I suspect that to get to the bottom of this problem, I need to use the low-level postorious functions that actually access the parse the held message data.
-- Written by Thomas Krichel http://openlib.org/home/krichel on his 22230th day.