]> granicus.if.org Git - python/commitdiff
#2118: IOError is deprecated, use OSError.
authorR David Murray <rdmurray@bitdance.com>
Sun, 14 Apr 2013 10:46:35 +0000 (06:46 -0400)
committerR David Murray <rdmurray@bitdance.com>
Sun, 14 Apr 2013 10:46:35 +0000 (06:46 -0400)
Doc/library/smtplib.rst
Doc/whatsnew/3.4.rst
Lib/smtplib.py

index 04036dce4c0ab527cc58e14322bb6d48857ac356..5762bb609f4b1d361f4f934abf1b4a5a69945c01 100644 (file)
@@ -103,7 +103,7 @@ A nice selection of exceptions is defined as well:
 
 .. 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.
 
 
index 2b6193a215242b206ba00d9c09154babed7842b8..ca515f6c82ac654863e8ac22d30c850dcdb5a3fa 100644 (file)
@@ -162,7 +162,7 @@ detected.  (Contributed by R. David Murray and Daniel Urban in :issue:`16522`.)
 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`).
index a5a9fd4c8de3d1c17a74b11078c5bcf0c3212b46..cc46e4f49f5a1b7c5b8115a93e59f21b47d4a83f 100644 (file)
@@ -66,7 +66,7 @@ bCRLF = b"\r\n"
 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):