Skip to content

Commit

Permalink
bpo-26184: import.rst: Improve versionchanged note (GH-277)
Browse files Browse the repository at this point in the history
Mention that an ImportError is raised when exec_module() is defined, but
create_module() is not.
  • Loading branch information
Mariatta committed Feb 26, 2017
1 parent fe70d92 commit 6b4a5f4
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions Doc/reference/import.rst
Expand Up @@ -464,8 +464,11 @@ import machinery will create the new module itself.

.. versionchanged:: 3.5
A :exc:`DeprecationWarning` is raised when ``exec_module()`` is defined but
``create_module()`` is not. Starting in Python 3.6 it will be an error to not
define ``create_module()`` on a loader attached to a ModuleSpec.
``create_module()`` is not.

.. versionchanged:: 3.6
An :exc:`ImportError` is raised when ``exec_module()`` is defined but
``create_module`` is not.

Submodules
----------
Expand Down

0 comments on commit 6b4a5f4

Please sign in to comment.