bpo-35044, doc: Use the :exc: role for the exceptions (GH-10037)

diff --git a/Doc/library/configparser.rst b/Doc/library/configparser.rst
index fcca97a..1a5417f 100644
--- a/Doc/library/configparser.rst
+++ b/Doc/library/configparser.rst
@@ -401,11 +401,11 @@
   because default values cannot be deleted from the section (because technically
   they are not there).  If they are overridden in the section, deleting causes
   the default value to be visible again.  Trying to delete a default value
-  causes a ``KeyError``.
+  causes a :exc:`KeyError`.
 
 * ``DEFAULTSECT`` cannot be removed from the parser:
 
-  * trying to delete it raises ``ValueError``,
+  * trying to delete it raises :exc:`ValueError`,
 
   * ``parser.clear()`` leaves it intact,
 
diff --git a/Doc/library/imp.rst b/Doc/library/imp.rst
index ccf5f92..1bd6f12 100644
--- a/Doc/library/imp.rst
+++ b/Doc/library/imp.rst
@@ -229,7 +229,7 @@
    file path.  For example, if *path* is
    ``/foo/bar/__pycache__/baz.cpython-32.pyc`` the returned path would be
    ``/foo/bar/baz.py``.  *path* need not exist, however if it does not conform
-   to :pep:`3147` format, a ``ValueError`` is raised. If
+   to :pep:`3147` format, a :exc:`ValueError` is raised. If
    :attr:`sys.implementation.cache_tag` is not defined,
    :exc:`NotImplementedError` is raised.
 
diff --git a/Doc/library/importlib.rst b/Doc/library/importlib.rst
index 09d5989..c6c7160 100644
--- a/Doc/library/importlib.rst
+++ b/Doc/library/importlib.rst
@@ -1407,7 +1407,7 @@
    file path.  For example, if *path* is
    ``/foo/bar/__pycache__/baz.cpython-32.pyc`` the returned path would be
    ``/foo/bar/baz.py``.  *path* need not exist, however if it does not conform
-   to :pep:`3147` or :pep:`488` format, a ``ValueError`` is raised. If
+   to :pep:`3147` or :pep:`488` format, a :exc:`ValueError` is raised. If
    :attr:`sys.implementation.cache_tag` is not defined,
    :exc:`NotImplementedError` is raised.
 
diff --git a/Doc/library/io.rst b/Doc/library/io.rst
index 98649de..2536c37e 100644
--- a/Doc/library/io.rst
+++ b/Doc/library/io.rst
@@ -39,7 +39,7 @@
 
 All streams are careful about the type of data you give to them.  For example
 giving a :class:`str` object to the ``write()`` method of a binary stream
-will raise a ``TypeError``.  So will giving a :class:`bytes` object to the
+will raise a :exc:`TypeError`.  So will giving a :class:`bytes` object to the
 ``write()`` method of a text stream.
 
 .. versionchanged:: 3.3
diff --git a/Doc/library/os.path.rst b/Doc/library/os.path.rst
index 379308c..03644e2 100644
--- a/Doc/library/os.path.rst
+++ b/Doc/library/os.path.rst
@@ -325,7 +325,7 @@
    Normalize the case of a pathname.  On Unix and Mac OS X, this returns the
    path unchanged; on case-insensitive filesystems, it converts the path to
    lowercase.  On Windows, it also converts forward slashes to backward slashes.
-   Raise a TypeError if the type of *path* is not ``str`` or ``bytes`` (directly
+   Raise a :exc:`TypeError` if the type of *path* is not ``str`` or ``bytes`` (directly
    or indirectly through the :class:`os.PathLike` interface).
 
    .. versionchanged:: 3.6
diff --git a/Doc/library/ssl.rst b/Doc/library/ssl.rst
index 5b0ef2e..4817bba 100644
--- a/Doc/library/ssl.rst
+++ b/Doc/library/ssl.rst
@@ -1941,7 +1941,7 @@
    .. note::
       With versions of OpenSSL older than 0.9.8m, it is only possible
       to set options, not to clear them.  Attempting to clear an option
-      (by resetting the corresponding bits) will raise a ``ValueError``.
+      (by resetting the corresponding bits) will raise a :exc:`ValueError`.
 
    .. versionchanged:: 3.6
       :attr:`SSLContext.options` returns :class:`Options` flags:
diff --git a/Doc/library/typing.rst b/Doc/library/typing.rst
index 268adc0..9861da8 100644
--- a/Doc/library/typing.rst
+++ b/Doc/library/typing.rst
@@ -899,7 +899,7 @@
    non-``@overload``-decorated definition, while the latter is used at
    runtime but should be ignored by a type checker.  At runtime, calling
    a ``@overload``-decorated function directly will raise
-   ``NotImplementedError``. An example of overload that gives a more
+   :exc:`NotImplementedError`. An example of overload that gives a more
    precise type than can be expressed using a union or a type variable::
 
       @overload
diff --git a/Doc/library/unittest.rst b/Doc/library/unittest.rst
index 83aee1b..b35a724 100644
--- a/Doc/library/unittest.rst
+++ b/Doc/library/unittest.rst
@@ -1161,7 +1161,7 @@
       If *delta* is supplied instead of *places* then the difference
       between *first* and *second* must be less or equal to (or greater than) *delta*.
 
-      Supplying both *delta* and *places* raises a ``TypeError``.
+      Supplying both *delta* and *places* raises a :exc:`TypeError`.
 
       .. versionchanged:: 3.2
          :meth:`assertAlmostEqual` automatically considers almost equal objects