summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBarry Warsaw2009-11-30 18:30:03 -0500
committerBarry Warsaw2009-11-30 18:30:03 -0500
commitdc68c4f96e02e16ae5613bf1e7336ac582f560c5 (patch)
tree66e57e8fca89a308ff634ab54f37b2c1c033a317
parent2e2946ed0250a6bbfa2c5f0d69b5596524150db5 (diff)
downloadmailman-dc68c4f96e02e16ae5613bf1e7336ac582f560c5.tar.gz
mailman-dc68c4f96e02e16ae5613bf1e7336ac582f560c5.tar.zst
mailman-dc68c4f96e02e16ae5613bf1e7336ac582f560c5.zip
-rw-r--r--src/mailman/docs/NEWS.txt3
-rw-r--r--src/mailman/tests/test_bounces.py17
-rw-r--r--src/mailman/version.py6
3 files changed, 15 insertions, 11 deletions
diff --git a/src/mailman/docs/NEWS.txt b/src/mailman/docs/NEWS.txt
index 3a7fd3934..ef5371acf 100644
--- a/src/mailman/docs/NEWS.txt
+++ b/src/mailman/docs/NEWS.txt
@@ -7,6 +7,9 @@ Copyright (C) 1998-2009 by the Free Software Foundation, Inc.
Here is a history of user visible changes to Mailman.
+3.0 alpha 5 -- "Distant Early Warning"
+======================================
+
3.0 alpha 4 -- "Vital Signs"
============================
(2009-11-28)
diff --git a/src/mailman/tests/test_bounces.py b/src/mailman/tests/test_bounces.py
index d5e525648..56ca4097e 100644
--- a/src/mailman/tests/test_bounces.py
+++ b/src/mailman/tests/test_bounces.py
@@ -30,10 +30,10 @@ import sys
import email
import unittest
-import mailman.tests.bounces
-from mailman.Bouncers.BouncerAPI import Stop
+from contextlib import closing
+from pkg_resources import resource_stream
-MSGDIR = os.path.dirname(mailman.tests.bounces.__file__)
+from mailman.Bouncers.BouncerAPI import Stop
@@ -167,14 +167,16 @@ class BounceTest(unittest.TestCase):
# Done
)
+ def _getmsg(self, filename):
+ with closing(resource_stream('mailman.tests.bounces', filename)) as fp:
+ return email.message_from_file(fp)
+
def test_bounce(self):
for modname, filename, addrs in self.DATA:
module = 'mailman.Bouncers.' + modname
__import__(module)
# XXX Convert this tousing package resources
- path = os.path.join(MSGDIR, filename)
- with open(path) as fp:
- msg = email.message_from_file(fp)
+ msg = self._getmsg(filename)
foundaddrs = sys.modules[module].process(msg)
# Some modules return None instead of [] for failure
if foundaddrs is None:
@@ -190,8 +192,7 @@ class BounceTest(unittest.TestCase):
def test_SMTP32_failure(self):
from mailman.Bouncers import SMTP32
# This file has no X-Mailer: header
- with open(os.path.join(MSGDIR, 'postfix_01.txt')) as fp:
- msg = email.message_from_file(fp)
+ msg = self._getmsg('postfix_01.txt')
self.failIf(msg['x-mailer'] is not None)
self.failIf(SMTP32.process(msg))
diff --git a/src/mailman/version.py b/src/mailman/version.py
index 6950159f2..087974944 100644
--- a/src/mailman/version.py
+++ b/src/mailman/version.py
@@ -18,8 +18,8 @@
"""Mailman version strings."""
# Mailman version
-VERSION = "3.0.0a4"
-CODENAME = 'Vital Signs'
+VERSION = "3.0.0a5"
+CODENAME = 'Distant Early Warning'
# And as a hex number in the manner of PY_VERSION_HEX
ALPHA = 0xa
@@ -34,7 +34,7 @@ MINOR_REV = 0
MICRO_REV = 0
REL_LEVEL = ALPHA
# at most 15 beta releases!
-REL_SERIAL = 4
+REL_SERIAL = 5
HEX_VERSION = ((MAJOR_REV << 24) | (MINOR_REV << 16) | (MICRO_REV << 8) |
(REL_LEVEL << 4) | (REL_SERIAL << 0))