Mark Sapiro pushed to branch master at GNU Mailman / Mailman Core
Commits:
29905b4e by Mark Sapiro at 2022-12-09T17:58:29+00:00
Replace deprecated SQLAlchemy query.values() method.
This fixes possible truncated results from queries with MariaDB and possibly
MySQL DBMs.
Fixes #1044
- - - - -
de1ccef3 by Mark Sapiro at 2022-12-09T17:58:29+00:00
Merge branch 'mta' into 'master'
Replace deprecated SQLAlchemy query.values() method.
Closes #1044
See merge request mailman/mailman!1066
- - - - -
2 changed files:
- src/mailman/docs/NEWS.rst
- src/mailman/model/listmanager.py
Changes:
=====================================
src/mailman/docs/NEWS.rst
=====================================
@@ -8,6 +8,20 @@ Copyright (C) 1998-2022 by the Free Software Foundation, Inc.
Here is a history of user visible changes to Mailman.
+.. _news-3.3.8:
+
+3.3.8
+=====
+
+(xxxx-xx-xx)
+
+Bugs fixed
+----------
+* The deprecated SQLAlchemy query.values() method is replaced by
+ query.with_entities(). This fixes an issue with MariaDB that truncated
+ the generated postfix_lmtp file. (Closes #1044)
+
+
.. _news-3.3.7:
3.3.7
=====================================
src/mailman/model/listmanager.py
=====================================
@@ -119,8 +119,8 @@ class ListManager:
def names(self, store):
"""See `IListManager`."""
result_set = store.query(MailingList)
- for mail_host, list_name in result_set.values(MailingList.mail_host,
- MailingList.list_name):
+ for mail_host, list_name in result_set.with_entities(
+ MailingList.mail_host, MailingList.list_name):
yield '{}@{}'.format(list_name, mail_host)
@property
@@ -128,7 +128,7 @@ class ListManager:
def list_ids(self, store):
"""See `IListManager`."""
result_set = store.query(MailingList)
- for list_id in result_set.values(MailingList._list_id):
+ for list_id in result_set.with_entities(MailingList._list_id):
assert len(list_id) == 1
yield list_id[0]
@@ -137,8 +137,8 @@ class ListManager:
def name_components(self, store):
"""See `IListManager`."""
result_set = store.query(MailingList)
- for mail_host, list_name in result_set.values(MailingList.mail_host,
- MailingList.list_name):
+ for mail_host, list_name in result_set.with_entities(
+ MailingList.mail_host, MailingList.list_name):
yield list_name, mail_host
@dbconnection
View it on GitLab:
https://gitlab.com/mailman/mailman/-/compare/882452fd7624836ba9ada6ecc8b492d0b79451c4...de1ccef32deb60c8d60fbd6e2dc09dc2996e3af8
--
View it on GitLab:
https://gitlab.com/mailman/mailman/-/compare/882452fd7624836ba9ada6ecc8b492d0b79451c4...de1ccef32deb60c8d60fbd6e2dc09dc2996e3af8
You're receiving this email because of your account on gitlab.com.
_______________________________________________
Mailman-checkins mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/mailman-checkins.python.org/
Member address: [email protected]