(original) (raw)

changeset: 83363:adc72ff451dc user: R David Murray rdmurray@bitdance.com date: Sun Apr 14 06:46:35 2013 -0400 files: Doc/library/smtplib.rst Doc/whatsnew/3.4.rst Lib/smtplib.py description: #2118: IOError is deprecated, use OSError. diff -r 8965ed81d373 -r adc72ff451dc Doc/library/smtplib.rst --- a/Doc/library/smtplib.rst Sun Apr 14 03:44:47 2013 -0700 +++ b/Doc/library/smtplib.rst Sun Apr 14 06:46:35 2013 -0400 @@ -103,7 +103,7 @@ .. exception:: SMTPException - Subclass of :exc:`IOError` that is the base exception class for all + Subclass of :exc:`OSError` that is the base exception class for all the other excpetions provided by this module. diff -r 8965ed81d373 -r adc72ff451dc Doc/whatsnew/3.4.rst --- a/Doc/whatsnew/3.4.rst Sun Apr 14 03:44:47 2013 -0700 +++ b/Doc/whatsnew/3.4.rst Sun Apr 14 06:46:35 2013 -0400 @@ -162,7 +162,7 @@ smtplib ------- -:exc:`~smtplib.SMTPException` is now a subclass of :exc:`IOError`, which allows +:exc:`~smtplib.SMTPException` is now a subclass of :exc:`OSError`, which allows both socket level errors and SMTP protocol level errors to be caught in one try/except statement by code that only cares whether or not an error occurred. (:issue:`2118`). diff -r 8965ed81d373 -r adc72ff451dc Lib/smtplib.py --- a/Lib/smtplib.py Sun Apr 14 03:44:47 2013 -0700 +++ b/Lib/smtplib.py Sun Apr 14 06:46:35 2013 -0400 @@ -66,7 +66,7 @@ OLDSTYLE_AUTH = re.compile(r"auth=(.*)", re.I) # Exception classes used by this module. -class SMTPException(IOError): +class SMTPException(OSError): """Base class for all exceptions raised by this module.""" class SMTPServerDisconnected(SMTPException): /rdmurray@bitdance.com