D3956: mail: stop using the smtplib.SSLFakeFile and use socket.socket.makefile

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


durin42 updated this revision to Diff 10192.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D3956?vs=9612&id=10192

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

AFFECTED FILES
  mercurial/mail.py

CHANGE DETAILS

diff --git a/mercurial/mail.py b/mercurial/mail.py
--- a/mercurial/mail.py
+++ b/mercurial/mail.py
@@ -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():



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


More information about the Mercurial-devel mailing list