Barry Warsaw pushed to branch master at mailman / Mailman
Commits: 228e70d7 by Barry Warsaw at 2016-11-22T09:43:49-05:00 Start porting to Python 3.6 - - - - - 2ca7f91c by Barry Warsaw at 2016-11-22T13:22:25-05:00 Back out the last change. - - - - - 40b586fa by Barry Warsaw at 2016-11-22T15:52:34-05:00 A couple of fixes for Python 3.6 - - - - - 2bcab3d5 by Barry Warsaw at 2016-11-24T13:32:22-05:00 Start porting to Python 3.6 - - - - - f638cc15 by Barry Warsaw at 2016-11-24T13:32:22-05:00 Back out the last change. - - - - - 867c7e56 by Barry Warsaw at 2016-11-24T13:33:19-05:00 A couple of fixes for Python 3.6 - - - - - 1c2337a4 by Barry Warsaw at 2016-11-24T13:34:02-05:00 Merge branch 'py36' of gitlab.com:mailman/mailman into py36 - - - - - ffc8ed13 by Barry Warsaw at 2016-11-25T09:05:26-05:00 Handle a Python 3.6 difference in interact(). Also: * Fix a regexp that 3.6 raises an exception on. * Remove a deprecated attribute from passlib.cfg. - - - - - 503cd081 by Barry Warsaw at 2016-11-28T17:20:25-05:00 Merge branch 'master' into py36 - - - - - b9250ebd by Barry Warsaw at 2016-11-28T17:22:28-05:00 Officially support Python 3.6. Closes #295 - - - - - 6a96948a by Barry Warsaw at 2016-11-29T01:28:56+00:00 Merge branch 'py36' into 'master' Porting to Python 3.6 For issue #295 See merge request !219 - - - - - 8 changed files: - .gitlab-ci.yml - + BREAKS.rst - src/mailman/config/passlib.cfg - src/mailman/docs/NEWS.rst - src/mailman/handlers/subject_prefix.py - src/mailman/utilities/interact.py - src/mailman/utilities/tests/test_import.py - tox.ini Changes: ===================================== .gitlab-ci.yml ===================================== --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -21,13 +21,13 @@ docs: sqlite: script: - - tox -e py34,py35 + - tox -e py34,py35,py36 pgsql: services: - postgres:latest script: - - MAILMAN_EXTRA_TESTING_CFG=/home/runner/configs/postgres.cfg tox -e py34-pg,py35-pg + - MAILMAN_EXTRA_TESTING_CFG=/home/runner/configs/postgres.cfg tox -e py34-pg,py35-pg,py36-pg tags: - postgres @@ -35,6 +35,6 @@ mysql: services: - mysql:latest script: - - MAILMAN_EXTRA_TESTING_CFG=/home/runner/configs/mysql.cfg tox -e py34-mysql,py35-mysql + - MAILMAN_EXTRA_TESTING_CFG=/home/runner/configs/mysql.cfg tox -e py34-mysql,py35-mysql,py36-mysql tags: - mysql ===================================== BREAKS.rst ===================================== --- /dev/null +++ b/BREAKS.rst @@ -0,0 +1,5 @@ +====================== + Python 3.6 breakages +====================== + +* https://bugs.python.org/issue27030 ===================================== src/mailman/config/passlib.cfg ===================================== --- 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 ===================================== src/mailman/docs/NEWS.rst ===================================== --- 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 ===================================== src/mailman/handlers/subject_prefix.py ===================================== --- 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 ===================================== src/mailman/utilities/interact.py ===================================== --- 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) ===================================== src/mailman/utilities/tests/test_import.py ===================================== --- 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('bl...@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'), ===================================== tox.ini ===================================== --- a/tox.ini +++ b/tox.ini @@ -1,5 +1,5 @@ [tox] -envlist = {py34,py35}{,-coverage,-diffcov}{,-pg}{,-mysql},qa +envlist = {py34,py35,py36}{,-coverage,-diffcov}{,-pg}{,-mysql},qa recreate = True skip_missing_interpreters = True View it on GitLab: https://gitlab.com/mailman/mailman/compare/88212f9d5c9a13e8e723d90a42f00d0f9b66d929...6a96948af68f0558263d46ac782de8aec5b8be1f
_______________________________________________ Mailman-checkins mailing list Mailman-checkins@python.org Unsubscribe: https://mail.python.org/mailman/options/mailman-checkins/archive%40jab.org