summaryrefslogtreecommitdiffstats
path: root/Doc/whatsnew
diff options
context:
space:
mode:
authorBrett Cannon <brett@python.org>2015-01-09 16:39:21 (GMT)
committerBrett Cannon <brett@python.org>2015-01-09 16:39:21 (GMT)
commit02d845400275076ef5ba2791c74b7670ac21f8a9 (patch)
tree36077086a1bd393ede07d99c61ed7137bd5bdcc3 /Doc/whatsnew
parent863c69cfebcafbf97ba401e0f3cd5cb077e0e8f2 (diff)
downloadcpython-02d845400275076ef5ba2791c74b7670ac21f8a9.zip
cpython-02d845400275076ef5ba2791c74b7670ac21f8a9.tar.gz
cpython-02d845400275076ef5ba2791c74b7670ac21f8a9.tar.bz2
Issue #23014: Make importlib.abc.Loader.create_module() required when
importlib.abc.Loader.exec_module() is also defined. Before this change, create_module() was optional **and** could return None to trigger default semantics. This change now reduces the options for choosing default semantics to one and in the most backporting-friendly way (define create_module() to return None).
Diffstat (limited to 'Doc/whatsnew')
-rw-r--r--Doc/whatsnew/3.5.rst8
1 files changed, 8 insertions, 0 deletions
diff --git a/Doc/whatsnew/3.5.rst b/Doc/whatsnew/3.5.rst
index def4add..f3cc514 100644
--- a/Doc/whatsnew/3.5.rst
+++ b/Doc/whatsnew/3.5.rst
@@ -456,6 +456,14 @@ Changes in the Python API
`http.client` and `http.server` remain available for backwards compatibility.
(Contributed by Demian Brecht in :issue:`21793`.)
+* When an import loader defines :meth:`~importlib.machinery.Loader.exec_module`
+ it is now expected to also define
+ :meth:`~importlib.machinery.Loader.create_module` (raises a
+ :exc:`DeprecationWarning` now, will be an error in Python 3.6). If the loader
+ inherits from :class:`importlib.abc.Loader` then there is nothing to do, else
+ simply define :meth:`~importlib.machinery.Loader.create_module` to return
+ ``None`` (:issue:`23014`).
+
Changes in the C API
--------------------