This is an archive of the discontinued Mercurial Phabricator instance.

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

Authored by durin42 on Jul 16 2018, 7:16 PM.

Details

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.

Diff Detail

Repository
rHG Mercurial
Lint
Lint Skipped
Unit
Unit Tests Skipped

Event Timeline

durin42 created this revision.Jul 16 2018, 7:16 PM
yuja added a subscriber: yuja.Jul 17 2018, 9:25 AM
  • self.file = smtplib.SSLFakeFile(new_socket)

+ self.file = new_socket.makefile()

I'm not pretty sure, but missing 'rb'?

durin42 updated this revision to Diff 10192.Aug 9 2018, 4:43 PM
durin42 updated this revision to Diff 10196.Aug 9 2018, 4:48 PM
This revision was automatically updated to reflect the committed changes.