------------------------------------------------------------
revno: 6708
committer: Barry Warsaw <[email protected]>
branch nick: plugins
timestamp: Wed 2009-03-25 08:05:27 -0400
message:
  Move the Action and NewsModeration enums into their own interface files.
added:
  src/mailman/interfaces/action.py
  src/mailman/interfaces/nntp.py
modified:
  src/mailman/app/moderator.py
  src/mailman/docs/requests.txt
  src/mailman/interfaces/__init__.py
  src/mailman/queue/docs/news.txt
  src/mailman/queue/news.py
  src/mailman/rules/docs/news-moderation.txt
  src/mailman/rules/news_moderation.py
  src/mailman/styles/default.py

=== modified file 'src/mailman/app/moderator.py'
--- src/mailman/app/moderator.py        2009-02-13 01:36:21 +0000
+++ src/mailman/app/moderator.py        2009-03-25 12:05:27 +0000
@@ -42,7 +42,7 @@
 from mailman.config import config
 from mailman.core import errors
 from mailman.email.message import Message, UserNotification
-from mailman.interfaces import Action
+from mailman.interfaces.action import Action
 from mailman.interfaces.member import AlreadySubscribedError, DeliveryMode
 from mailman.interfaces.requests import RequestType
 

=== modified file 'src/mailman/docs/requests.txt'
--- src/mailman/docs/requests.txt       2009-02-13 01:36:21 +0000
+++ src/mailman/docs/requests.txt       2009-03-25 12:05:27 +0000
@@ -250,7 +250,7 @@
 Once held, the moderator can select one of several dispositions.  The most
 trivial is to simply defer a decision for now.
 
-    >>> from mailman.interfaces import Action
+    >>> from mailman.interfaces.action import Action
     >>> moderator.handle_message(mlist, id_1, Action.defer)
     >>> requests.get_request(id_1) is not None
     True
@@ -411,7 +411,7 @@
 approval.  In this case, several pieces of information related to the
 subscription must be provided, including the subscriber's address and real
 name, their password (possibly hashed), what kind of delivery option they are
-chosing and their preferred language.
+choosing and their preferred language.
 
     >>> from mailman.interfaces.member import DeliveryMode
     >>> mlist.admin_immed_notify = False

=== modified file 'src/mailman/interfaces/__init__.py'
--- src/mailman/interfaces/__init__.py  2009-01-04 05:22:08 +0000
+++ src/mailman/interfaces/__init__.py  2009-03-25 12:05:27 +0000
@@ -1,44 +0,0 @@
-# Copyright (C) 2007-2009 by the Free Software Foundation, Inc.
-#
-# This file is part of GNU Mailman.
-#
-# GNU Mailman is free software: you can redistribute it and/or modify it under
-# the terms of the GNU General Public License as published by the Free
-# Software Foundation, either version 3 of the License, or (at your option)
-# any later version.
-#
-# GNU Mailman is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
-# more details.
-#
-# You should have received a copy of the GNU General Public License along with
-# GNU Mailman.  If not, see <http://www.gnu.org/licenses/>.
-
-__metaclass__ = type
-__all__ = [
-    'Action',
-    'NewsModeration',
-    ]
-
-
-from munepy import Enum
-
-
-
-class Action(Enum):
-    hold    = 0
-    reject  = 1
-    discard = 2
-    accept  = 3
-    defer   = 4
-
-
-
-class NewsModeration(Enum):
-    # The newsgroup is not moderated
-    none = 0
-    # The newsgroup is moderated, but allows for an open posting policy.
-    open_moderated = 1
-    # The newsgroup is moderated
-    moderated = 2

=== added file 'src/mailman/interfaces/action.py'
--- src/mailman/interfaces/action.py    1970-01-01 00:00:00 +0000
+++ src/mailman/interfaces/action.py    2009-03-25 12:05:27 +0000
@@ -0,0 +1,33 @@
+# Copyright (C) 2007-2009 by the Free Software Foundation, Inc.
+#
+# This file is part of GNU Mailman.
+#
+# GNU Mailman is free software: you can redistribute it and/or modify it under
+# the terms of the GNU General Public License as published by the Free
+# Software Foundation, either version 3 of the License, or (at your option)
+# any later version.
+#
+# GNU Mailman is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
+# more details.
+#
+# You should have received a copy of the GNU General Public License along with
+# GNU Mailman.  If not, see <http://www.gnu.org/licenses/>.
+
+__metaclass__ = type
+__all__ = [
+    'Action',
+    ]
+
+
+from munepy import Enum
+
+
+
+class Action(Enum):
+    hold    = 0
+    reject  = 1
+    discard = 2
+    accept  = 3
+    defer   = 4

=== added file 'src/mailman/interfaces/nntp.py'
--- src/mailman/interfaces/nntp.py      1970-01-01 00:00:00 +0000
+++ src/mailman/interfaces/nntp.py      2009-03-25 12:05:27 +0000
@@ -0,0 +1,34 @@
+# Copyright (C) 2007-2009 by the Free Software Foundation, Inc.
+#
+# This file is part of GNU Mailman.
+#
+# GNU Mailman is free software: you can redistribute it and/or modify it under
+# the terms of the GNU General Public License as published by the Free
+# Software Foundation, either version 3 of the License, or (at your option)
+# any later version.
+#
+# GNU Mailman is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
+# more details.
+#
+# You should have received a copy of the GNU General Public License along with
+# GNU Mailman.  If not, see <http://www.gnu.org/licenses/>.
+
+__metaclass__ = type
+__all__ = [
+    'NewsModeration',
+    ]
+
+
+from munepy import Enum
+
+
+
+class NewsModeration(Enum):
+    # The newsgroup is not moderated
+    none = 0
+    # The newsgroup is moderated, but allows for an open posting policy.
+    open_moderated = 1
+    # The newsgroup is moderated
+    moderated = 2

=== modified file 'src/mailman/queue/docs/news.txt'
--- src/mailman/queue/docs/news.txt     2008-12-23 04:26:58 +0000
+++ src/mailman/queue/docs/news.txt     2009-03-25 12:05:27 +0000
@@ -117,7 +117,7 @@
 When the newsgroup is moderated, an Approved: header with the list's posting
 address is added for the benefit of the Usenet system.
 
-    >>> from mailman.interfaces import NewsModeration
+    >>> from mailman.interfaces.nntp import NewsModeration
     >>> mlist.news_moderation = NewsModeration.open_moderated
     >>> msg = message_from_string("""\
     ... From: [email protected]
@@ -140,7 +140,7 @@
     >>> msg['approved']
     u'[email protected]'
 
-But if the newsgroup is not moderated, the Approved: header is not chnaged.
+But if the newsgroup is not moderated, the Approved: header is not changed.
 
     >>> mlist.news_moderation = NewsModeration.none
     >>> msg = message_from_string("""\

=== modified file 'src/mailman/queue/news.py'
--- src/mailman/queue/news.py   2009-01-07 00:55:59 +0000
+++ src/mailman/queue/news.py   2009-03-25 12:05:27 +0000
@@ -27,7 +27,7 @@
 
 from mailman import Utils
 from mailman.config import config
-from mailman.interfaces import NewsModeration
+from mailman.interfaces.nntp import NewsModeration
 from mailman.queue import Runner
 
 COMMASPACE = ', '

=== modified file 'src/mailman/rules/docs/news-moderation.txt'
--- src/mailman/rules/docs/news-moderation.txt  2009-01-17 02:04:21 +0000
+++ src/mailman/rules/docs/news-moderation.txt  2009-03-25 12:05:27 +0000
@@ -13,16 +13,16 @@
     >>> print rule.name
     news-moderation
 
-Set the list configuraiton variable to enable newsgroup moderation.
+Set the list configuration variable to enable newsgroup moderation.
 
-    >>> from mailman.interfaces import NewsModeration
+    >>> from mailman.interfaces.nntp import NewsModeration
     >>> mlist.news_moderation = NewsModeration.moderated
 
 And now all messages will match the rule.
 
     >>> msg = message_from_string("""\
     ... From: [email protected]
-    ... Subject: An announcment
+    ... Subject: An announcement
     ...
     ... Great things are happening.
     ... """)

=== modified file 'src/mailman/rules/news_moderation.py'
--- src/mailman/rules/news_moderation.py        2009-01-17 02:04:21 +0000
+++ src/mailman/rules/news_moderation.py        2009-03-25 12:05:27 +0000
@@ -28,7 +28,7 @@
 from zope.interface import implements
 
 from mailman.i18n import _
-from mailman.interfaces import NewsModeration
+from mailman.interfaces.nntp import NewsModeration
 from mailman.interfaces.rules import IRule
 
 

=== modified file 'src/mailman/styles/default.py'
--- src/mailman/styles/default.py       2009-03-03 15:15:42 +0000
+++ src/mailman/styles/default.py       2009-03-25 12:05:27 +0000
@@ -32,10 +32,11 @@
 
 from mailman.config import config
 from mailman.i18n import _
-from mailman.interfaces import Action, NewsModeration
+from mailman.interfaces.action import Action
 from mailman.interfaces.autorespond import ResponseAction
 from mailman.interfaces.mailinglist import (
     DigestFrequency, Personalization, ReplyToMunging)
+from mailman.interfaces.nntp import NewsModeration
 from mailman.interfaces.styles import IStyle
 
 



--
Primary development focus
https://code.launchpad.net/~mailman-coders/mailman/3.0

Your team Mailman Checkins is subscribed to branch lp:mailman.
To unsubscribe from this branch go to 
https://code.launchpad.net/~mailman-coders/mailman/3.0/+edit-subscription.
_______________________________________________
Mailman-checkins mailing list
[email protected]
Unsubscribe: 
http://mail.python.org/mailman/options/mailman-checkins/archive%40jab.org

Reply via email to