Skip to content

bpo-37444: Update differing exception between builtins and importlib #14869

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Prev Previous commit
Next Next commit
Tweak wordiing on versionchanged note
  • Loading branch information
ncoghlan authored Jul 30, 2019
commit 375dd4f58e438e4d3250bec431cd8f222ac76589
5 changes: 3 additions & 2 deletions Doc/library/importlib.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1441,8 +1441,9 @@ an :term:`importer`.
.. versionadded:: 3.3

.. versionchanged:: 3.9
Raises :exc:`ImportError` instead of :exc:`ValueError` as equal in
:meth:`builtin.__import__`.
To improve consistency with import statements, raise
:exc:`ImportError` instead of :exc:`ValueError` for invalid relative
import attempts.

.. function:: find_spec(name, package=None)

Expand Down