diff options
| author | Barry Warsaw | 2007-10-09 22:18:14 -0400 |
|---|---|---|
| committer | Barry Warsaw | 2007-10-09 22:18:14 -0400 |
| commit | 28f41bc768390f11cf817534cca67a1683f235a7 (patch) | |
| tree | fadc3a93de6c87bfca0ad3276cdc81f257a7a221 /Mailman/constants.py | |
| parent | e335c771c9e4bf0c108dd6ef9b8d210dce9c0221 (diff) | |
| download | mailman-28f41bc768390f11cf817534cca67a1683f235a7.tar.gz mailman-28f41bc768390f11cf817534cca67a1683f235a7.tar.zst mailman-28f41bc768390f11cf817534cca67a1683f235a7.zip | |
Reorganize the enums so that they live in the most appropriate interface. The
only constant left in Mailman.constants is now actually a constant.
Diffstat (limited to 'Mailman/constants.py')
| -rw-r--r-- | Mailman/constants.py | 62 |
1 files changed, 2 insertions, 60 deletions
diff --git a/Mailman/constants.py b/Mailman/constants.py index cb2a656dc..47455b3c4 100644 --- a/Mailman/constants.py +++ b/Mailman/constants.py @@ -17,52 +17,13 @@ """Various constants and enumerations.""" -from munepy import Enum -from zope.interface import implements - -from Mailman.interfaces import IPreferences - __all__ = [ - 'Action', - 'DeliveryMode', - 'DeliveryStatus', - 'MemberRole', - 'ReplyToMunging', 'SystemDefaultPreferences', ] - -class DeliveryMode(Enum): - # Regular (i.e. non-digest) delivery - regular = 1 - # Plain text digest delivery - plaintext_digests = 2 - # MIME digest delivery - mime_digests = 3 - # Summary digests - summary_digests = 4 - - - -class DeliveryStatus(Enum): - # Delivery is enabled - enabled = 1 - # Delivery was disabled by the user - by_user = 2 - # Delivery was disabled due to bouncing addresses - by_bounces = 3 - # Delivery was disabled by an administrator or moderator - by_moderator = 4 - # Disabled for unknown reasons. - unknown = 5 - - - -class MemberRole(Enum): - member = 1 - owner = 2 - moderator = 3 +from Mailman.interfaces import DeliveryMode, DeliveryStatus, IPreferences +from zope.interface import implements @@ -76,22 +37,3 @@ class SystemDefaultPreferences(object): receive_own_postings = True delivery_mode = DeliveryMode.regular delivery_status = DeliveryStatus.enabled - - - -class ReplyToMunging(Enum): - # The Reply-To header is passed through untouched - no_munging = 0 - # The mailing list's posting address is appended to the Reply-To header - point_to_list = 1 - # An explicit Reply-To header is added - explicit_header = 2 - - - -class Action(Enum): - hold = 0 - reject = 1 - discard = 2 - accept = 3 - defer = 4 |
