# HG changeset patch # User Augie Fackler # Date 1531779439 14400 # Node ID a5e70c14214a3234b6b33f697741b84e3c44cbd4 # Parent 569d662816de326ff2c687edda586aaedf4cb416 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 diff -r 569d662816de -r a5e70c14214a mercurial/mail.py --- 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():