Mark Sapiro pushed to branch master at GNU Mailman / Mailman Core
Commits: 97ebee59 by Mark Sapiro at 2022-07-31T23:37:22+00:00 Fix flake8>=5.0 errors. Flake8 >=5.0 has gotten fussier about some things and found a few. - - - - - 83f651f1 by Mark Sapiro at 2022-07-31T23:37:22+00:00 Merge branch 'flake8' into 'master' Fix flake8>=5.0 errors. See merge request mailman/mailman!1030 - - - - - 5 changed files: - src/mailman/app/subscriptions.py - src/mailman/commands/tests/test_cli_gatenews.py - src/mailman/handlers/tests/test_arc_validate.py - src/mailman/interfaces/member.py - src/mailman/model/bounce.py Changes: ===================================== src/mailman/app/subscriptions.py ===================================== @@ -631,7 +631,7 @@ def _handle_confirmation_needed_events(event, template_name): subject = _('Your confirmation is needed to leave the ' '${event.mlist.fqdn_listname} mailing list.') else: - assert(template_name.endswith(':subscribe')) + assert template_name.endswith(':subscribe') subject = _('Your confirmation is needed to join the ' '${event.mlist.fqdn_listname} mailing list.') confirm_address = event.mlist.confirm_address(event.token) ===================================== src/mailman/commands/tests/test_cli_gatenews.py ===================================== @@ -77,7 +77,7 @@ def get_nntplib_nntp(fail=0): def group(self, group_name): if group_name == 'my.group': - return('', 3, 1, 3, group_name) + return ('', 3, 1, 3, group_name) else: raise nntplib.NNTPTemporaryError( 'No such group: {}'.format(group_name)) ===================================== src/mailman/handlers/tests/test_arc_validate.py ===================================== @@ -210,7 +210,8 @@ This is a test message. lst = create_list('t...@example.com') msgdata = {} - msg = message_from_string("""DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; + msg = message_from_string( + """DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=valimail.com; s=google2048; h=mime-version:from:date:message-id:subject:to; bh=3VWGQGY+cSNYd1MGM+X6hRXU0stl8JCaQtl4mbX/j2I=; @@ -255,7 +256,8 @@ This is a test! lst = create_list('t...@example.com') msgdata = {} - msg = message_from_string("""DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; + msg = message_from_string( + """DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=valimail.com; s=google2048; h=mime-version:from:date:message-id:subject:to; bh=3VWGQGY+cSNYd1MGM+X6hRXU0stl8JCaQtl4mbX/j2I=; @@ -298,7 +300,8 @@ This is a test! lst = create_list('t...@example.com') msgdata = {} - msg = message_from_string("""DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; + msg = message_from_string( + """DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=valimail.com; s=google2048; h=mime-version:from:date:message-id:subject:to; bh=3VWGQGY+cSNYd1MGM+X6hRXU0stl8JCaQtl4mbX/j2I=; ===================================== src/mailman/interfaces/member.py ===================================== @@ -321,8 +321,8 @@ class IMembershipManager(Interface): """Member object manager.""" def memberships_pending_warning(): - """Memberships that have been disabled due to excessive bounces and require a - warning to be sent. + """Memberships that have been disabled due to excessive bounces and + require a warning to be sent. The total number of warnings sent to these are less than the MailingList's configured number of warnings to be sent before the ===================================== src/mailman/model/bounce.py ===================================== @@ -261,7 +261,8 @@ class BounceProcessor: @dbconnection def _remove_memberships(self, store): - """Remove all the memberships for whom max number of warnings have been sent. + """Remove all the memberships for whom max number of warnings have + been sent. """ manager = getUtility(IMembershipManager) for member in manager.memberships_pending_removal(): @@ -294,7 +295,8 @@ class BounceProcessor: @dbconnection def _send_warnings(self, store): - """Send warnings to the user who have reached their bounce score threshold. + """Send warnings to the user who have reached their bounce score + threshold. We send warnings only to the members who have delivery disabled and haven't already got a warning in the last View it on GitLab: https://gitlab.com/mailman/mailman/-/compare/1b39ac9c50504a25cf828aa9601fc5b75ada9539...83f651f1fe0b1dfca06b2759e848c987b645ca59 -- View it on GitLab: https://gitlab.com/mailman/mailman/-/compare/1b39ac9c50504a25cf828aa9601fc5b75ada9539...83f651f1fe0b1dfca06b2759e848c987b645ca59 You're receiving this email because of your account on gitlab.com.
_______________________________________________ Mailman-checkins mailing list -- mailman-checkins@python.org To unsubscribe send an email to mailman-checkins-le...@python.org https://mail.python.org/mailman3/lists/mailman-checkins.python.org/ Member address: arch...@jab.org