[prev in list] [next in list] [prev in thread] [next in thread] 

List:       mailman-cvs
Subject:    [Mailman-checkins] [Git][mailman/mailman][master] 5 commits: Boost coverage.
From:       Barry Warsaw <gitlab () mg ! gitlab ! com>
Date:       2016-01-26 21:02:51
Message-ID: 56a7defb35e5b_603444edc3031889 () worker6 ! cluster ! gitlab ! com ! mail
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


Barry Warsaw pushed to branch master at mailman / Mailman


Commits:
af5df60a by Barry Warsaw at 2016-01-25T15:08:43-05:00
Boost coverage.

Also, ignore `raise AssertionError` lines globally.

- - - - -
6c3df829 by Barry Warsaw at 2016-01-25T15:08:43-05:00
Boost coverage and remove dead code.

- - - - -
e2e962ab by Barry Warsaw at 2016-01-25T15:08:43-05:00
Full coverage of the accept chain.

Fix some comments.

- - - - -
57a07393 by Barry Warsaw at 2016-01-25T15:24:48-05:00
Use the more convenient API.

- - - - -
802ce668 by Barry Warsaw at 2016-01-26T15:32:19-05:00
Super duper.

 * Python 3-ify super() calls.
 * Remove a bunch of obsolete exception classes.

- - - - -


37 changed files:

- coverage.ini
- src/mailman/app/bounces.py
- src/mailman/app/membership.py
- src/mailman/app/tests/test_workflow.py
- src/mailman/app/workflow.py
- src/mailman/chains/headers.py
- + src/mailman/chains/tests/test_accept.py
- src/mailman/chains/tests/test_reject.py
- src/mailman/compat/smtpd.py
- src/mailman/core/errors.py
- src/mailman/database/postgresql.py
- src/mailman/database/types.py
- src/mailman/interfaces/address.py
- src/mailman/interfaces/domain.py
- src/mailman/interfaces/member.py
- src/mailman/interfaces/mta.py
- src/mailman/model/address.py
- src/mailman/model/bans.py
- src/mailman/model/mailinglist.py
- src/mailman/model/message.py
- src/mailman/model/requests.py
- src/mailman/model/tests/test_mailinglist.py
- src/mailman/model/user.py
- src/mailman/mta/base.py
- src/mailman/mta/bulk.py
- src/mailman/mta/decorating.py
- src/mailman/mta/deliver.py
- src/mailman/mta/personalized.py
- src/mailman/mta/verp.py
- src/mailman/rest/helpers.py
- src/mailman/rest/validator.py
- src/mailman/runners/bounce.py
- src/mailman/runners/digest.py
- src/mailman/runners/lmtp.py
- src/mailman/runners/outgoing.py
- src/mailman/runners/rest.py
- src/mailman/testing/helpers.py


Changes:

=====================================
coverage.ini
=====================================
--- a/coverage.ini
+++ b/coverage.ini
@@ -12,6 +12,7 @@ omit =
 exclude_lines =
     pragma: no cover
     raise NotImplementedError
+    raise AssertionError
     assert\s
 
 [paths]


=====================================
src/mailman/app/bounces.py
=====================================
--- a/src/mailman/app/bounces.py
+++ b/src/mailman/app/bounces.py
@@ -146,7 +146,7 @@ class _BaseVERPParser:
 
 class StandardVERP(_BaseVERPParser):
     def __init__(self):
-        super(StandardVERP, self).__init__(config.mta.verp_regexp)
+        super().__init__(config.mta.verp_regexp)
 
     def _get_address(self, match_object):
         return '{0}@{1}'.format(*match_object.group('local', 'domain'))
@@ -154,7 +154,7 @@ class StandardVERP(_BaseVERPParser):
 
 class ProbeVERP(_BaseVERPParser):
     def __init__(self):
-        super(ProbeVERP, self).__init__(config.mta.verp_probe_regexp)
+        super().__init__(config.mta.verp_probe_regexp)
 
     def _get_address(self, match_object):
         # Extract the token and get the matching address.


=====================================
src/mailman/app/membership.py
=====================================
--- a/src/mailman/app/membership.py
+++ b/src/mailman/app/membership.py
@@ -79,7 +79,7 @@ def add_member(mlist, record, role=MemberRole.member):
     for address in user.addresses:
         if address.original_email == record.email:
             case_preserved = address
-        if address.email == record.email.lower():
+        if address.email == record.email.lower():   # pragma: no branch
             case_insensitive = address
     assert case_preserved is not None or case_insensitive is not None, (
         'Could not find a linked address for: {}'.format(record.email))


=====================================
src/mailman/app/tests/test_workflow.py
=====================================
--- a/src/mailman/app/tests/test_workflow.py
+++ b/src/mailman/app/tests/test_workflow.py
@@ -122,7 +122,15 @@ class TestWorkflow(unittest.TestCase):
         results = self._workflow.run_thru('second')
         self.assertEqual(results, ['one', 'two'])
 
+    def test_run_thru_completes(self):
+        results = self._workflow.run_thru('all of them')
+        self.assertEqual(results, ['one', 'two', 'three'])
+
     def test_run_until(self):
         # Run until (but not including) the given step.
         results = self._workflow.run_until('second')
         self.assertEqual(results, ['one'])
+
+    def test_run_until_completes(self):
+        results = self._workflow.run_until('all of them')
+        self.assertEqual(results, ['one', 'two', 'three'])


=====================================
src/mailman/app/workflow.py
=====================================
--- a/src/mailman/app/workflow.py
+++ b/src/mailman/app/workflow.py
@@ -63,7 +63,7 @@ class Workflow:
         name = self._next.popleft()
         step = getattr(self, '_step_{}'.format(name))
         self._count += 1
-        if self.debug:
+        if self.debug:                              # pragma: no cover
             print('[{:02d}] -> {}'.format(self._count, name), file=sys.stderr)
         return name, step
 
@@ -151,6 +151,5 @@ class Workflow:
         self._next.clear()
         if state.step:
             self._next.append(state.step)
-        if state.data is not None:
-            for attr, value in json.loads(state.data).items():
-                setattr(self, attr, value)
+        for attr, value in json.loads(state.data).items():
+            setattr(self, attr, value)


=====================================
src/mailman/chains/headers.py
=====================================
--- a/src/mailman/chains/headers.py
+++ b/src/mailman/chains/headers.py
@@ -104,7 +104,7 @@ class HeaderMatchChain(Chain):
     """
 
     def __init__(self):
-        super(HeaderMatchChain, self).__init__(
+        super().__init__(
             'header-match', _('The built-in header matching chain'))
         # This chain will dynamically calculate the links from the
         # configuration file, the database, and any explicitly added header


=====================================
src/mailman/chains/tests/test_accept.py
=====================================
--- /dev/null
+++ b/src/mailman/chains/tests/test_accept.py
@@ -0,0 +1,75 @@
+# Copyright (C) 2016 by the Free Software Foundation, Inc.
+#
+# This file is part of GNU Mailman.
+#
+# GNU Mailman is free software: you can redistribute it and/or modify it under
+# the terms of the GNU General Public License as published by the Free
+# Software Foundation, either version 3 of the License, or (at your option)
+# any later version.
+#
+# GNU Mailman is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
+# more details.
+#
+# You should have received a copy of the GNU General Public License along with
+# GNU Mailman.  If not, see <http://www.gnu.org/licenses/>.
+
+"""Test the accept chain."""
+
+__all__ = [
+    'TestAccept',
+    ]
+
+
+import unittest
+
+from mailman.app.lifecycle import create_list
+from mailman.chains.base import Link
+from mailman.config import config
+from mailman.core.chains import process as process_chain
+from mailman.interfaces.chain import AcceptEvent, IChain, LinkAction
+from mailman.testing.helpers import (
+    event_subscribers, specialized_message_from_string as mfs)
+from mailman.testing.layers import ConfigLayer
+from zope.interface import implementer
+
+
+@implementer(IChain)
+class MyChain:
+    name = 'mine'
+    description = 'A test chain'
+
+    def get_links(self, mlist, msg, msgdata):
+        def set_hits(mlist, msg, msgdata):
+            msgdata['rule_hits'] = ['first', 'second', 'third']
+        yield Link('truth', LinkAction.run, function=set_hits)
+        yield Link('truth', LinkAction.jump, 'accept')
+
+
+
+class TestAccept(unittest.TestCase):
+    """Test the accept chain."""
+
+    layer = ConfigLayer
+
+    def setUp(self):
+        self._mlist = create_list('ant@example.com')
+        self._msg = mfs("""\
+From: anne@example.com
+To: test@example.com
+Subject: Ignore
+
+""")
+
+    def test_rule_hits(self):
+        config.chains['mine'] = MyChain()
+        self.addCleanup(config.chains.pop, 'mine')
+        hits = None
+        def handler(event):
+            nonlocal hits
+            if isinstance(event, AcceptEvent):
+                hits = event.msg['x-mailman-rule-hits']
+        with event_subscribers(handler):
+            process_chain(self._mlist, self._msg, {}, start_chain='mine')
+        self.assertEqual(hits, 'first; second; third')


=====================================
src/mailman/chains/tests/test_reject.py
=====================================
--- a/src/mailman/chains/tests/test_reject.py
+++ b/src/mailman/chains/tests/test_reject.py
@@ -15,7 +15,7 @@
 # You should have received a copy of the GNU General Public License along with
 # GNU Mailman.  If not, see <http://www.gnu.org/licenses/>.
 
-"""Testing the reject chain."""
+"""Test the reject chain."""
 
 __all__ = [
     'TestReject',
@@ -33,7 +33,7 @@ from mailman.testing.layers import ConfigLayer
 
 
 class TestReject(unittest.TestCase):
-    """Test the `mailman.app.bounces.bounce_message()` function."""
+    """Test the reject chain."""
 
     layer = ConfigLayer
 


=====================================
src/mailman/compat/smtpd.py
=====================================
--- a/src/mailman/compat/smtpd.py
+++ b/src/mailman/compat/smtpd.py
@@ -748,7 +748,7 @@ class PureProxy(SMTPServer):
     def __init__(self, *args, **kwargs):
         if 'enable_SMTPUTF8' in kwargs and kwargs['enable_SMTPUTF8']:
             raise ValueError("PureProxy does not support SMTPUTF8.")
-        super(PureProxy, self).__init__(*args, **kwargs)
+        super().__init__(*args, **kwargs)
 
     def process_message(self, peer, mailfrom, rcpttos, data):
         lines = data.split('\n')
@@ -793,7 +793,7 @@ class MailmanProxy(PureProxy):
     def __init__(self, *args, **kwargs):
         if 'enable_SMTPUTF8' in kwargs and kwargs['enable_SMTPUTF8']:
             raise ValueError("MailmanProxy does not support SMTPUTF8.")
-        super(PureProxy, self).__init__(*args, **kwargs)
+        super().__init__(*args, **kwargs)
 
     def process_message(self, peer, mailfrom, rcpttos, data):
         from io import StringIO


=====================================
src/mailman/core/errors.py
=====================================
--- a/src/mailman/core/errors.py
+++ b/src/mailman/core/errors.py
@@ -27,19 +27,10 @@ interfaces.
 
 
 __all__ = [
-    'AlreadyReceivingDigests',
-    'AlreadyReceivingRegularDeliveries',
-    'BadPasswordSchemeError',
-    'CantDigestError',
     'DiscardMessage',
     'HandlerError',
     'HoldMessage',
     'LostHeldMessage',
-    'MailmanError',
-    'MailmanException',
-    'MemberError',
-    'MustDigestError',
-    'PasswordError',
     'RESTError',
     'ReadOnlyPATCHRequestError',
     'RejectMessage',
@@ -101,22 +92,6 @@ class RejectMessage(HandlerError):
 
 
 
-class PasswordError(MailmanError):
-    """A password related error."""
-
-
-class BadPasswordSchemeError(PasswordError):
-    """A bad password scheme was given."""
-
-    def __init__(self, scheme_name='unknown'):
-        super(BadPasswordSchemeError, self).__init__()
-        self.scheme_name = scheme_name
-
-    def __str__(self):
-        return 'A bad password scheme was given: %s' % self.scheme_name
-
-
-
 class RESTError(MailmanError):
     """Base class for REST API errors."""
 


=====================================
src/mailman/database/postgresql.py
=====================================
--- a/src/mailman/database/postgresql.py
+++ b/src/mailman/database/postgresql.py
@@ -37,7 +37,7 @@ class PostgreSQLDatabase(SABaseDatabase):
         Reset the <tablename>_id_seq.last_value so that primary key ids
         restart from zero for new tests.
         """
-        super(PostgreSQLDatabase, self)._post_reset(store)
+        super()._post_reset(store)
         tables = reversed(Model.metadata.sorted_tables)
         # Recipe adapted from
         # http://stackoverflow.com/questions/544791/


=====================================
src/mailman/database/types.py
=====================================
--- a/src/mailman/database/types.py
+++ b/src/mailman/database/types.py
@@ -40,8 +40,8 @@ class Enum(TypeDecorator):
     impl = Integer
 
     def __init__(self, enum, *args, **kw):
+        super().__init__(*args, **kw)
         self.enum = enum
-        super(Enum, self).__init__(*args, **kw)
 
     def process_bind_param(self, value, dialect):
         if value is None:


=====================================
src/mailman/interfaces/address.py
=====================================
--- a/src/mailman/interfaces/address.py
+++ b/src/mailman/interfaces/address.py
@@ -39,7 +39,7 @@ class EmailError(MailmanError):
     """A generic text email address-related error occurred."""
 
     def __init__(self, email):
-        super(EmailError, self).__init__()
+        super().__init__()
         self.email = email
 
     def __str__(self):
@@ -50,7 +50,7 @@ class AddressError(MailmanError):
     """A generic IAddress-related error occurred."""
 
     def __init__(self, address):
-        super(AddressError, self).__init__()
+        super().__init__()
         self.address = address
 
     def __str__(self):


=====================================
src/mailman/interfaces/domain.py
=====================================
--- a/src/mailman/interfaces/domain.py
+++ b/src/mailman/interfaces/domain.py
@@ -37,7 +37,7 @@ class BadDomainSpecificationError(MailmanError):
     """The specification of a virtual domain is invalid or duplicated."""
 
     def __init__(self, domain):
-        super(BadDomainSpecificationError, self).__init__(domain)
+        super().__init__(domain)
         self.domain = domain
 
 


=====================================
src/mailman/interfaces/member.py
=====================================
--- a/src/mailman/interfaces/member.py
+++ b/src/mailman/interfaces/member.py
@@ -109,7 +109,7 @@ class AlreadySubscribedError(MembershipError):
     """The member is already subscribed to the mailing list with this role."""
 
     def __init__(self, fqdn_listname, email, role):
-        super(AlreadySubscribedError, self).__init__()
+        super().__init__()
         self.fqdn_listname = fqdn_listname
         self.email = email
         self.role = role
@@ -136,7 +136,7 @@ class MissingPreferredAddressError(MembershipError):
     """A user without a preferred address attempted to subscribe."""
 
     def __init__(self, user):
-        super(MissingPreferredAddressError, self).__init__()
+        super().__init__()
         self._user = user
 
     def __str__(self):
@@ -147,7 +147,7 @@ class NotAMemberError(MembershipError):
     """The address is not a member of the mailing list."""
 
     def __init__(self, mlist, address):
-        super(NotAMemberError, self).__init__()
+        super().__init__()
         self._mlist = mlist
         self._address = address
 


=====================================
src/mailman/interfaces/mta.py
=====================================
--- a/src/mailman/interfaces/mta.py
+++ b/src/mailman/interfaces/mta.py
@@ -32,7 +32,7 @@ from zope.interface import Interface
 class SomeRecipientsFailed(MailmanError):
     """Delivery to some or all recipients failed"""
     def __init__(self, temporary_failures, permanent_failures):
-        super(SomeRecipientsFailed, self).__init__()
+        super().__init__()
         self.temporary_failures = temporary_failures
         self.permanent_failures = permanent_failures
 


=====================================
src/mailman/model/address.py
=====================================
--- a/src/mailman/model/address.py
+++ b/src/mailman/model/address.py
@@ -55,7 +55,7 @@ class Address(Model):
         'Preferences', backref=backref('address', uselist=False))
 
     def __init__(self, email, display_name):
-        super(Address, self).__init__()
+        super().__init__()
         getUtility(IEmailValidator).validate(email)
         lower_case = email.lower()
         self.email = lower_case


=====================================
src/mailman/model/bans.py
=====================================
--- a/src/mailman/model/bans.py
+++ b/src/mailman/model/bans.py
@@ -43,7 +43,7 @@ class Ban(Model):
     list_id = Column(Unicode, index=True)
 
     def __init__(self, email, list_id):
-        super(Ban, self).__init__()
+        super().__init__()
         self.email = email
         self.list_id = list_id
 


=====================================
src/mailman/model/mailinglist.py
=====================================
--- a/src/mailman/model/mailinglist.py
+++ b/src/mailman/model/mailinglist.py
@@ -190,7 +190,7 @@ class MailingList(Model):
     welcome_message_uri = Column(Unicode)
 
     def __init__(self, fqdn_listname):
-        super(MailingList, self).__init__()
+        super().__init__()
         listname, at, hostname = fqdn_listname.partition('@')
         assert hostname, 'Bad list name: {0}'.format(fqdn_listname)
         self.list_name = listname
@@ -511,7 +511,7 @@ class AcceptableAlias(Model):
     alias = Column(Unicode, index=True, nullable=False)
 
     def __init__(self, mailing_list, alias):
-        super(AcceptableAlias, self).__init__()
+        super().__init__()
         self.mailing_list = mailing_list
         self.alias = alias
 


=====================================
src/mailman/model/message.py
=====================================
--- a/src/mailman/model/message.py
+++ b/src/mailman/model/message.py
@@ -44,7 +44,7 @@ class Message(Model):
 
     @dbconnection
     def __init__(self, store, message_id, message_id_hash, path):
-        super(Message, self).__init__()
+        super().__init__()
         self.message_id = message_id
         self.message_id_hash = message_id_hash
         self.path = path


=====================================
src/mailman/model/requests.py
=====================================
--- a/src/mailman/model/requests.py
+++ b/src/mailman/model/requests.py
@@ -56,7 +56,7 @@ class DataPendable(dict):
                 key = '_pck_' + key
                 value = dumps(value).decode('raw-unicode-escape')
             clean_mapping[key] = value
-        super(DataPendable, self).update(clean_mapping)
+        super().update(clean_mapping)
 
 
 
@@ -159,7 +159,7 @@ class _Request(Model):
     mailing_list = relationship('MailingList')
 
     def __init__(self, key, request_type, mailing_list, data_hash):
-        super(_Request, self).__init__()
+        super().__init__()
         self.key = key
         self.request_type = request_type
         self.mailing_list = mailing_list


=====================================
src/mailman/model/tests/test_mailinglist.py
=====================================
--- a/src/mailman/model/tests/test_mailinglist.py
+++ b/src/mailman/model/tests/test_mailinglist.py
@@ -36,7 +36,7 @@ from mailman.interfaces.mailinglist import (
 from mailman.interfaces.member import (
     AlreadySubscribedError, MemberRole, MissingPreferredAddressError)
 from mailman.interfaces.usermanager import IUserManager
-from mailman.testing.helpers import configuration
+from mailman.testing.helpers import configuration, get_queue_messages
 from mailman.testing.layers import ConfigLayer
 from mailman.utilities.datetime import now
 from zope.component import getUtility
@@ -86,6 +86,23 @@ class TestMailingList(unittest.TestCase):
     def test_subscribe_argument(self):
         self.assertRaises(ValueError, self._mlist.subscribe, 'anne')
 
+    def test_subscribe_by_user_admin_notification(self):
+        # A notification is sent to the administrator with the user's email
+        # address when a user is subscribed instead of an explicit address.
+        self._mlist.send_welcome_message = False
+        self._mlist.admin_notify_mchanges = True
+        manager = getUtility(IUserManager)
+        user = manager.make_user('anne@example.com', 'Anne Person')
+        address = manager.create_address('aperson@example.com', 'A. Person')
+        address.verified_on = now()
+        user.preferred_address = address
+        self._mlist.subscribe(user)
+        # The welcome message was sent to the preferred address.
+        items = get_queue_messages('virgin')
+        self.assertEqual(len(items), 1)
+        self.assertIn('Anne Person <aperson@example.com>',
+                      items[0].msg.get_payload())
+
 
 
 class TestListArchiver(unittest.TestCase):


=====================================
src/mailman/model/user.py
=====================================
--- a/src/mailman/model/user.py
+++ b/src/mailman/model/user.py
@@ -78,7 +78,7 @@ class User(Model):
 
     @dbconnection
     def __init__(self, store, display_name=None, preferences=None):
-        super(User, self).__init__()
+        super().__init__()
         self._created_on = date_factory.now()
         user_id = uid_factory.new()
         assert store.query(User).filter_by(_user_id=user_id).count() == 0, (


=====================================
src/mailman/mta/base.py
=====================================
--- a/src/mailman/mta/base.py
+++ b/src/mailman/mta/base.py
@@ -134,7 +134,7 @@ class IndividualDelivery(BaseDelivery):
 
     def __init__(self):
         """See `BaseDelivery`."""
-        super(IndividualDelivery, self).__init__()
+        super().__init__()
         self.callbacks = []
 
     def deliver(self, mlist, msg, msgdata):


=====================================
src/mailman/mta/bulk.py
=====================================
--- a/src/mailman/mta/bulk.py
+++ b/src/mailman/mta/bulk.py
@@ -50,7 +50,7 @@ class BulkDelivery(BaseDelivery):
             big chunk.
         :type max_recipients: integer
         """
-        super(BulkDelivery, self).__init__()
+        super().__init__()
         self._max_recipients = (max_recipients
                                 if max_recipients is not None
                                 else 0)


=====================================
src/mailman/mta/decorating.py
=====================================
--- a/src/mailman/mta/decorating.py
+++ b/src/mailman/mta/decorating.py
@@ -45,5 +45,5 @@ class DecoratingDelivery(DecoratingMixin, VERPDelivery):
 
     def __init__(self):
         """See `IndividualDelivery`."""
-        super(DecoratingDelivery, self).__init__()
+        super().__init__()
         self.callbacks.append(self.decorate)


=====================================
src/mailman/mta/deliver.py
=====================================
--- a/src/mailman/mta/deliver.py
+++ b/src/mailman/mta/deliver.py
@@ -54,7 +54,7 @@ class Deliver(VERPMixin, DecoratingMixin, PersonalizedMixin,
     """
 
     def __init__(self):
-        super(Deliver, self).__init__()
+        super().__init__()
         self.callbacks.extend([
             self.avoid_duplicates,
             self.decorate,


=====================================
src/mailman/mta/personalized.py
=====================================
--- a/src/mailman/mta/personalized.py
+++ b/src/mailman/mta/personalized.py
@@ -69,5 +69,5 @@ class PersonalizedDelivery(PersonalizedMixin, VERPDelivery):
 
     def __init__(self):
         """See `IndividualDelivery`."""
-        super(PersonalizedDelivery, self).__init__()
+        super().__init__()
         self.callbacks.append(self.personalize_to)


=====================================
src/mailman/mta/verp.py
=====================================
--- a/src/mailman/mta/verp.py
+++ b/src/mailman/mta/verp.py
@@ -53,7 +53,7 @@ class VERPMixin:
         :param msgdata: Additional message metadata for this delivery.
         :type msgdata: dictionary
         """
-        sender = super(VERPMixin, self)._get_sender(mlist, msg, msgdata)
+        sender = super()._get_sender(mlist, msg, msgdata)
         if msgdata.get('verp', False):
             log.debug('VERPing %s', msg.get('message-id'))
             recipient = msgdata['recipient']
@@ -96,5 +96,5 @@ class VERPDelivery(VERPMixin, IndividualDelivery):
 
     def __init__(self):
         """See `IndividualDelivery`."""
-        super(VERPDelivery, self).__init__()
+        super().__init__()
         self.callbacks.append(self.avoid_duplicates)


=====================================
src/mailman/rest/helpers.py
=====================================
--- a/src/mailman/rest/helpers.py
+++ b/src/mailman/rest/helpers.py
@@ -254,12 +254,12 @@ class ChildError:
 
 class BadRequest(ChildError):
     def __init__(self):
-        super(BadRequest, self).__init__(falcon.HTTP_400)
+        super().__init__(falcon.HTTP_400)
 
 
 class NotFound(ChildError):
     def __init__(self):
-        super(NotFound, self).__init__(falcon.HTTP_404)
+        super().__init__(falcon.HTTP_404)
 
 
 def okay(response, body=None):


=====================================
src/mailman/rest/validator.py
=====================================
--- a/src/mailman/rest/validator.py
+++ b/src/mailman/rest/validator.py
@@ -180,4 +180,4 @@ class PatchValidator(Validator):
             if converters[attribute].decoder is None:
                 raise ReadOnlyPATCHRequestError(attribute)
             validationators[attribute] = converters[attribute]
-        super(PatchValidator, self).__init__(**validationators)
+        super().__init__(**validationators)


=====================================
src/mailman/runners/bounce.py
=====================================
--- a/src/mailman/runners/bounce.py
+++ b/src/mailman/runners/bounce.py
@@ -37,7 +37,7 @@ class BounceRunner(Runner):
     """The bounce runner."""
 
     def __init__(self, name, slice=None):
-        super(BounceRunner, self).__init__(name, slice)
+        super().__init__(name, slice)
         self._processor = getUtility(IBounceProcessor)
 
     def _dispose(self, mlist, msg, msgdata):


=====================================
src/mailman/runners/digest.py
=====================================
--- a/src/mailman/runners/digest.py
+++ b/src/mailman/runners/digest.py
@@ -151,7 +151,7 @@ class MIMEDigester(Digester):
     """A MIME digester."""
 
     def __init__(self, mlist, volume, digest_number):
-        super(MIMEDigester, self).__init__(mlist, volume, digest_number)
+        super().__init__(mlist, volume, digest_number)
         masthead = MIMEText(self._masthead.encode(self._charset),
                             _charset=self._charset)
         masthead['Content-Description'] = self._subject
@@ -215,7 +215,7 @@ class RFC1153Digester(Digester):
     """A digester of the format specified by RFC 1153."""
 
     def __init__(self, mlist, volume, digest_number):
-        super(RFC1153Digester, self).__init__(mlist, volume, digest_number)
+        super().__init__(mlist, volume, digest_number)
         self._separator70 = '-' * 70
         self._separator30 = '-' * 30
         self._text = StringIO()


=====================================
src/mailman/runners/lmtp.py
=====================================
--- a/src/mailman/runners/lmtp.py
+++ b/src/mailman/runners/lmtp.py
@@ -171,7 +171,7 @@ class LMTPRunner(Runner, smtpd.SMTPServer):
         qlog.debug('LMTP server listening on %s:%s',
                    localaddr[0], localaddr[1])
         smtpd.SMTPServer.__init__(self, localaddr, remoteaddr=None)
-        super(LMTPRunner, self).__init__(name, slice)
+        super().__init__(name, slice)
 
     def handle_accept(self):
         conn, addr = self.accept()


=====================================
src/mailman/runners/outgoing.py
=====================================
--- a/src/mailman/runners/outgoing.py
+++ b/src/mailman/runners/outgoing.py
@@ -54,7 +54,7 @@ class OutgoingRunner(Runner):
     """The outgoing runner."""
 
     def __init__(self, slice=None, numslices=1):
-        super(OutgoingRunner, self).__init__(slice, numslices)
+        super().__init__(slice, numslices)
         # We look this function up only at startup time.
         self._func = find_name(config.mta.outgoing)
         # This prevents smtp server connection problems from filling up the


=====================================
src/mailman/runners/rest.py
=====================================
--- a/src/mailman/runners/rest.py
+++ b/src/mailman/runners/rest.py
@@ -41,7 +41,7 @@ class RESTRunner(Runner):
 
     def __init__(self, name, slice=None):
         """See `IRunner`."""
-        super(RESTRunner, self).__init__(name, slice)
+        super().__init__(name, slice)
         # Both the REST server and the signal handlers must run in the main
         # thread; the former because of SQLite requirements (objects created
         # in one thread cannot be shared with the other threads), and the
@@ -66,7 +66,7 @@ class RESTRunner(Runner):
         self._server.serve_forever()
 
     def signal_handler(self, signum, frame):
-        super(RESTRunner, self).signal_handler(signum, frame)
+        super().signal_handler(signum, frame)
         if signum in (signal.SIGTERM, signal.SIGINT, signal.SIGUSR1):
             # Set the flag that will terminate the TCPserver loop.
             self._event.set()


=====================================
src/mailman/testing/helpers.py
=====================================
--- a/src/mailman/testing/helpers.py
+++ b/src/mailman/testing/helpers.py
@@ -99,7 +99,7 @@ def make_testable_runner(runner_class, name=None, predicate=None):
         """Stop processing when the queue is empty."""
 
         def __init__(self, *args, **kws):
-            super(EmptyingRunner, self).__init__(*args, **kws)
+            super().__init__(*args, **kws)
             # We know it's an EmptyingRunner, so really we want to see the
             # super class in the log files.
             self.__class__.__name__ = runner_class.__name__
@@ -166,8 +166,7 @@ class TestableMaster(Master):
             until the pass condition is set.
         :type start_check: Callable taking no arguments, returning nothing.
         """
-        super(TestableMaster, self).__init__(
-            restartable=False, config_file=config.filename)
+        super().__init__(restartable=False, config_file=config.filename)
         self.start_check = start_check
         self.event = threading.Event()
         self.thread = threading.Thread(target=self.loop)
@@ -215,7 +214,7 @@ class TestableMaster(Master):
             self.start_check()
         # Let the blocking thread know everything's running.
         self.event.set()
-        super(TestableMaster, self).loop()
+        super().loop()
 
     @property
     def runner_pids(self):



View it on GitLab: https://gitlab.com/mailman/mailman/compare/d063ee4dd4579ca931e36f0761084e4ab7cd0335...802ce668e67f51f904c69fdab2f5565a73c15e8a



[Attachment #5 (text/html)]

<html lang='en'>
<head>
<meta content='text/html; charset=utf-8' http-equiv='Content-Type'>
<title>
GitLab
</title>
</meta>
</head>
<style>
  img {
    max-width: 100%;
    height: auto;
  }
  p.details {
    font-style:italic;
    color:#777
  }
  .footer p {
    font-size:small;
    color:#777
  }
  pre.commit-message {
    white-space: pre-wrap;
  }
  .file-stats a {
    text-decoration: none;
  }
  .file-stats .new-file {
    color: #090;
  }
  .file-stats .deleted-file {
    color: #B00;
  }
</style>
<body>
<div class='content'>
<h3>
Barry Warsaw pushed to branch master
at <a href="https://gitlab.com/mailman/mailman">mailman / Mailman</a>
</h3>
<h4>
Commits:
</h4>
<ul>
<li>
<strong><a href="https://gitlab.com/mailman/mailman/commit/af5df60a98d6264ce0f328f29a00449eb833bded">af5df60a</a></strong>
 <div>
<span>by Barry Warsaw</span>
<i>at 2016-01-25T15:08:43-05:00</i>
</div>
<pre class='commit-message'>Boost coverage.

Also, ignore `raise AssertionError` lines globally.</pre>
</li>
<li>
<strong><a href="https://gitlab.com/mailman/mailman/commit/6c3df8293effb241c58a1c58aa53af29105501ad">6c3df829</a></strong>
 <div>
<span>by Barry Warsaw</span>
<i>at 2016-01-25T15:08:43-05:00</i>
</div>
<pre class='commit-message'>Boost coverage and remove dead code.</pre>
</li>
<li>
<strong><a href="https://gitlab.com/mailman/mailman/commit/e2e962ab7c298f6706ce50f981c2e27a0286c271">e2e962ab</a></strong>
 <div>
<span>by Barry Warsaw</span>
<i>at 2016-01-25T15:08:43-05:00</i>
</div>
<pre class='commit-message'>Full coverage of the accept chain.

Fix some comments.</pre>
</li>
<li>
<strong><a href="https://gitlab.com/mailman/mailman/commit/57a07393e984dbbc356bc05f0c6801ffe1536b47">57a07393</a></strong>
 <div>
<span>by Barry Warsaw</span>
<i>at 2016-01-25T15:24:48-05:00</i>
</div>
<pre class='commit-message'>Use the more convenient API.</pre>
</li>
<li>
<strong><a href="https://gitlab.com/mailman/mailman/commit/802ce668e67f51f904c69fdab2f5565a73c15e8a">802ce668</a></strong>
 <div>
<span>by Barry Warsaw</span>
<i>at 2016-01-26T15:32:19-05:00</i>
</div>
<pre class='commit-message'>Super duper.

 * Python 3-ify super() calls.
 * Remove a bunch of obsolete exception classes.</pre>
</li>
</ul>
<h4>37 changed files:</h4>
<ul>
<li class='file-stats'>
<a href='#diff-0'>
coverage.ini
</a>
</li>
<li class='file-stats'>
<a href='#diff-1'>
src/mailman/app/bounces.py
</a>
</li>
<li class='file-stats'>
<a href='#diff-2'>
src/mailman/app/membership.py
</a>
</li>
<li class='file-stats'>
<a href='#diff-3'>
src/mailman/app/tests/test_workflow.py
</a>
</li>
<li class='file-stats'>
<a href='#diff-4'>
src/mailman/app/workflow.py
</a>
</li>
<li class='file-stats'>
<a href='#diff-5'>
src/mailman/chains/headers.py
</a>
</li>
<li class='file-stats'>
<a href='#diff-6'>
<span class='new-file'>
&#43;
src/mailman/chains/tests/test_accept.py
</span>
</a>
</li>
<li class='file-stats'>
<a href='#diff-7'>
src/mailman/chains/tests/test_reject.py
</a>
</li>
<li class='file-stats'>
<a href='#diff-8'>
src/mailman/compat/smtpd.py
</a>
</li>
<li class='file-stats'>
<a href='#diff-9'>
src/mailman/core/errors.py
</a>
</li>
<li class='file-stats'>
<a href='#diff-10'>
src/mailman/database/postgresql.py
</a>
</li>
<li class='file-stats'>
<a href='#diff-11'>
src/mailman/database/types.py
</a>
</li>
<li class='file-stats'>
<a href='#diff-12'>
src/mailman/interfaces/address.py
</a>
</li>
<li class='file-stats'>
<a href='#diff-13'>
src/mailman/interfaces/domain.py
</a>
</li>
<li class='file-stats'>
<a href='#diff-14'>
src/mailman/interfaces/member.py
</a>
</li>
<li class='file-stats'>
<a href='#diff-15'>
src/mailman/interfaces/mta.py
</a>
</li>
<li class='file-stats'>
<a href='#diff-16'>
src/mailman/model/address.py
</a>
</li>
<li class='file-stats'>
<a href='#diff-17'>
src/mailman/model/bans.py
</a>
</li>
<li class='file-stats'>
<a href='#diff-18'>
src/mailman/model/mailinglist.py
</a>
</li>
<li class='file-stats'>
<a href='#diff-19'>
src/mailman/model/message.py
</a>
</li>
<li class='file-stats'>
<a href='#diff-20'>
src/mailman/model/requests.py
</a>
</li>
<li class='file-stats'>
<a href='#diff-21'>
src/mailman/model/tests/test_mailinglist.py
</a>
</li>
<li class='file-stats'>
<a href='#diff-22'>
src/mailman/model/user.py
</a>
</li>
<li class='file-stats'>
<a href='#diff-23'>
src/mailman/mta/base.py
</a>
</li>
<li class='file-stats'>
<a href='#diff-24'>
src/mailman/mta/bulk.py
</a>
</li>
<li class='file-stats'>
<a href='#diff-25'>
src/mailman/mta/decorating.py
</a>
</li>
<li class='file-stats'>
<a href='#diff-26'>
src/mailman/mta/deliver.py
</a>
</li>
<li class='file-stats'>
<a href='#diff-27'>
src/mailman/mta/personalized.py
</a>
</li>
<li class='file-stats'>
<a href='#diff-28'>
src/mailman/mta/verp.py
</a>
</li>
<li class='file-stats'>
<a href='#diff-29'>
src/mailman/rest/helpers.py
</a>
</li>
<li class='file-stats'>
<a href='#diff-30'>
src/mailman/rest/validator.py
</a>
</li>
<li class='file-stats'>
<a href='#diff-31'>
src/mailman/runners/bounce.py
</a>
</li>
<li class='file-stats'>
<a href='#diff-32'>
src/mailman/runners/digest.py
</a>
</li>
<li class='file-stats'>
<a href='#diff-33'>
src/mailman/runners/lmtp.py
</a>
</li>
<li class='file-stats'>
<a href='#diff-34'>
src/mailman/runners/outgoing.py
</a>
</li>
<li class='file-stats'>
<a href='#diff-35'>
src/mailman/runners/rest.py
</a>
</li>
<li class='file-stats'>
<a href='#diff-36'>
src/mailman/testing/helpers.py
</a>
</li>
</ul>
<h4>Changes:</h4>
<li id='diff-0'>
<a href='https://gitlab.com/mailman/mailman/compare/d063ee4dd4579ca931e36f0761084e4ab7cd0335...802ce668e67f51f904c69fdab2f5565a73c15e8a#diff-0'>
 <strong>
coverage.ini
</strong>
</a>
<hr>
<pre class="highlight"><code><span style="color: #000000;background-color: \
#ffdddd">--- a/coverage.ini </span><span style="color: #000000;background-color: \
#ddffdd">+++ b/coverage.ini </span><span style="color: #aaaaaa">@@ -12,6 +12,7 @@ \
omit = </span> exclude_lines =
     pragma: no cover
     raise NotImplementedError
<span style="color: #000000;background-color: #ddffdd">+    raise AssertionError
</span>     assert\s
 
 [paths]
</code></pre>

<br>
</li>
<li id='diff-1'>
<a href='https://gitlab.com/mailman/mailman/compare/d063ee4dd4579ca931e36f0761084e4ab7cd0335...802ce668e67f51f904c69fdab2f5565a73c15e8a#diff-1'>
 <strong>
src/mailman/app/bounces.py
</strong>
</a>
<hr>
<pre class="highlight"><code><span style="color: #000000;background-color: \
#ffdddd">--- a/src/mailman/app/bounces.py </span><span style="color: \
#000000;background-color: #ddffdd">+++ b/src/mailman/app/bounces.py </span><span \
style="color: #aaaaaa">@@ -146,7 +146,7 @@ class _BaseVERPParser: </span> 
 class StandardVERP(_BaseVERPParser):
     def __init__(self):
<span style="color: #000000;background-color: #ffdddd">-        super(StandardVERP, \
self).__init__(config.mta.verp_regexp) </span><span style="color: \
#000000;background-color: #ddffdd">+        super().__init__(config.mta.verp_regexp) \
</span>   def _get_address(self, match_object):
         return '{0}@{1}'.format(*match_object.group('local', 'domain'))
<span style="color: #aaaaaa">@@ -154,7 +154,7 @@ class StandardVERP(_BaseVERPParser):
</span> 
 class ProbeVERP(_BaseVERPParser):
     def __init__(self):
<span style="color: #000000;background-color: #ffdddd">-        super(ProbeVERP, \
self).__init__(config.mta.verp_probe_regexp) </span><span style="color: \
#000000;background-color: #ddffdd">+        \
super().__init__(config.mta.verp_probe_regexp) </span> 
     def _get_address(self, match_object):
         # Extract the token and get the matching address.
</code></pre>

<br>
</li>
<li id='diff-2'>
<a href='https://gitlab.com/mailman/mailman/compare/d063ee4dd4579ca931e36f0761084e4ab7cd0335...802ce668e67f51f904c69fdab2f5565a73c15e8a#diff-2'>
 <strong>
src/mailman/app/membership.py
</strong>
</a>
<hr>
<pre class="highlight"><code><span style="color: #000000;background-color: \
#ffdddd">--- a/src/mailman/app/membership.py </span><span style="color: \
#000000;background-color: #ddffdd">+++ b/src/mailman/app/membership.py </span><span \
style="color: #aaaaaa">@@ -79,7 +79,7 @@ def add_member(mlist, record, \
role=MemberRole.member): </span>     for address in user.addresses:
         if address.original_email == record.email:
             case_preserved = address
<span style="color: #000000;background-color: #ffdddd">-        if address.email == \
record.email.lower(): </span><span style="color: #000000;background-color: #ddffdd">+ \
if address.email == record.email.lower():   # pragma: no branch </span>             \
case_insensitive = address  assert case_preserved is not None or case_insensitive is \
not None, (  'Could not find a linked address for: {}'.format(record.email))
</code></pre>

<br>
</li>
<li id='diff-3'>
<a href='https://gitlab.com/mailman/mailman/compare/d063ee4dd4579ca931e36f0761084e4ab7cd0335...802ce668e67f51f904c69fdab2f5565a73c15e8a#diff-3'>
 <strong>
src/mailman/app/tests/test_workflow.py
</strong>
</a>
<hr>
<pre class="highlight"><code><span style="color: #000000;background-color: \
#ffdddd">--- a/src/mailman/app/tests/test_workflow.py </span><span style="color: \
#000000;background-color: #ddffdd">+++ b/src/mailman/app/tests/test_workflow.py \
</span><span style="color: #aaaaaa">@@ -122,7 +122,15 @@ class \
TestWorkflow(unittest.TestCase): </span>         results = \
self._workflow.run_thru('second')  self.assertEqual(results, ['one', 'two'])
 
<span style="color: #000000;background-color: #ddffdd">+    def \
test_run_thru_completes(self): +        results = self._workflow.run_thru('all of \
them') +        self.assertEqual(results, ['one', 'two', 'three'])
+
</span>     def test_run_until(self):
         # Run until (but not including) the given step.
         results = self._workflow.run_until('second')
         self.assertEqual(results, ['one'])
<span style="color: #000000;background-color: #ddffdd">+
+    def test_run_until_completes(self):
+        results = self._workflow.run_until('all of them')
+        self.assertEqual(results, ['one', 'two', 'three'])
</span></code></pre>

<br>
</li>
<li id='diff-4'>
<a href='https://gitlab.com/mailman/mailman/compare/d063ee4dd4579ca931e36f0761084e4ab7cd0335...802ce668e67f51f904c69fdab2f5565a73c15e8a#diff-4'>
 <strong>
src/mailman/app/workflow.py
</strong>
</a>
<hr>
<pre class="highlight"><code><span style="color: #000000;background-color: \
#ffdddd">--- a/src/mailman/app/workflow.py </span><span style="color: \
#000000;background-color: #ddffdd">+++ b/src/mailman/app/workflow.py </span><span \
style="color: #aaaaaa">@@ -63,7 +63,7 @@ class Workflow: </span>         name = \
self._next.popleft()  step = getattr(self, '_step_{}'.format(name))
         self._count += 1
<span style="color: #000000;background-color: #ffdddd">-        if self.debug:
</span><span style="color: #000000;background-color: #ddffdd">+        if self.debug: \
# pragma: no cover </span>             print('[{:02d}] -&gt; {}'.format(self._count, \
name), file=sys.stderr)  return name, step
 
<span style="color: #aaaaaa">@@ -151,6 +151,5 @@ class Workflow:
</span>         self._next.clear()
         if state.step:
             self._next.append(state.step)
<span style="color: #000000;background-color: #ffdddd">-        if state.data is not \
                None:
-            for attr, value in json.loads(state.data).items():
-                setattr(self, attr, value)
</span><span style="color: #000000;background-color: #ddffdd">+        for attr, \
value in json.loads(state.data).items(): +            setattr(self, attr, value)
</span></code></pre>

<br>
</li>
<li id='diff-5'>
<a href='https://gitlab.com/mailman/mailman/compare/d063ee4dd4579ca931e36f0761084e4ab7cd0335...802ce668e67f51f904c69fdab2f5565a73c15e8a#diff-5'>
 <strong>
src/mailman/chains/headers.py
</strong>
</a>
<hr>
<pre class="highlight"><code><span style="color: #000000;background-color: \
#ffdddd">--- a/src/mailman/chains/headers.py </span><span style="color: \
#000000;background-color: #ddffdd">+++ b/src/mailman/chains/headers.py </span><span \
style="color: #aaaaaa">@@ -104,7 +104,7 @@ class HeaderMatchChain(Chain): </span>     \
"""  
     def __init__(self):
<span style="color: #000000;background-color: #ffdddd">-        \
super(HeaderMatchChain, self).__init__( </span><span style="color: \
#000000;background-color: #ddffdd">+        super().__init__( </span>             \
'header-match', _('The built-in header matching chain'))  # This chain will \
                dynamically calculate the links from the
         # configuration file, the database, and any explicitly added header
</code></pre>

<br>
</li>
<li id='diff-6'>
<a href='https://gitlab.com/mailman/mailman/compare/d063ee4dd4579ca931e36f0761084e4ab7cd0335...802ce668e67f51f904c69fdab2f5565a73c15e8a#diff-6'>
 <strong>
src/mailman/chains/tests/test_accept.py
</strong>
</a>
<hr>
<pre class="highlight"><code><span style="color: #000000;background-color: \
#ffdddd">--- /dev/null </span><span style="color: #000000;background-color: \
#ddffdd">+++ b/src/mailman/chains/tests/test_accept.py </span><span style="color: \
#aaaaaa">@@ -0,0 +1,75 @@ </span><span style="color: #000000;background-color: \
#ddffdd">+# Copyright (C) 2016 by the Free Software Foundation, Inc. +#
+# This file is part of GNU Mailman.
+#
+# GNU Mailman is free software: you can redistribute it and/or modify it under
+# the terms of the GNU General Public License as published by the Free
+# Software Foundation, either version 3 of the License, or (at your option)
+# any later version.
+#
+# GNU Mailman is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
+# more details.
+#
+# You should have received a copy of the GNU General Public License along with
+# GNU Mailman.  If not, see &lt;http://www.gnu.org/licenses/&gt;.
+
+"""Test the accept chain."""
+
+__all__ = [
+    'TestAccept',
+    ]
+
+
+import unittest
+
+from mailman.app.lifecycle import create_list
+from mailman.chains.base import Link
+from mailman.config import config
+from mailman.core.chains import process as process_chain
+from mailman.interfaces.chain import AcceptEvent, IChain, LinkAction
+from mailman.testing.helpers import (
+    event_subscribers, specialized_message_from_string as mfs)
+from mailman.testing.layers import ConfigLayer
+from zope.interface import implementer
+
+
+@implementer(IChain)
+class MyChain:
+    name = 'mine'
+    description = 'A test chain'
+
+    def get_links(self, mlist, msg, msgdata):
+        def set_hits(mlist, msg, msgdata):
+            msgdata['rule_hits'] = ['first', 'second', 'third']
+        yield Link('truth', LinkAction.run, function=set_hits)
+        yield Link('truth', LinkAction.jump, 'accept')
+
+
+
+class TestAccept(unittest.TestCase):
+    """Test the accept chain."""
+
+    layer = ConfigLayer
+
+    def setUp(self):
+        self._mlist = create_list('ant@example.com')
+        self._msg = mfs("""\
+From: anne@example.com
+To: test@example.com
+Subject: Ignore
+
+""")
+
+    def test_rule_hits(self):
+        config.chains['mine'] = MyChain()
+        self.addCleanup(config.chains.pop, 'mine')
+        hits = None
+        def handler(event):
+            nonlocal hits
+            if isinstance(event, AcceptEvent):
+                hits = event.msg['x-mailman-rule-hits']
+        with event_subscribers(handler):
+            process_chain(self._mlist, self._msg, {}, start_chain='mine')
+        self.assertEqual(hits, 'first; second; third')
</span></code></pre>

<br>
</li>
<li id='diff-7'>
<a href='https://gitlab.com/mailman/mailman/compare/d063ee4dd4579ca931e36f0761084e4ab7cd0335...802ce668e67f51f904c69fdab2f5565a73c15e8a#diff-7'>
 <strong>
src/mailman/chains/tests/test_reject.py
</strong>
</a>
<hr>
<pre class="highlight"><code><span style="color: #000000;background-color: \
#ffdddd">--- a/src/mailman/chains/tests/test_reject.py </span><span style="color: \
#000000;background-color: #ddffdd">+++ b/src/mailman/chains/tests/test_reject.py \
</span><span style="color: #aaaaaa">@@ -15,7 +15,7 @@ </span> # You should have \
received a copy of the GNU General Public License along with  # GNU Mailman.  If not, \
see &lt;http://www.gnu.org/licenses/&gt;.  
<span style="color: #000000;background-color: #ffdddd">-"""Testing the reject \
chain.""" </span><span style="color: #000000;background-color: #ddffdd">+"""Test the \
reject chain.""" </span> 
 __all__ = [
     'TestReject',
<span style="color: #aaaaaa">@@ -33,7 +33,7 @@ from mailman.testing.layers import \
ConfigLayer </span> 
 
 class TestReject(unittest.TestCase):
<span style="color: #000000;background-color: #ffdddd">-    """Test the \
`mailman.app.bounces.bounce_message()` function.""" </span><span style="color: \
#000000;background-color: #ddffdd">+    """Test the reject chain.""" </span> 
     layer = ConfigLayer
 
</code></pre>

<br>
</li>
<li id='diff-8'>
<a href='https://gitlab.com/mailman/mailman/compare/d063ee4dd4579ca931e36f0761084e4ab7cd0335...802ce668e67f51f904c69fdab2f5565a73c15e8a#diff-8'>
 <strong>
src/mailman/compat/smtpd.py
</strong>
</a>
<hr>
<pre class="highlight"><code><span style="color: #000000;background-color: \
#ffdddd">--- a/src/mailman/compat/smtpd.py </span><span style="color: \
#000000;background-color: #ddffdd">+++ b/src/mailman/compat/smtpd.py </span><span \
style="color: #aaaaaa">@@ -748,7 +748,7 @@ class PureProxy(SMTPServer): </span>     \
def __init__(self, *args, **kwargs):  if 'enable_SMTPUTF8' in kwargs and \
kwargs['enable_SMTPUTF8']:  raise ValueError("PureProxy does not support SMTPUTF8.")
<span style="color: #000000;background-color: #ffdddd">-        super(PureProxy, \
self).__init__(*args, **kwargs) </span><span style="color: #000000;background-color: \
#ddffdd">+        super().__init__(*args, **kwargs) </span> 
     def process_message(self, peer, mailfrom, rcpttos, data):
         lines = data.split('\n')
<span style="color: #aaaaaa">@@ -793,7 +793,7 @@ class MailmanProxy(PureProxy):
</span>     def __init__(self, *args, **kwargs):
         if 'enable_SMTPUTF8' in kwargs and kwargs['enable_SMTPUTF8']:
             raise ValueError("MailmanProxy does not support SMTPUTF8.")
<span style="color: #000000;background-color: #ffdddd">-        super(PureProxy, \
self).__init__(*args, **kwargs) </span><span style="color: #000000;background-color: \
#ddffdd">+        super().__init__(*args, **kwargs) </span> 
     def process_message(self, peer, mailfrom, rcpttos, data):
         from io import StringIO
</code></pre>

<br>
</li>
<li id='diff-9'>
<a href='https://gitlab.com/mailman/mailman/compare/d063ee4dd4579ca931e36f0761084e4ab7cd0335...802ce668e67f51f904c69fdab2f5565a73c15e8a#diff-9'>
 <strong>
src/mailman/core/errors.py
</strong>
</a>
<hr>
<pre class="highlight"><code><span style="color: #000000;background-color: \
#ffdddd">--- a/src/mailman/core/errors.py </span><span style="color: \
#000000;background-color: #ddffdd">+++ b/src/mailman/core/errors.py </span><span \
style="color: #aaaaaa">@@ -27,19 +27,10 @@ interfaces. </span> 
 
 __all__ = [
<span style="color: #000000;background-color: #ffdddd">-    \
                'AlreadyReceivingDigests',
-    'AlreadyReceivingRegularDeliveries',
-    'BadPasswordSchemeError',
-    'CantDigestError',
</span>     'DiscardMessage',
     'HandlerError',
     'HoldMessage',
     'LostHeldMessage',
<span style="color: #000000;background-color: #ffdddd">-    'MailmanError',
-    'MailmanException',
-    'MemberError',
-    'MustDigestError',
-    'PasswordError',
</span>     'RESTError',
     'ReadOnlyPATCHRequestError',
     'RejectMessage',
<span style="color: #aaaaaa">@@ -101,22 +92,6 @@ class RejectMessage(HandlerError):
</span> 
 
 
<span style="color: #000000;background-color: #ffdddd">-class \
                PasswordError(MailmanError):
-    """A password related error."""
-
-
-class BadPasswordSchemeError(PasswordError):
-    """A bad password scheme was given."""
-
-    def __init__(self, scheme_name='unknown'):
-        super(BadPasswordSchemeError, self).__init__()
-        self.scheme_name = scheme_name
-
-    def __str__(self):
-        return 'A bad password scheme was given: %s' % self.scheme_name
-
-
-
</span> class RESTError(MailmanError):
     """Base class for REST API errors."""
 
</code></pre>

<br>
</li>
<li id='diff-10'>
<a href='https://gitlab.com/mailman/mailman/compare/d063ee4dd4579ca931e36f0761084e4ab7cd0335...802ce668e67f51f904c69fdab2f5565a73c15e8a#diff-10'>
 <strong>
src/mailman/database/postgresql.py
</strong>
</a>
<hr>
<pre class="highlight"><code><span style="color: #000000;background-color: \
#ffdddd">--- a/src/mailman/database/postgresql.py </span><span style="color: \
#000000;background-color: #ddffdd">+++ b/src/mailman/database/postgresql.py \
</span><span style="color: #aaaaaa">@@ -37,7 +37,7 @@ class \
PostgreSQLDatabase(SABaseDatabase): </span>         Reset the \
&lt;tablename&gt;_id_seq.last_value so that primary key ids  restart from zero for \
new tests.  """
<span style="color: #000000;background-color: #ffdddd">-        \
super(PostgreSQLDatabase, self)._post_reset(store) </span><span style="color: \
#000000;background-color: #ddffdd">+        super()._post_reset(store) </span>        \
tables = reversed(Model.metadata.sorted_tables)  # Recipe adapted from
         # http://stackoverflow.com/questions/544791/
</code></pre>

<br>
</li>
<li id='diff-11'>
<a href='https://gitlab.com/mailman/mailman/compare/d063ee4dd4579ca931e36f0761084e4ab7cd0335...802ce668e67f51f904c69fdab2f5565a73c15e8a#diff-11'>
 <strong>
src/mailman/database/types.py
</strong>
</a>
<hr>
<pre class="highlight"><code><span style="color: #000000;background-color: \
#ffdddd">--- a/src/mailman/database/types.py </span><span style="color: \
#000000;background-color: #ddffdd">+++ b/src/mailman/database/types.py </span><span \
style="color: #aaaaaa">@@ -40,8 +40,8 @@ class Enum(TypeDecorator): </span>     impl \
= Integer  
     def __init__(self, enum, *args, **kw):
<span style="color: #000000;background-color: #ddffdd">+        \
super().__init__(*args, **kw) </span>         self.enum = enum
<span style="color: #000000;background-color: #ffdddd">-        super(Enum, \
self).__init__(*args, **kw) </span> 
     def process_bind_param(self, value, dialect):
         if value is None:
</code></pre>

<br>
</li>
<li id='diff-12'>
<a href='https://gitlab.com/mailman/mailman/compare/d063ee4dd4579ca931e36f0761084e4ab7cd0335...802ce668e67f51f904c69fdab2f5565a73c15e8a#diff-12'>
 <strong>
src/mailman/interfaces/address.py
</strong>
</a>
<hr>
<pre class="highlight"><code><span style="color: #000000;background-color: \
#ffdddd">--- a/src/mailman/interfaces/address.py </span><span style="color: \
#000000;background-color: #ddffdd">+++ b/src/mailman/interfaces/address.py \
</span><span style="color: #aaaaaa">@@ -39,7 +39,7 @@ class EmailError(MailmanError): \
</span>     """A generic text email address-related error occurred."""  
     def __init__(self, email):
<span style="color: #000000;background-color: #ffdddd">-        super(EmailError, \
self).__init__() </span><span style="color: #000000;background-color: #ddffdd">+      \
super().__init__() </span>         self.email = email
 
     def __str__(self):
<span style="color: #aaaaaa">@@ -50,7 +50,7 @@ class AddressError(MailmanError):
</span>     """A generic IAddress-related error occurred."""
 
     def __init__(self, address):
<span style="color: #000000;background-color: #ffdddd">-        super(AddressError, \
self).__init__() </span><span style="color: #000000;background-color: #ddffdd">+      \
super().__init__() </span>         self.address = address
 
     def __str__(self):
</code></pre>

<br>
</li>
<li id='diff-13'>
<a href='https://gitlab.com/mailman/mailman/compare/d063ee4dd4579ca931e36f0761084e4ab7cd0335...802ce668e67f51f904c69fdab2f5565a73c15e8a#diff-13'>
 <strong>
src/mailman/interfaces/domain.py
</strong>
</a>
<hr>
<pre class="highlight"><code><span style="color: #000000;background-color: \
#ffdddd">--- a/src/mailman/interfaces/domain.py </span><span style="color: \
#000000;background-color: #ddffdd">+++ b/src/mailman/interfaces/domain.py \
</span><span style="color: #aaaaaa">@@ -37,7 +37,7 @@ class \
BadDomainSpecificationError(MailmanError): </span>     """The specification of a \
virtual domain is invalid or duplicated."""  
     def __init__(self, domain):
<span style="color: #000000;background-color: #ffdddd">-        \
super(BadDomainSpecificationError, self).__init__(domain) </span><span style="color: \
#000000;background-color: #ddffdd">+        super().__init__(domain) </span>         \
self.domain = domain  
 
</code></pre>

<br>
</li>
<li id='diff-14'>
<a href='https://gitlab.com/mailman/mailman/compare/d063ee4dd4579ca931e36f0761084e4ab7cd0335...802ce668e67f51f904c69fdab2f5565a73c15e8a#diff-14'>
 <strong>
src/mailman/interfaces/member.py
</strong>
</a>
<hr>
<pre class="highlight"><code><span style="color: #000000;background-color: \
#ffdddd">--- a/src/mailman/interfaces/member.py </span><span style="color: \
#000000;background-color: #ddffdd">+++ b/src/mailman/interfaces/member.py \
</span><span style="color: #aaaaaa">@@ -109,7 +109,7 @@ class \
AlreadySubscribedError(MembershipError): </span>     """The member is already \
subscribed to the mailing list with this role."""  
     def __init__(self, fqdn_listname, email, role):
<span style="color: #000000;background-color: #ffdddd">-        \
super(AlreadySubscribedError, self).__init__() </span><span style="color: \
#000000;background-color: #ddffdd">+        super().__init__() </span>         \
self.fqdn_listname = fqdn_listname  self.email = email
         self.role = role
<span style="color: #aaaaaa">@@ -136,7 +136,7 @@ class \
MissingPreferredAddressError(MembershipError): </span>     """A user without a \
preferred address attempted to subscribe."""  
     def __init__(self, user):
<span style="color: #000000;background-color: #ffdddd">-        \
super(MissingPreferredAddressError, self).__init__() </span><span style="color: \
#000000;background-color: #ddffdd">+        super().__init__() </span>         \
self._user = user  
     def __str__(self):
<span style="color: #aaaaaa">@@ -147,7 +147,7 @@ class \
NotAMemberError(MembershipError): </span>     """The address is not a member of the \
mailing list."""  
     def __init__(self, mlist, address):
<span style="color: #000000;background-color: #ffdddd">-        \
super(NotAMemberError, self).__init__() </span><span style="color: \
#000000;background-color: #ddffdd">+        super().__init__() </span>         \
self._mlist = mlist  self._address = address
 
</code></pre>

<br>
</li>
<li id='diff-15'>
<a href='https://gitlab.com/mailman/mailman/compare/d063ee4dd4579ca931e36f0761084e4ab7cd0335...802ce668e67f51f904c69fdab2f5565a73c15e8a#diff-15'>
 <strong>
src/mailman/interfaces/mta.py
</strong>
</a>
<hr>
<pre class="highlight"><code><span style="color: #000000;background-color: \
#ffdddd">--- a/src/mailman/interfaces/mta.py </span><span style="color: \
#000000;background-color: #ddffdd">+++ b/src/mailman/interfaces/mta.py </span><span \
style="color: #aaaaaa">@@ -32,7 +32,7 @@ from zope.interface import Interface </span> \
class SomeRecipientsFailed(MailmanError):  """Delivery to some or all recipients \
failed"""  def __init__(self, temporary_failures, permanent_failures):
<span style="color: #000000;background-color: #ffdddd">-        \
super(SomeRecipientsFailed, self).__init__() </span><span style="color: \
#000000;background-color: #ddffdd">+        super().__init__() </span>         \
self.temporary_failures = temporary_failures  self.permanent_failures = \
permanent_failures  
</code></pre>

<br>
</li>
<li id='diff-16'>
<a href='https://gitlab.com/mailman/mailman/compare/d063ee4dd4579ca931e36f0761084e4ab7cd0335...802ce668e67f51f904c69fdab2f5565a73c15e8a#diff-16'>
 <strong>
src/mailman/model/address.py
</strong>
</a>
<hr>
<pre class="highlight"><code><span style="color: #000000;background-color: \
#ffdddd">--- a/src/mailman/model/address.py </span><span style="color: \
#000000;background-color: #ddffdd">+++ b/src/mailman/model/address.py </span><span \
style="color: #aaaaaa">@@ -55,7 +55,7 @@ class Address(Model): </span>         \
'Preferences', backref=backref('address', uselist=False))  
     def __init__(self, email, display_name):
<span style="color: #000000;background-color: #ffdddd">-        super(Address, \
self).__init__() </span><span style="color: #000000;background-color: #ddffdd">+      \
super().__init__() </span>         getUtility(IEmailValidator).validate(email)
         lower_case = email.lower()
         self.email = lower_case
</code></pre>

<br>
</li>
<li id='diff-17'>
<a href='https://gitlab.com/mailman/mailman/compare/d063ee4dd4579ca931e36f0761084e4ab7cd0335...802ce668e67f51f904c69fdab2f5565a73c15e8a#diff-17'>
 <strong>
src/mailman/model/bans.py
</strong>
</a>
<hr>
<pre class="highlight"><code><span style="color: #000000;background-color: \
#ffdddd">--- a/src/mailman/model/bans.py </span><span style="color: \
#000000;background-color: #ddffdd">+++ b/src/mailman/model/bans.py </span><span \
style="color: #aaaaaa">@@ -43,7 +43,7 @@ class Ban(Model): </span>     list_id = \
Column(Unicode, index=True)  
     def __init__(self, email, list_id):
<span style="color: #000000;background-color: #ffdddd">-        super(Ban, \
self).__init__() </span><span style="color: #000000;background-color: #ddffdd">+      \
super().__init__() </span>         self.email = email
         self.list_id = list_id
 
</code></pre>

<br>
</li>
<li id='diff-18'>
<a href='https://gitlab.com/mailman/mailman/compare/d063ee4dd4579ca931e36f0761084e4ab7cd0335...802ce668e67f51f904c69fdab2f5565a73c15e8a#diff-18'>
 <strong>
src/mailman/model/mailinglist.py
</strong>
</a>
<hr>
<pre class="highlight"><code><span style="color: #000000;background-color: \
#ffdddd">--- a/src/mailman/model/mailinglist.py </span><span style="color: \
#000000;background-color: #ddffdd">+++ b/src/mailman/model/mailinglist.py \
</span><span style="color: #aaaaaa">@@ -190,7 +190,7 @@ class MailingList(Model): \
</span>     welcome_message_uri = Column(Unicode)  
     def __init__(self, fqdn_listname):
<span style="color: #000000;background-color: #ffdddd">-        super(MailingList, \
self).__init__() </span><span style="color: #000000;background-color: #ddffdd">+      \
super().__init__() </span>         listname, at, hostname = \
fqdn_listname.partition('@')  assert hostname, 'Bad list name: \
{0}'.format(fqdn_listname)  self.list_name = listname
<span style="color: #aaaaaa">@@ -511,7 +511,7 @@ class AcceptableAlias(Model):
</span>     alias = Column(Unicode, index=True, nullable=False)
 
     def __init__(self, mailing_list, alias):
<span style="color: #000000;background-color: #ffdddd">-        \
super(AcceptableAlias, self).__init__() </span><span style="color: \
#000000;background-color: #ddffdd">+        super().__init__() </span>         \
self.mailing_list = mailing_list  self.alias = alias
 
</code></pre>

<br>
</li>
<li id='diff-19'>
<a href='https://gitlab.com/mailman/mailman/compare/d063ee4dd4579ca931e36f0761084e4ab7cd0335...802ce668e67f51f904c69fdab2f5565a73c15e8a#diff-19'>
 <strong>
src/mailman/model/message.py
</strong>
</a>
<hr>
<pre class="highlight"><code><span style="color: #000000;background-color: \
#ffdddd">--- a/src/mailman/model/message.py </span><span style="color: \
#000000;background-color: #ddffdd">+++ b/src/mailman/model/message.py </span><span \
style="color: #aaaaaa">@@ -44,7 +44,7 @@ class Message(Model): </span> 
     @dbconnection
     def __init__(self, store, message_id, message_id_hash, path):
<span style="color: #000000;background-color: #ffdddd">-        super(Message, \
self).__init__() </span><span style="color: #000000;background-color: #ddffdd">+      \
super().__init__() </span>         self.message_id = message_id
         self.message_id_hash = message_id_hash
         self.path = path
</code></pre>

<br>
</li>
<li id='diff-20'>
<a href='https://gitlab.com/mailman/mailman/compare/d063ee4dd4579ca931e36f0761084e4ab7cd0335...802ce668e67f51f904c69fdab2f5565a73c15e8a#diff-20'>
 <strong>
src/mailman/model/requests.py
</strong>
</a>
<hr>
<pre class="highlight"><code><span style="color: #000000;background-color: \
#ffdddd">--- a/src/mailman/model/requests.py </span><span style="color: \
#000000;background-color: #ddffdd">+++ b/src/mailman/model/requests.py </span><span \
style="color: #aaaaaa">@@ -56,7 +56,7 @@ class DataPendable(dict): </span>            \
key = '_pck_' + key  value = dumps(value).decode('raw-unicode-escape')
             clean_mapping[key] = value
<span style="color: #000000;background-color: #ffdddd">-        super(DataPendable, \
self).update(clean_mapping) </span><span style="color: #000000;background-color: \
#ddffdd">+        super().update(clean_mapping) </span> 
 
 
<span style="color: #aaaaaa">@@ -159,7 +159,7 @@ class _Request(Model):
</span>     mailing_list = relationship('MailingList')
 
     def __init__(self, key, request_type, mailing_list, data_hash):
<span style="color: #000000;background-color: #ffdddd">-        super(_Request, \
self).__init__() </span><span style="color: #000000;background-color: #ddffdd">+      \
super().__init__() </span>         self.key = key
         self.request_type = request_type
         self.mailing_list = mailing_list
</code></pre>

<br>
</li>
<li id='diff-21'>
<a href='https://gitlab.com/mailman/mailman/compare/d063ee4dd4579ca931e36f0761084e4ab7cd0335...802ce668e67f51f904c69fdab2f5565a73c15e8a#diff-21'>
 <strong>
src/mailman/model/tests/test_mailinglist.py
</strong>
</a>
<hr>
<pre class="highlight"><code><span style="color: #000000;background-color: \
#ffdddd">--- a/src/mailman/model/tests/test_mailinglist.py </span><span style="color: \
#000000;background-color: #ddffdd">+++ b/src/mailman/model/tests/test_mailinglist.py \
</span><span style="color: #aaaaaa">@@ -36,7 +36,7 @@ from \
mailman.interfaces.mailinglist import ( </span> from mailman.interfaces.member import \
(  AlreadySubscribedError, MemberRole, MissingPreferredAddressError)
 from mailman.interfaces.usermanager import IUserManager
<span style="color: #000000;background-color: #ffdddd">-from mailman.testing.helpers \
import configuration </span><span style="color: #000000;background-color: \
#ddffdd">+from mailman.testing.helpers import configuration, get_queue_messages \
</span> from mailman.testing.layers import ConfigLayer  from \
mailman.utilities.datetime import now  from zope.component import getUtility
<span style="color: #aaaaaa">@@ -86,6 +86,23 @@ class \
TestMailingList(unittest.TestCase): </span>     def test_subscribe_argument(self):
         self.assertRaises(ValueError, self._mlist.subscribe, 'anne')
 
<span style="color: #000000;background-color: #ddffdd">+    def \
test_subscribe_by_user_admin_notification(self): +        # A notification is sent to \
the administrator with the user's email +        # address when a user is subscribed \
instead of an explicit address. +        self._mlist.send_welcome_message = False
+        self._mlist.admin_notify_mchanges = True
+        manager = getUtility(IUserManager)
+        user = manager.make_user('anne@example.com', 'Anne Person')
+        address = manager.create_address('aperson@example.com', 'A. Person')
+        address.verified_on = now()
+        user.preferred_address = address
+        self._mlist.subscribe(user)
+        # The welcome message was sent to the preferred address.
+        items = get_queue_messages('virgin')
+        self.assertEqual(len(items), 1)
+        self.assertIn('Anne Person &lt;aperson@example.com&gt;',
+                      items[0].msg.get_payload())
+
</span> 
 
 class TestListArchiver(unittest.TestCase):
</code></pre>

<br>
</li>
<li id='diff-22'>
<a href='https://gitlab.com/mailman/mailman/compare/d063ee4dd4579ca931e36f0761084e4ab7cd0335...802ce668e67f51f904c69fdab2f5565a73c15e8a#diff-22'>
 <strong>
src/mailman/model/user.py
</strong>
</a>
<hr>
<pre class="highlight"><code><span style="color: #000000;background-color: \
#ffdddd">--- a/src/mailman/model/user.py </span><span style="color: \
#000000;background-color: #ddffdd">+++ b/src/mailman/model/user.py </span><span \
style="color: #aaaaaa">@@ -78,7 +78,7 @@ class User(Model): </span> 
     @dbconnection
     def __init__(self, store, display_name=None, preferences=None):
<span style="color: #000000;background-color: #ffdddd">-        super(User, \
self).__init__() </span><span style="color: #000000;background-color: #ddffdd">+      \
super().__init__() </span>         self._created_on = date_factory.now()
         user_id = uid_factory.new()
         assert store.query(User).filter_by(_user_id=user_id).count() == 0, (
</code></pre>

<br>
</li>
<li id='diff-23'>
<a href='https://gitlab.com/mailman/mailman/compare/d063ee4dd4579ca931e36f0761084e4ab7cd0335...802ce668e67f51f904c69fdab2f5565a73c15e8a#diff-23'>
 <strong>
src/mailman/mta/base.py
</strong>
</a>
<hr>
<pre class="highlight"><code><span style="color: #000000;background-color: \
#ffdddd">--- a/src/mailman/mta/base.py </span><span style="color: \
#000000;background-color: #ddffdd">+++ b/src/mailman/mta/base.py </span><span \
style="color: #aaaaaa">@@ -134,7 +134,7 @@ class IndividualDelivery(BaseDelivery): \
</span>   def __init__(self):
         """See `BaseDelivery`."""
<span style="color: #000000;background-color: #ffdddd">-        \
super(IndividualDelivery, self).__init__() </span><span style="color: \
#000000;background-color: #ddffdd">+        super().__init__() </span>         \
self.callbacks = []  
     def deliver(self, mlist, msg, msgdata):
</code></pre>

<br>
</li>
<li id='diff-24'>
<a href='https://gitlab.com/mailman/mailman/compare/d063ee4dd4579ca931e36f0761084e4ab7cd0335...802ce668e67f51f904c69fdab2f5565a73c15e8a#diff-24'>
 <strong>
src/mailman/mta/bulk.py
</strong>
</a>
<hr>
<pre class="highlight"><code><span style="color: #000000;background-color: \
#ffdddd">--- a/src/mailman/mta/bulk.py </span><span style="color: \
#000000;background-color: #ddffdd">+++ b/src/mailman/mta/bulk.py </span><span \
style="color: #aaaaaa">@@ -50,7 +50,7 @@ class BulkDelivery(BaseDelivery): </span>    \
big chunk.  :type max_recipients: integer
         """
<span style="color: #000000;background-color: #ffdddd">-        super(BulkDelivery, \
self).__init__() </span><span style="color: #000000;background-color: #ddffdd">+      \
super().__init__() </span>         self._max_recipients = (max_recipients
                                 if max_recipients is not None
                                 else 0)
</code></pre>

<br>
</li>
<li id='diff-25'>
<a href='https://gitlab.com/mailman/mailman/compare/d063ee4dd4579ca931e36f0761084e4ab7cd0335...802ce668e67f51f904c69fdab2f5565a73c15e8a#diff-25'>
 <strong>
src/mailman/mta/decorating.py
</strong>
</a>
<hr>
<pre class="highlight"><code><span style="color: #000000;background-color: \
#ffdddd">--- a/src/mailman/mta/decorating.py </span><span style="color: \
#000000;background-color: #ddffdd">+++ b/src/mailman/mta/decorating.py </span><span \
style="color: #aaaaaa">@@ -45,5 +45,5 @@ class DecoratingDelivery(DecoratingMixin, \
VERPDelivery): </span> 
     def __init__(self):
         """See `IndividualDelivery`."""
<span style="color: #000000;background-color: #ffdddd">-        \
super(DecoratingDelivery, self).__init__() </span><span style="color: \
#000000;background-color: #ddffdd">+        super().__init__() </span>         \
self.callbacks.append(self.decorate) </code></pre>

<br>
</li>
<li id='diff-26'>
<a href='https://gitlab.com/mailman/mailman/compare/d063ee4dd4579ca931e36f0761084e4ab7cd0335...802ce668e67f51f904c69fdab2f5565a73c15e8a#diff-26'>
 <strong>
src/mailman/mta/deliver.py
</strong>
</a>
<hr>
<pre class="highlight"><code><span style="color: #000000;background-color: \
#ffdddd">--- a/src/mailman/mta/deliver.py </span><span style="color: \
#000000;background-color: #ddffdd">+++ b/src/mailman/mta/deliver.py </span><span \
style="color: #aaaaaa">@@ -54,7 +54,7 @@ class Deliver(VERPMixin, DecoratingMixin, \
PersonalizedMixin, </span>     """
 
     def __init__(self):
<span style="color: #000000;background-color: #ffdddd">-        super(Deliver, \
self).__init__() </span><span style="color: #000000;background-color: #ddffdd">+      \
super().__init__() </span>         self.callbacks.extend([
             self.avoid_duplicates,
             self.decorate,
</code></pre>

<br>
</li>
<li id='diff-27'>
<a href='https://gitlab.com/mailman/mailman/compare/d063ee4dd4579ca931e36f0761084e4ab7cd0335...802ce668e67f51f904c69fdab2f5565a73c15e8a#diff-27'>
 <strong>
src/mailman/mta/personalized.py
</strong>
</a>
<hr>
<pre class="highlight"><code><span style="color: #000000;background-color: \
#ffdddd">--- a/src/mailman/mta/personalized.py </span><span style="color: \
#000000;background-color: #ddffdd">+++ b/src/mailman/mta/personalized.py </span><span \
style="color: #aaaaaa">@@ -69,5 +69,5 @@ class \
PersonalizedDelivery(PersonalizedMixin, VERPDelivery): </span> 
     def __init__(self):
         """See `IndividualDelivery`."""
<span style="color: #000000;background-color: #ffdddd">-        \
super(PersonalizedDelivery, self).__init__() </span><span style="color: \
#000000;background-color: #ddffdd">+        super().__init__() </span>         \
self.callbacks.append(self.personalize_to) </code></pre>

<br>
</li>
<li id='diff-28'>
<a href='https://gitlab.com/mailman/mailman/compare/d063ee4dd4579ca931e36f0761084e4ab7cd0335...802ce668e67f51f904c69fdab2f5565a73c15e8a#diff-28'>
 <strong>
src/mailman/mta/verp.py
</strong>
</a>
<hr>
<pre class="highlight"><code><span style="color: #000000;background-color: \
#ffdddd">--- a/src/mailman/mta/verp.py </span><span style="color: \
#000000;background-color: #ddffdd">+++ b/src/mailman/mta/verp.py </span><span \
style="color: #aaaaaa">@@ -53,7 +53,7 @@ class VERPMixin: </span>         :param \
msgdata: Additional message metadata for this delivery.  :type msgdata: dictionary
         """
<span style="color: #000000;background-color: #ffdddd">-        sender = \
super(VERPMixin, self)._get_sender(mlist, msg, msgdata) </span><span style="color: \
#000000;background-color: #ddffdd">+        sender = super()._get_sender(mlist, msg, \
msgdata) </span>         if msgdata.get('verp', False):
             log.debug('VERPing %s', msg.get('message-id'))
             recipient = msgdata['recipient']
<span style="color: #aaaaaa">@@ -96,5 +96,5 @@ class VERPDelivery(VERPMixin, \
IndividualDelivery): </span> 
     def __init__(self):
         """See `IndividualDelivery`."""
<span style="color: #000000;background-color: #ffdddd">-        super(VERPDelivery, \
self).__init__() </span><span style="color: #000000;background-color: #ddffdd">+      \
super().__init__() </span>         self.callbacks.append(self.avoid_duplicates)
</code></pre>

<br>
</li>
<li id='diff-29'>
<a href='https://gitlab.com/mailman/mailman/compare/d063ee4dd4579ca931e36f0761084e4ab7cd0335...802ce668e67f51f904c69fdab2f5565a73c15e8a#diff-29'>
 <strong>
src/mailman/rest/helpers.py
</strong>
</a>
<hr>
<pre class="highlight"><code><span style="color: #000000;background-color: \
#ffdddd">--- a/src/mailman/rest/helpers.py </span><span style="color: \
#000000;background-color: #ddffdd">+++ b/src/mailman/rest/helpers.py </span><span \
style="color: #aaaaaa">@@ -254,12 +254,12 @@ class ChildError: </span> 
 class BadRequest(ChildError):
     def __init__(self):
<span style="color: #000000;background-color: #ffdddd">-        super(BadRequest, \
self).__init__(falcon.HTTP_400) </span><span style="color: #000000;background-color: \
#ddffdd">+        super().__init__(falcon.HTTP_400) </span> 
 
 class NotFound(ChildError):
     def __init__(self):
<span style="color: #000000;background-color: #ffdddd">-        super(NotFound, \
self).__init__(falcon.HTTP_404) </span><span style="color: #000000;background-color: \
#ddffdd">+        super().__init__(falcon.HTTP_404) </span> 
 
 def okay(response, body=None):
</code></pre>

<br>
</li>
<li id='diff-30'>
<a href='https://gitlab.com/mailman/mailman/compare/d063ee4dd4579ca931e36f0761084e4ab7cd0335...802ce668e67f51f904c69fdab2f5565a73c15e8a#diff-30'>
 <strong>
src/mailman/rest/validator.py
</strong>
</a>
<hr>
<pre class="highlight"><code><span style="color: #000000;background-color: \
#ffdddd">--- a/src/mailman/rest/validator.py </span><span style="color: \
#000000;background-color: #ddffdd">+++ b/src/mailman/rest/validator.py </span><span \
style="color: #aaaaaa">@@ -180,4 +180,4 @@ class PatchValidator(Validator): </span>   \
if converters[attribute].decoder is None:  raise ReadOnlyPATCHRequestError(attribute)
             validationators[attribute] = converters[attribute]
<span style="color: #000000;background-color: #ffdddd">-        super(PatchValidator, \
self).__init__(**validationators) </span><span style="color: \
#000000;background-color: #ddffdd">+        super().__init__(**validationators) \
</span></code></pre>

<br>
</li>
<li id='diff-31'>
<a href='https://gitlab.com/mailman/mailman/compare/d063ee4dd4579ca931e36f0761084e4ab7cd0335...802ce668e67f51f904c69fdab2f5565a73c15e8a#diff-31'>
 <strong>
src/mailman/runners/bounce.py
</strong>
</a>
<hr>
<pre class="highlight"><code><span style="color: #000000;background-color: \
#ffdddd">--- a/src/mailman/runners/bounce.py </span><span style="color: \
#000000;background-color: #ddffdd">+++ b/src/mailman/runners/bounce.py </span><span \
style="color: #aaaaaa">@@ -37,7 +37,7 @@ class BounceRunner(Runner): </span>     \
"""The bounce runner."""  
     def __init__(self, name, slice=None):
<span style="color: #000000;background-color: #ffdddd">-        super(BounceRunner, \
self).__init__(name, slice) </span><span style="color: #000000;background-color: \
#ddffdd">+        super().__init__(name, slice) </span>         self._processor = \
getUtility(IBounceProcessor)  
     def _dispose(self, mlist, msg, msgdata):
</code></pre>

<br>
</li>
<li id='diff-32'>
<a href='https://gitlab.com/mailman/mailman/compare/d063ee4dd4579ca931e36f0761084e4ab7cd0335...802ce668e67f51f904c69fdab2f5565a73c15e8a#diff-32'>
 <strong>
src/mailman/runners/digest.py
</strong>
</a>
<hr>
<pre class="highlight"><code><span style="color: #000000;background-color: \
#ffdddd">--- a/src/mailman/runners/digest.py </span><span style="color: \
#000000;background-color: #ddffdd">+++ b/src/mailman/runners/digest.py </span><span \
style="color: #aaaaaa">@@ -151,7 +151,7 @@ class MIMEDigester(Digester): </span>     \
"""A MIME digester."""  
     def __init__(self, mlist, volume, digest_number):
<span style="color: #000000;background-color: #ffdddd">-        super(MIMEDigester, \
self).__init__(mlist, volume, digest_number) </span><span style="color: \
#000000;background-color: #ddffdd">+        super().__init__(mlist, volume, \
digest_number) </span>         masthead = \
MIMEText(self._masthead.encode(self._charset),  _charset=self._charset)
         masthead['Content-Description'] = self._subject
<span style="color: #aaaaaa">@@ -215,7 +215,7 @@ class RFC1153Digester(Digester):
</span>     """A digester of the format specified by RFC 1153."""
 
     def __init__(self, mlist, volume, digest_number):
<span style="color: #000000;background-color: #ffdddd">-        \
super(RFC1153Digester, self).__init__(mlist, volume, digest_number) </span><span \
style="color: #000000;background-color: #ddffdd">+        super().__init__(mlist, \
volume, digest_number) </span>         self._separator70 = '-' * 70
         self._separator30 = '-' * 30
         self._text = StringIO()
</code></pre>

<br>
</li>
<li id='diff-33'>
<a href='https://gitlab.com/mailman/mailman/compare/d063ee4dd4579ca931e36f0761084e4ab7cd0335...802ce668e67f51f904c69fdab2f5565a73c15e8a#diff-33'>
 <strong>
src/mailman/runners/lmtp.py
</strong>
</a>
<hr>
<pre class="highlight"><code><span style="color: #000000;background-color: \
#ffdddd">--- a/src/mailman/runners/lmtp.py </span><span style="color: \
#000000;background-color: #ddffdd">+++ b/src/mailman/runners/lmtp.py </span><span \
style="color: #aaaaaa">@@ -171,7 +171,7 @@ class LMTPRunner(Runner, \
smtpd.SMTPServer): </span>         qlog.debug('LMTP server listening on %s:%s',
                    localaddr[0], localaddr[1])
         smtpd.SMTPServer.__init__(self, localaddr, remoteaddr=None)
<span style="color: #000000;background-color: #ffdddd">-        super(LMTPRunner, \
self).__init__(name, slice) </span><span style="color: #000000;background-color: \
#ddffdd">+        super().__init__(name, slice) </span> 
     def handle_accept(self):
         conn, addr = self.accept()
</code></pre>

<br>
</li>
<li id='diff-34'>
<a href='https://gitlab.com/mailman/mailman/compare/d063ee4dd4579ca931e36f0761084e4ab7cd0335...802ce668e67f51f904c69fdab2f5565a73c15e8a#diff-34'>
 <strong>
src/mailman/runners/outgoing.py
</strong>
</a>
<hr>
<pre class="highlight"><code><span style="color: #000000;background-color: \
#ffdddd">--- a/src/mailman/runners/outgoing.py </span><span style="color: \
#000000;background-color: #ddffdd">+++ b/src/mailman/runners/outgoing.py </span><span \
style="color: #aaaaaa">@@ -54,7 +54,7 @@ class OutgoingRunner(Runner): </span>     \
"""The outgoing runner."""  
     def __init__(self, slice=None, numslices=1):
<span style="color: #000000;background-color: #ffdddd">-        super(OutgoingRunner, \
self).__init__(slice, numslices) </span><span style="color: #000000;background-color: \
#ddffdd">+        super().__init__(slice, numslices) </span>         # We look this \
function up only at startup time.  self._func = find_name(config.mta.outgoing)
         # This prevents smtp server connection problems from filling up the
</code></pre>

<br>
</li>
<li id='diff-35'>
<a href='https://gitlab.com/mailman/mailman/compare/d063ee4dd4579ca931e36f0761084e4ab7cd0335...802ce668e67f51f904c69fdab2f5565a73c15e8a#diff-35'>
 <strong>
src/mailman/runners/rest.py
</strong>
</a>
<hr>
<pre class="highlight"><code><span style="color: #000000;background-color: \
#ffdddd">--- a/src/mailman/runners/rest.py </span><span style="color: \
#000000;background-color: #ddffdd">+++ b/src/mailman/runners/rest.py </span><span \
style="color: #aaaaaa">@@ -41,7 +41,7 @@ class RESTRunner(Runner): </span> 
     def __init__(self, name, slice=None):
         """See `IRunner`."""
<span style="color: #000000;background-color: #ffdddd">-        super(RESTRunner, \
self).__init__(name, slice) </span><span style="color: #000000;background-color: \
#ddffdd">+        super().__init__(name, slice) </span>         # Both the REST \
                server and the signal handlers must run in the main
         # thread; the former because of SQLite requirements (objects created
         # in one thread cannot be shared with the other threads), and the
<span style="color: #aaaaaa">@@ -66,7 +66,7 @@ class RESTRunner(Runner):
</span>         self._server.serve_forever()
 
     def signal_handler(self, signum, frame):
<span style="color: #000000;background-color: #ffdddd">-        super(RESTRunner, \
self).signal_handler(signum, frame) </span><span style="color: \
#000000;background-color: #ddffdd">+        super().signal_handler(signum, frame) \
</span>         if signum in (signal.SIGTERM, signal.SIGINT, signal.SIGUSR1):  # Set \
the flag that will terminate the TCPserver loop.  self._event.set()
</code></pre>

<br>
</li>
<li id='diff-36'>
<a href='https://gitlab.com/mailman/mailman/compare/d063ee4dd4579ca931e36f0761084e4ab7cd0335...802ce668e67f51f904c69fdab2f5565a73c15e8a#diff-36'>
 <strong>
src/mailman/testing/helpers.py
</strong>
</a>
<hr>
<pre class="highlight"><code><span style="color: #000000;background-color: \
#ffdddd">--- a/src/mailman/testing/helpers.py </span><span style="color: \
#000000;background-color: #ddffdd">+++ b/src/mailman/testing/helpers.py </span><span \
style="color: #aaaaaa">@@ -99,7 +99,7 @@ def make_testable_runner(runner_class, \
name=None, predicate=None): </span>         """Stop processing when the queue is \
empty."""  
         def __init__(self, *args, **kws):
<span style="color: #000000;background-color: #ffdddd">-            \
super(EmptyingRunner, self).__init__(*args, **kws) </span><span style="color: \
#000000;background-color: #ddffdd">+            super().__init__(*args, **kws) \
</span>             # We know it's an EmptyingRunner, so really we want to see the  # \
super class in the log files.  self.__class__.__name__ = runner_class.__name__
<span style="color: #aaaaaa">@@ -166,8 +166,7 @@ class TestableMaster(Master):
</span>             until the pass condition is set.
         :type start_check: Callable taking no arguments, returning nothing.
         """
<span style="color: #000000;background-color: #ffdddd">-        super(TestableMaster, \
                self).__init__(
-            restartable=False, config_file=config.filename)
</span><span style="color: #000000;background-color: #ddffdd">+        \
super().__init__(restartable=False, config_file=config.filename) </span>         \
self.start_check = start_check  self.event = threading.Event()
         self.thread = threading.Thread(target=self.loop)
<span style="color: #aaaaaa">@@ -215,7 +214,7 @@ class TestableMaster(Master):
</span>             self.start_check()
         # Let the blocking thread know everything's running.
         self.event.set()
<span style="color: #000000;background-color: #ffdddd">-        super(TestableMaster, \
self).loop() </span><span style="color: #000000;background-color: #ddffdd">+        \
super().loop() </span> 
     @property
     def runner_pids(self):
</code></pre>

<br>
</li>

</div>
<div class='footer' style='margin-top: 10px;'>
<p>
&mdash;
<br>
<a href="https://gitlab.com/mailman/mailman/compare/d063ee4dd4579ca931e36f0761084e4ab7cd0335...802ce668e67f51f904c69fdab2f5565a73c15e8a">View \
it on GitLab</a>. <br>
You're receiving this email because of your account on gitlab.com.
If you'd like to receive fewer emails, you can
adjust your notification settings.

</p>
</div>
</body>
</html>



_______________________________________________
Mailman-checkins mailing list
Mailman-checkins@python.org
Unsubscribe: https://mail.python.org/mailman/options/mailman-checkins/mailman-cvs%40progressive-comp.com



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic