From: R David Murray Date: Thu, 21 Mar 2013 01:13:56 +0000 (-0400) Subject: Merge: #5713: Handle 421 error codes during sendmail by closing the socket. X-Git-Tag: v3.4.0a1~1126 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=82c6b45c1421c9c7b687f8f8a53faa77d8ebbd55;p=python Merge: #5713: Handle 421 error codes during sendmail by closing the socket. This is a partial fix to the issue of servers disconnecting unexpectedly; in this case the 421 says they are disconnecting, so we close the socket and return the 421 in the appropriate error context. Original patch by Mark Sapiro, updated by Kushal Das, with additional tests by me. --- 82c6b45c1421c9c7b687f8f8a53faa77d8ebbd55 diff --cc Misc/NEWS index 6f2011a0cc,fe5afdd590..ba34efee6e --- a/Misc/NEWS +++ b/Misc/NEWS @@@ -292,18 -196,10 +292,22 @@@ Core and Builtin Library ------- + - Issue #5713: smtplib now handles 421 (closing connection) error codes when + sending mail by closing the socket and reporting the 421 error code via the + exception appropriate to the command that received the error response. + +- Issue #16997: unittest.TestCase now provides a subTest() context manager + to procedurally generate, in an easy way, small test instances. + +- Issue #17485: Also delete the Request Content-Length header if the data + attribute is deleted. (Follow on to issue 16464). + +- Issue #15927: CVS now correctly parses escaped newlines and carriage + when parsing with quoting turned off. + +- Issue #17467: add readline and readlines support to mock_open in + unittest.mock. + - Issue #17192: Update the ctypes module's libffi to v3.0.13. This specifically addresses a stack misalignment issue on x86 and issues on some more recent platforms.