D3956: mail: stop using the smtplib.SSLFakeFile and use socket.socket.makefile
This revision was automatically updated to reflect the committed changes. Closed by commit rHGa5e70c14214a: mail: stop using the smtplib.SSLFakeFile and use socket.socket.makefile (authored by durin42, committed by ). REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D3956?vs=10196=10248 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 ___ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
D3956: mail: stop using the smtplib.SSLFakeFile and use socket.socket.makefile
durin42 updated this revision to Diff 10196. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D3956?vs=10192=10196 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 ___ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
D3956: mail: stop using the smtplib.SSLFakeFile and use socket.socket.makefile
durin42 updated this revision to Diff 10192. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D3956?vs=9612=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 ___ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
D3956: mail: stop using the smtplib.SSLFakeFile and use socket.socket.makefile
yuja added a comment. > - self.file = smtplib.SSLFakeFile(new_socket) +self.file = new_socket.makefile() I'm not pretty sure, but missing 'rb'? REPOSITORY rHG Mercurial REVISION DETAIL https://phab.mercurial-scm.org/D3956 To: durin42, #hg-reviewers Cc: yuja, mercurial-devel ___ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
Re: D3956: mail: stop using the smtplib.SSLFakeFile and use socket.socket.makefile
> -self.file = smtplib.SSLFakeFile(new_socket) > +self.file = new_socket.makefile() I'm not pretty sure, but missing 'rb'? ___ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
D3956: mail: stop using the smtplib.SSLFakeFile and use socket.socket.makefile
durin42 created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY 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. REPOSITORY rHG Mercurial 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() return new_socket def _pyhastls(): To: durin42, #hg-reviewers Cc: mercurial-devel ___ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel