cpython: 209744660b92 (original) (raw)

Mercurial > cpython

changeset 69924:209744660b92 3.2

Merge: Issue #11927: SMTP_SSL now uses port 465 by default as documented. [#11927]

Antoine Pitrou solipsis@pitrou.net
date Sat, 07 May 2011 19:41:33 +0200
parents 4b3352b49483(current diff)20e9d3e49689(diff)
children e708a57de190 a1158371956e
files Lib/smtplib.py Lib/test/test_smtpnet.py Misc/ACKS Misc/NEWS
diffstat 4 files changed, 15 insertions(+), 2 deletions(-)[+] [-] Lib/smtplib.py 6 Lib/test/test_smtpnet.py 7 Misc/ACKS 1 Misc/NEWS 3

line wrap: on

line diff

--- a/Lib/smtplib.py +++ b/Lib/smtplib.py @@ -231,6 +231,7 @@ class SMTP: ehlo_msg = "ehlo" ehlo_resp = None does_esmtp = 0

def init(self, host='', port=0, local_hostname=None, timeout=socket._GLOBAL_DEFAULT_TIMEOUT): @@ -246,7 +247,6 @@ class SMTP: """ self.timeout = timeout self.esmtp_features = {}

@@ -804,13 +804,15 @@ if _have_ssl: are also optional - they can contain a PEM formatted private key and certificate chain file for the SSL connection. """ +

+ def init(self, host='', port=0, local_hostname=None, keyfile=None, certfile=None, timeout=socket._GLOBAL_DEFAULT_TIMEOUT): self.keyfile = keyfile self.certfile = certfile SMTP.init(self, host, port, local_hostname, timeout)

def _get_socket(self, host, port, timeout): if self.debuglevel > 0:

--- a/Lib/test/test_smtpnet.py +++ b/Lib/test/test_smtpnet.py @@ -17,6 +17,13 @@ class SmtpSSLTest(unittest.TestCase): server.ehlo() server.quit()

+ def test_main(): support.run_unittest(SmtpSSLTest)

--- a/Misc/ACKS +++ b/Misc/ACKS @@ -366,6 +366,7 @@ Malte Helmert Lance Finn Helsten Jonathan Hendry James Henstridge +Kasun Herath Chris Herborth Ivan Herman Jürgen Hermann

--- a/Misc/NEWS +++ b/Misc/NEWS @@ -83,6 +83,9 @@ Core and Builtins Library ------- +- Issue #11927: SMTP_SSL now uses port 465 by default as documented. Patch