diff options
| author | Barry Warsaw | 2016-11-29 01:28:56 +0000 |
|---|---|---|
| committer | Barry Warsaw | 2016-11-29 01:28:56 +0000 |
| commit | 6a96948af68f0558263d46ac782de8aec5b8be1f (patch) | |
| tree | c278f4d8a341aea8dfdc6b1160bee472cd39c3ec /src | |
| parent | 88212f9d5c9a13e8e723d90a42f00d0f9b66d929 (diff) | |
| parent | b9250ebdefaae0ca98324cf42e4dd51ad550d839 (diff) | |
| download | mailman-6a96948af68f0558263d46ac782de8aec5b8be1f.tar.gz mailman-6a96948af68f0558263d46ac782de8aec5b8be1f.tar.zst mailman-6a96948af68f0558263d46ac782de8aec5b8be1f.zip | |
Diffstat (limited to 'src')
| -rw-r--r-- | src/mailman/config/passlib.cfg | 1 | ||||
| -rw-r--r-- | src/mailman/docs/NEWS.rst | 1 | ||||
| -rw-r--r-- | src/mailman/handlers/subject_prefix.py | 2 | ||||
| -rw-r--r-- | src/mailman/utilities/interact.py | 9 | ||||
| -rw-r--r-- | src/mailman/utilities/tests/test_import.py | 7 |
5 files changed, 14 insertions, 6 deletions
diff --git a/src/mailman/config/passlib.cfg b/src/mailman/config/passlib.cfg index 805f0fb11..0564f9eb3 100644 --- a/src/mailman/config/passlib.cfg +++ b/src/mailman/config/passlib.cfg @@ -3,7 +3,6 @@ # See http://packages.python.org/passlib/index.html for details. schemes = sha512_crypt, sha256_crypt default = sha512_crypt -all__vary_rounds = 0.1 sha256_crypt__min_rounds = 80000 sha512_crypt__min_rounds = 60000 admin__sha256_crypt__min_rounds = 160000 diff --git a/src/mailman/docs/NEWS.rst b/src/mailman/docs/NEWS.rst index 26d7433c3..1841f8fb7 100644 --- a/src/mailman/docs/NEWS.rst +++ b/src/mailman/docs/NEWS.rst @@ -151,6 +151,7 @@ Interfaces Internal -------- + * Add official support for Python 3.6. (Closes #295) * A handful of unused legacy exceptions have been removed. The redundant `MailmanException` has been removed; use `MailmanError` everywhere. * Drop the use of the `lazr.smtptest` library, which is based on the diff --git a/src/mailman/handlers/subject_prefix.py b/src/mailman/handlers/subject_prefix.py index ff728d92e..20f47fc5d 100644 --- a/src/mailman/handlers/subject_prefix.py +++ b/src/mailman/handlers/subject_prefix.py @@ -162,7 +162,7 @@ class SubjectPrefix: if p.search(prefix, 1): # The prefix has number, so we should search prefix w/number in # subject. Also, force new style. - prefix_pattern = p.sub(r'\s*\d+\s*', prefix_pattern) + prefix_pattern = p.sub(r'\\s*\\d+\\s*', prefix_pattern) # Substitute %d in prefix with post_id with suppress(TypeError): prefix = prefix % mlist.post_id diff --git a/src/mailman/utilities/interact.py b/src/mailman/utilities/interact.py index fec980b80..ac1612156 100644 --- a/src/mailman/utilities/interact.py +++ b/src/mailman/utilities/interact.py @@ -22,6 +22,7 @@ import sys import code from contextlib import suppress +from inspect import signature from mailman import public @@ -67,4 +68,10 @@ def interact(upframe=True, banner=DEFAULT_BANNER, overrides=None): Python %s on %s Type "help", "copyright", "credits" or "license" for more information.''' % ( sys.version, sys.platform) - interp.interact(banner) + # Python 3.6 added an exitmsg keyword but we don't currently support + # configuring it. For consistency between Python 3.6 and earlier + # versions, suppress the exit message if possible. + kws = dict(banner=banner) + if 'exitmsg' in signature(interp.interact).parameters: + kws['exitmsg'] = '' + interp.interact(**kws) diff --git a/src/mailman/utilities/tests/test_import.py b/src/mailman/utilities/tests/test_import.py index d74a198df..62985545f 100644 --- a/src/mailman/utilities/tests/test_import.py +++ b/src/mailman/utilities/tests/test_import.py @@ -65,6 +65,7 @@ def list_to_string(data): class TestBasicImport(unittest.TestCase): layer = ConfigLayer + maxDiff = None def setUp(self): self._mlist = create_list('blank@example.com') @@ -322,12 +323,12 @@ class TestBasicImport(unittest.TestCase): SubscriptionPolicy.confirm_then_moderate) def test_header_matches(self): - # This test contail real cases of header_filter_rules + # This test containes real cases of header_filter_rules. self._pckdict['header_filter_rules'] = [ ('X\\-Spam\\-Status\\: Yes.*', 3, False), ('^X-Spam-Status: Yes\r\n\r\n', 2, False), ('^X-Spam-Level: \\*\\*\\*.*$', 3, False), - ('^X-Spam-Level:.\\*\\*\r\n^X-Spam:.\\Yes', 3, False), + ('^X-Spam-Level:.\\*\\*\r\n^X-Spam:.Yes', 3, False), ('Subject: \\[SPAM\\].*', 3, False), ('^Subject: .*loan.*', 3, False), ('Original-Received: from *linkedin.com*\r\n', 3, False), @@ -363,7 +364,7 @@ class TestBasicImport(unittest.TestCase): ('x-spam-status', 'Yes', 'reject'), ('x-spam-level', '\\*\\*\\*.*$', 'discard'), ('x-spam-level', '\\*\\*', 'discard'), - ('x-spam', '\\Yes', 'discard'), + ('x-spam', 'Yes', 'discard'), ('subject', '\\[SPAM\\].*', 'discard'), ('subject', '.*loan.*', 'discard'), ('original-received', 'from *linkedin.com*', 'discard'), |
