Mark Sapiro pushed to branch master at GNU Mailman / Mailman Core
Commits:
c030b91e by Mark Sapiro at 2021-03-28T02:27:06+00:00
Use the pending_request_life setting for subscription requests.
- - - - -
c821a8b3 by Mark Sapiro at 2021-03-28T02:27:06+00:00
Merge branch 'req' into 'master'
Use the pending_request_life setting for subscription requests.
Closes #729
See merge request mailman/mailman!813
- - - - -
3 changed files:
- src/mailman/app/subscriptions.py
- src/mailman/docs/NEWS.rst
- src/mailman/model/requests.py
Changes:
=====================================
src/mailman/app/subscriptions.py
=====================================
@@ -20,7 +20,6 @@
import uuid
import logging
-from datetime import timedelta
from email.utils import formataddr
from enum import Enum
from mailman.app.membership import delete_member
@@ -155,7 +154,8 @@ class _SubscriptionWorkflowCommon(Workflow):
when=now().replace(microsecond=0).isoformat(),
token_owner=token_owner.name,
)
- self.token = pendings.add(pendable, timedelta(days=3650))
+ # MAS This did specify a 3650 day lifetime, but go with the default.
+ self.token = pendings.add(pendable)
@public
=====================================
src/mailman/docs/NEWS.rst
=====================================
@@ -18,6 +18,8 @@ Here is a history of user visible changes to Mailman.
Bugs
----
* Bounce runner now properly commits database transactions. (Closes #850)
+* Pending subscriptions now have a lifetime equal to the configured
+ ``pending_request_life`` rather than 3650 days. (Closes #729)
.. _news-3.3.4:
=====================================
src/mailman/model/requests.py
=====================================
@@ -17,7 +17,6 @@
"""Implementations of the pending requests interfaces."""
-from datetime import timedelta
from mailman.database.model import Model
from mailman.database.transaction import dbconnection
from mailman.database.types import Enum, SAUnicode
@@ -102,7 +101,8 @@ class ListRequests:
else:
pendable = DataPendable()
pendable.update(data)
- token = getUtility(IPendings).add(pendable, timedelta(days=5000))
+ # MAS This did specify a 5000 day life, but go with the default.
+ token = getUtility(IPendings).add(pendable)
data_hash = token
request = _Request(key, request_type, self.mailing_list, data_hash)
store.add(request)
View it on GitLab:
https://gitlab.com/mailman/mailman/-/compare/9e528ee22ba45bcffc1db5876211206dc8b75dda...c821a8b33e7fd49b13836247966394aed2f6697a
--
View it on GitLab:
https://gitlab.com/mailman/mailman/-/compare/9e528ee22ba45bcffc1db5876211206dc8b75dda...c821a8b33e7fd49b13836247966394aed2f6697a
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]