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
--- a/mercurial/mail.py Mon Jul 16 18:16:26 2018 -0400
+++ b/mercurial/mail.py Mon Jul 16 18:17:19 2018 -0400
@@ -79,7 +79,7 @@
self.keyfile, self.certfile,
ui=self._ui,
serverhostname=self._host)
- self.file = smtplib.SSLFakeFile(new_socket)
+ self.file = new_socket.makefile(r'rb')
return new_socket
def _pyhastls():