#2118: IOError is deprecated, use OSError.
diff --git a/Doc/library/smtplib.rst b/Doc/library/smtplib.rst
index 04036dc..5762bb6 100644
--- a/Doc/library/smtplib.rst
+++ b/Doc/library/smtplib.rst
@@ -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 --git a/Doc/whatsnew/3.4.rst b/Doc/whatsnew/3.4.rst
index 2b6193a..ca515f6 100644
--- a/Doc/whatsnew/3.4.rst
+++ b/Doc/whatsnew/3.4.rst
@@ -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 --git a/Lib/smtplib.py b/Lib/smtplib.py
index a5a9fd4..cc46e4f 100644
--- a/Lib/smtplib.py
+++ b/Lib/smtplib.py
@@ -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):