summaryrefslogtreecommitdiff
path: root/src/mailman/interfaces/pending.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/mailman/interfaces/pending.py')
-rw-r--r--src/mailman/interfaces/pending.py12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/mailman/interfaces/pending.py b/src/mailman/interfaces/pending.py
index 9907aa779..c921123de 100644
--- a/src/mailman/interfaces/pending.py
+++ b/src/mailman/interfaces/pending.py
@@ -82,11 +82,11 @@ class IPendings(Interface):
:return: A token string for inclusion in urls and email confirmations.
"""
- def confirm(token, expunge=True):
+ def confirm(token, *, expunge=True):
"""Return the IPendable matching the token.
:param token: The token string for the IPendable given by the `.add()`
- method.
+ method, or None if there is no record associated with the token.
:param expunge: A flag indicating whether the pendable record should
also be removed from the database or not.
:return: The matching IPendable or None if no match was found.
@@ -94,3 +94,11 @@ class IPendings(Interface):
def evict():
"""Remove all pended items whose lifetime has expired."""
+
+ def __iter__():
+ """An iterator over all pendables.
+
+ Each element is a 2-tuple of the form (token, dict).
+ """
+
+ count = Attribute('The number of pendables in the pendings database.')