dummysmtpd: accept additional kwargs from stdlib smtpd
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
Differential Revision: https://phab.mercurial-scm.org/D4219
mail: fix debug print, which appears to have been broken for a long time
I noticed this when trying to debug very mysterious dummysmtpd
problems. It turns out you can set self.debuglevel to a number greater
than 0 and have smtplib print helpful debug output, but this output on
our side of things was broken.
Differential Revision: https://phab.mercurial-scm.org/D4218
patchbomb: python 3 really wants those email addresses in unicode
At this point, test-patchbomb-tls.t almost passes on Python 3, but I'm
not really sure what the issue is: we just get a `abort: Connection
unexpectedly closed` that doesn't make sense to me.
Differential Revision: https://phab.mercurial-scm.org/D3957
mail: stop using the smtplib.SSLFakeFile and use socket.socket.makefile
They're equivalent, and the latter is what Python 3.3 says to use in
the release notes. Turns out it works on Python 2 as well.
Differential Revision: https://phab.mercurial-scm.org/D3956
mail: modernize check for Python-with-TLS
We used to be going indirectly through the socket module, but now we
just check for the ssl module.
Differential Revision: https://phab.mercurial-scm.org/D3955
mail: cope with Py3 unicode antics on email addresses
Differential Revision: https://phab.mercurial-scm.org/D3954
mail: fix _encode to be more correct on Python 3
This code appears to be on the wrong side of the law in Python 2, at
least some of the time. In Python 3, it's definitely wrong in places,
but fortunately that's easy to fix.
Differential Revision: https://phab.mercurial-scm.org/D3953