summaryrefslogtreecommitdiffstats
path: root/Misc
diff options
context:
space:
mode:
authorR David Murray <rdmurray@bitdance.com>2014-04-14 22:21:38 (GMT)
committerR David Murray <rdmurray@bitdance.com>2014-04-14 22:21:38 (GMT)
commitafb151a5cc6fb1012d4b2827d2fdcbf98c07206d (patch)
treeab03e825771e5a38d34ce218cfa26a26fd0b90b7 /Misc
parent4a24d09d623f66368bb3ab12dd8f1fed589cece4 (diff)
downloadcpython-afb151a5cc6fb1012d4b2827d2fdcbf98c07206d.zip
cpython-afb151a5cc6fb1012d4b2827d2fdcbf98c07206d.tar.gz
cpython-afb151a5cc6fb1012d4b2827d2fdcbf98c07206d.tar.bz2
#17498: Defer SMTPServerDisconnected errors until the next command.
Normally an SMTP server will return an error, and smtplib will then issue an RSET to return the connection to the known starting state. Some servers, however, disconnect after issuing certain errors. When we issue the RSET, this would result in raising an SMTPServerDisconnected error, *instead* of returning the error code the user of the library was expecting. This fix makes the internal RSET calls ignore the disconnection so that the error code is returned. The user of the library will then get the SMTPServerDisconnected error the next time they try to talk to the server. Patch by Kushal Das.
Diffstat (limited to 'Misc')
-rw-r--r--Misc/NEWS5
1 files changed, 5 insertions, 0 deletions
diff --git a/Misc/NEWS b/Misc/NEWS
index 52cb825..8519b61 100644
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -37,6 +37,11 @@ Core and Builtins
Library
-------
+- Issue #17498: Some SMTP servers disconnect after certain errors, violating
+ strict RFC conformance. Instead of losing the error code when we issue the
+ subsequent RSET, smtplib now returns the error code and defers raising the
+ SMTPServerDisconnected error until the next command is issued.
+
- Issue #17826: setting an iterable side_effect on a mock function created by
create_autospec now works. Patch by Kushal Das.