summaryrefslogtreecommitdiff
path: root/src/mailman/database
diff options
context:
space:
mode:
authorBarry Warsaw2009-06-29 21:30:04 -0400
committerBarry Warsaw2009-06-29 21:30:04 -0400
commit853060fa5fd453b745b09d991b8053c2024cb079 (patch)
tree727e04460a2b2314d3d2d64048a7a9bf29131d25 /src/mailman/database
parentcdc95447d97c43f93e8c4b282f150228a5620703 (diff)
downloadmailman-853060fa5fd453b745b09d991b8053c2024cb079.tar.gz
mailman-853060fa5fd453b745b09d991b8053c2024cb079.tar.zst
mailman-853060fa5fd453b745b09d991b8053c2024cb079.zip
More REST server updates.
* Get rid of in-Python adapter registration in favor of ZCML. Eventually, I'd like to get rid of the ZCML. * Set the view_permission to None, but it's still not right. * Add IDomainSet and an adapter from Configuration to IDomainSet.
Diffstat (limited to 'src/mailman/database')
-rw-r--r--src/mailman/database/autorespond.py17
-rw-r--r--src/mailman/database/mailinglist.py17
2 files changed, 0 insertions, 34 deletions
diff --git a/src/mailman/database/autorespond.py b/src/mailman/database/autorespond.py
index d65e8ed07..0a84f30e3 100644
--- a/src/mailman/database/autorespond.py
+++ b/src/mailman/database/autorespond.py
@@ -23,7 +23,6 @@ __metaclass__ = type
__all__ = [
'AutoResponseRecord',
'AutoResponseSet',
- 'adapt_mailing_list_to_response_set',
]
@@ -92,19 +91,3 @@ class AutoResponseSet:
AutoResponseRecord.response_type == response_type)
).order_by(Desc(AutoResponseRecord.date_sent))
return (None if results.count() == 0 else results.first())
-
-
-
-def adapt_mailing_list_to_response_set(iface, obj):
- """Adapt an `IMailingList` to an `IAutoResponseSet`.
-
- :param iface: The interface to adapt to.
- :type iface: `zope.interface.Interface`
- :param obj: The object being adapted.
- :type obj: `IMailingList`
- :return: An `IAutoResponseSet` instance if adaptation succeeded or None if
- it didn't.
- """
- return (AutoResponseSet(obj)
- if IMailingList.providedBy(obj) and iface is IAutoResponseSet
- else None)
diff --git a/src/mailman/database/mailinglist.py b/src/mailman/database/mailinglist.py
index b8cf3e01c..f08adfd8b 100644
--- a/src/mailman/database/mailinglist.py
+++ b/src/mailman/database/mailinglist.py
@@ -22,7 +22,6 @@ from __future__ import absolute_import, unicode_literals
__metaclass__ = type
__all__ = [
'MailingList',
- 'adapt_mailing_list_to_acceptable_alias_set',
]
@@ -462,19 +461,3 @@ class AcceptableAliasSet:
AcceptableAlias.mailing_list == self._mailing_list)
for alias in aliases:
yield alias.alias
-
-
-
-def adapt_mailing_list_to_acceptable_alias_set(iface, obj):
- """Adapt an `IMailingList` to an `IAcceptableAliasSet`.
-
- :param iface: The interface to adapt to.
- :type iface: `zope.interface.Interface`
- :param obj: The object being adapted.
- :type obj: `IMailingList`
- :return: An `IAcceptableAliasSet` instance if adaptation succeeded or None
- if it didn't.
- """
- return (AcceptableAliasSet(obj)
- if IMailingList.providedBy(obj) and iface is IAcceptableAliasSet
- else None)