changeset 43171:54b06bec8914

py3: use socket.makefile() instead of dropped smtplib.SSLFakeFile The latter (undocumented internal) class got removed in Python 3.3. Use socket.makefile() as suggested: https://docs.python.org/3/whatsnew/3.3.html#porting-python-code
author Denis Laxalde <denis@laxalde.org>
date Thu, 10 Oct 2019 21:30:44 +0200
parents a1801ee97840
children 9145abd8b96d
files mercurial/mail.py
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/mail.py	Thu Oct 10 21:05:34 2019 +0200
+++ b/mercurial/mail.py	Thu Oct 10 21:30:44 2019 +0200
@@ -61,7 +61,7 @@
                 ui=self._ui,
                 serverhostname=self._host,
             )
-            self.file = smtplib.SSLFakeFile(self.sock)
+            self.file = self.sock.makefile("rb")
             self.helo_resp = None
             self.ehlo_resp = None
             self.esmtp_features = {}