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

(cherry picked from commit e483f02423917dc4dfd25f46e5b9e6fce304777d)

Co-authored-by: Stéphane Wirtel <stephane@wirtel.be>
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.