D4219: dummysmtpd: accept additional kwargs from stdlib smtpd

durin42 (Augie Fackler) phabricator at mercurial-scm.org
Thu Aug 9 22:06:50 UTC 2018


durin42 created this revision.
Herald added a reviewer: pulkit.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  This was causing extremely mysterious failures because smtpd is
  implemented using asynchat, which in turn doesn't appear to do
  anything *remotely* helpful if an exception occurs.
  
  no-check-commit because I'm editing a foo_bar function signature
  ================================================================
  
  test-patchbomb-tls.t now passes in Python 3, but only because it
  doesn't check message bodies like test-patchbomb.t. test-patchbomb.t
  is *full* of doubled headers in the output (eg [0]) which seems like
  an odd failure mode.
  
  0:
  @@ -141,12 +154,17 @@
  
    MIME-Version: 1.0
    Content-Type: text/plain; charset="us-ascii"
    Content-Transfer-Encoding: 7bit
  
  +  MIME-Version: 1.0
  +  Content-Type: text/plain; charset="us-ascii"
  +  Content-Transfer-Encoding: 7bit
  
    Subject: [PATCH] bookmark
    X-Mercurial-Node: 8dab2639fd35f1e337ad866c372a5c44f1064e3c
    X-Mercurial-Series-Index: 1
    X-Mercurial-Series-Total: 1

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D4219

AFFECTED FILES
  contrib/python3-whitelist
  tests/dummysmtpd.py

CHANGE DETAILS

diff --git a/tests/dummysmtpd.py b/tests/dummysmtpd.py
--- a/tests/dummysmtpd.py
+++ b/tests/dummysmtpd.py
@@ -26,7 +26,7 @@
     def __init__(self, localaddr):
         smtpd.SMTPServer.__init__(self, localaddr, remoteaddr=None)
 
-    def process_message(self, peer, mailfrom, rcpttos, data):
+    def process_message(self, peer, mailfrom, rcpttos, data, **kwargs):
         log('%s from=%s to=%s\n' % (peer[0], mailfrom, ', '.join(rcpttos)))
 
     def handle_error(self):
diff --git a/contrib/python3-whitelist b/contrib/python3-whitelist
--- a/contrib/python3-whitelist
+++ b/contrib/python3-whitelist
@@ -363,6 +363,7 @@
 test-parseindex2.py
 test-patch-offset.t
 test-patch.t
+test-patchbomb-tls.t
 test-pathconflicts-merge.t
 test-pathconflicts-update.t
 test-pathencode.py



To: durin42, pulkit, #hg-reviewers
Cc: mercurial-devel


More information about the Mercurial-devel mailing list