Hi
after a pip reinstall, my mailman (3.3.10, on mariadb) fails with:
2026-09-26 22:08:25 [FALCON] [ERROR] GET /3.1/lists?advertised=true&count=0&page=1 => Traceback (most recent call last): File "/opt/mailman/venv/lib/python3.11/site-packages/falcon/app.py", line 481, in __call__ responder(req, resp, **params) File "/opt/mailman/venv/lib/python3.11/site-packages/mailman/rest/lists.py", line 342, in on_get resource = self._make_collection(request) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/mailman/venv/lib/python3.11/site-packages/mailman/rest/helpers.py", line 171, in _make_collection start, total_size, collection = self._paginate( ^^^^^^^^^^^^^^^ File "/opt/mailman/venv/lib/python3.11/site-packages/mailman/rest/helpers.py", line 153, in _paginate total_size = len(collection) ^^^^^^^^^^^^^^^ File "/opt/mailman/venv/lib/python3.11/site-packages/mailman/utilities/queries.py", line 48, in __len__ .scalars(select(func.count()).select_from(self._query)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "<sqlalchemy generated _generative() wrapper for sqlalchemy.sql.selectable.Select.select_from>", line 2, in select_from return target(fn, self, *froms) ^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/mailman/venv/lib/python3.11/site-packages/sqlalchemy/sql/base.py", line 296, in _generative x = fn(self, *args, **kw) ^^^^^^^^^^^^^^^^^^^^^ File "/opt/mailman/venv/lib/python3.11/site-packages/sqlalchemy/sql/selectable.py", line 6631, in select_from self._from_obj += tuple( ^^^^^^ File "/opt/mailman/venv/lib/python3.11/site-packages/sqlalchemy/sql/selectable.py", line 6632, in <genexpr> coercions.expect( File "/opt/mailman/venv/lib/python3.11/site-packages/sqlalchemy/sql/coercions.py", line 434, in expect return impl._implicit_coercions( ^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/mailman/venv/lib/python3.11/site-packages/sqlalchemy/sql/coercions.py", line 1287, in _implicit_coercions self._raise_for_expected(element, argname, resolved) File "/opt/mailman/venv/lib/python3.11/site-packages/sqlalchemy/sql/coercions.py", line 705, in _raise_for_expected super()._raise_for_expected( File "/opt/mailman/venv/lib/python3.11/site-packages/sqlalchemy/sql/coercions.py", line 528, in _raise_for_expected raise exc.ArgumentError(msg, code=code) from err sqlalchemy.exc.ArgumentError: FROM expression, such as a Table or alias() object expected, got <sqlalchemy.sql.selectable.Select object at 0x7f1a27269050>. To create a FROM clause from a <class 'sqlalchemy.sql.selectable.Select'> object, use the .subquery() method. (Background on this error at: https://sqlalche.me/e/21/89ve)
[26/Sep/2026:22:08:25 +0200] "GET /3.1/lists?advertised=true&count=0&page=1 HTTP/1.1" 500 38 "-" "GNU Mailman REST client v3.3.5"
I tried to add:
debug: yes to [database]
and
[logging.database] level: debug path: mailman.database.log
But i cannot get more details when the error happens. Any hints to help me debug the problem?
many thanks, simon
On 9/26/26 13:20, simo--- via Mailman-users wrote:
Hi
after a pip reinstall, my mailman (3.3.10, on mariadb) fails with:
2026-09-26 22:08:25 [FALCON] [ERROR] GET /3.1/lists?advertised=true&count=0&page=1 => Traceback (most recent call last):
I suspect your pip reinstall upgraded SQLAlchemy to a version >=2.1
which has a known incompatibility with current Mailman. If this is the
case, try pip install sqlalchemy<2.1.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
yes, my bad I didn't think I'd found such a fresh issue, checked the issue list few hours before
works well with 2.0.54, will stay pinned until solved
many thanks simon
On Saturday, 26 September 2026 23:19:23 CEST Mark Sapiro wrote:
On 9/26/26 13:20, simo--- via Mailman-users wrote:
Hi
after a pip reinstall, my mailman (3.3.10, on mariadb) fails with:
2026-09-26 22:08:25 [FALCON] [ERROR] GET /3.1/lists? advertised=true&count=0&page=1 => Traceback (most recent call last): I suspect your pip reinstall upgraded SQLAlchemy to a version >=2.1 which has a known incompatibility with current Mailman. If this is the case, try
pip install sqlalchemy<2.1.
Great that works (after restarting the services).
How can I tell pip to stay at sqlalchemy<2.1 when doing a pip install -U --upgrade-strategy eager ...
Is there a dedicated requirements.txt or something?
TIA, Andreas
Andreas Vetter writes:
On Saturday, 26 September 2026 23:19:23 CEST Mark Sapiro wrote:
How can I tell pip to stay at sqlalchemy<2.1 when doing a pip install -U --upgrade-strategy eager ...
Is there a dedicated requirements.txt or something?
From pip 25.1.1 help install:
-c, --constraint <file> Constrain versions using the given constraints file. This option can be used multiple times.
I expect this will be the same format as a requirements file but I've never used it. I expect that this will override any constraints from an "-r requirements.txt" etc, but whether that means it will relax existing constraints I'm not sure. I haven't used it.
-- GNU Mailman consultant (installation, migration, customization) Sirius Open Source https://www.siriusopensource.com/ Software systems consulting in Europe, North America, and Japan
On 2026-09-28 21:36:07 +0900 (+0900), Stephen J. Turnbull wrote: [...]
From pip 25.1.1 help install:
-c, --constraint <file> Constrain versions using the given constraints file. This option can be used multiple times.
I expect this will be the same format as a requirements file but I've never used it. I expect that this will override any constraints from an "-r requirements.txt" etc, but whether that means it will relax existing constraints I'm not sure. I haven't used it.
Yes, it takes the exact same formatting and contents as a requirements.txt file, the effective difference is that it only overrides version selection (if possible) for packages that are being installed but doesn't tell pip to install any new packages even if they're listed in that file.
It was originally added by OpenStack contributors because, in the days before pip's modern dep solver, we needed a way to force various projects in OpenStack to test with subsets of the same pre-solved dependencies (both direct and transitive) in order to provide coinstallability guarantees for them.
For the current SQLAlchemy case it should work fine, just note that it can't override any dependency to a version that results in no viable solver solution for the set of packages being installed.
Jeremy Stanley
participants (5)
-
Andreas Vetter -
Jeremy Stanley -
Mark Sapiro -
simo@oziosi.org -
Stephen J. Turnbull