summaryrefslogtreecommitdiffstats
path: root/Doc/whatsnew
diff options
context:
space:
mode:
authorBrett Cannon <brett@python.org>2016-06-25 17:58:17 (GMT)
committerBrett Cannon <brett@python.org>2016-06-25 17:58:17 (GMT)
commit696c35e86bffea1f2bc6179a29e46416899e3de6 (patch)
tree774b8cec3342b4ca9a2c6d9c193f59b17299f615 /Doc/whatsnew
parentda037616b10fc12a213e67711065f8123fb98cef (diff)
downloadcpython-696c35e86bffea1f2bc6179a29e46416899e3de6.zip
cpython-696c35e86bffea1f2bc6179a29e46416899e3de6.tar.gz
cpython-696c35e86bffea1f2bc6179a29e46416899e3de6.tar.bz2
Issue #26186: Remove the restriction that built-in and extension
modules can't be lazily loaded. Thanks to Python 3.6 allowing for types.ModuleType to have its __class__ mutated, the restriction can be lifted by calling create_module() on the wrapped loader.
Diffstat (limited to 'Doc/whatsnew')
-rw-r--r--Doc/whatsnew/3.6.rst13
1 files changed, 13 insertions, 0 deletions
diff --git a/Doc/whatsnew/3.6.rst b/Doc/whatsnew/3.6.rst
index 177b17f..ea4dd8c 100644
--- a/Doc/whatsnew/3.6.rst
+++ b/Doc/whatsnew/3.6.rst
@@ -291,6 +291,16 @@ The idlelib package is being modernized and refactored to make IDLE look and wor
In compensation, the eventual result with be that some idlelib classes will be easier to use, with better APIs and docstrings explaining them. Additional useful information will be added to idlelib when available.
+importlib
+---------
+
+:class:`importlib.util.LazyLoader` now calls
+:meth:`~importlib.abc.Loader.create_module` on the wrapped loader, removing the
+restriction that :class:`importlib.machinery.BuiltinImporter` and
+:class:`importlib.machinery.ExtensionFileLoader` couldn't be used with
+:class:`importlib.util.LazyLoader`.
+
+
os
--
@@ -620,6 +630,9 @@ that may require changes to your code.
Changes in the Python API
-------------------------
+* When :meth:`importlib.abc.Loader.exec_module` is defined,
+ :meth:`importlib.abc.Loader.create_module` must also be defined.
+
* The format of the ``co_lnotab`` attribute of code objects changed to support
negative line number delta. By default, Python does not emit bytecode with
negative line number delta. Functions using ``frame.f_lineno``,