Barry Warsaw pushed to branch py36 at mailman / Mailman

Commits:
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

- - - - -


2 changed files:

- src/mailman/handlers/subject_prefix.py
- src/mailman/testing/mta.py


Changes:

=====================================
src/mailman/handlers/subject_prefix.py
=====================================
--- a/src/mailman/handlers/subject_prefix.py
+++ b/src/mailman/handlers/subject_prefix.py
@@ -158,11 +158,11 @@ class SubjectPrefix:
         prefix_pattern = re.escape(prefix)
         # Unescape '%'.
         prefix_pattern = '%'.join(prefix_pattern.split(r'\%'))
-        p = re.compile(r'%\d*d')
+        p = re.compile('%\d*d')
         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/testing/mta.py
=====================================
--- a/src/mailman/testing/mta.py
+++ b/src/mailman/testing/mta.py
@@ -183,7 +183,7 @@ class ConnectionCountingServer(QueueServer):
         log.info('[ConnectionCountingServer] accepted: %s', address)
         StatisticsChannel(self, connection, address)
 
-    def process_message(self, peer, mailfrom, rcpttos, data):
+    def process_message(self, peer, mailfrom, rcpttos, data, **kwargs):
         # Provide a guaranteed order to recpttos.
         QueueServer.process_message(
             self, peer, mailfrom, sorted(rcpttos), data)



View it on GitLab: 
https://gitlab.com/mailman/mailman/compare/228e70d799ab9e37ed0d42dd96b9126d77e20d45...40b586facc07f71be4fd65a1b06af93681ba0441
_______________________________________________
Mailman-checkins mailing list
Mailman-checkins@python.org
Unsubscribe: 
https://mail.python.org/mailman/options/mailman-checkins/archive%40jab.org

Reply via email to