summaryrefslogtreecommitdiffstats
path: root/Doc/whatsnew
diff options
context:
space:
mode:
authorR David Murray <rdmurray@bitdance.com>2014-02-22 19:28:46 (GMT)
committerR David Murray <rdmurray@bitdance.com>2014-02-22 19:28:46 (GMT)
commitb79b785a921959245ebc96ae5da216da593959a5 (patch)
treed7f576e942055732c343bf1517feb3b9b853f0d5 /Doc/whatsnew
parent8dfb4576a9a74a35f71a2f68a7236f2f0b1a7e63 (diff)
downloadcpython-b79b785a921959245ebc96ae5da216da593959a5.zip
cpython-b79b785a921959245ebc96ae5da216da593959a5.tar.gz
cpython-b79b785a921959245ebc96ae5da216da593959a5.tar.bz2
whatsnew: importlib deprecations.
This addresses issue #20199, if I got it right. The deprecation and replacement lists are based on the importlib documentation.
Diffstat (limited to 'Doc/whatsnew')
-rw-r--r--Doc/whatsnew/3.4.rst28
1 files changed, 24 insertions, 4 deletions
diff --git a/Doc/whatsnew/3.4.rst b/Doc/whatsnew/3.4.rst
index 1b71c57..c8c47e0 100644
--- a/Doc/whatsnew/3.4.rst
+++ b/Doc/whatsnew/3.4.rst
@@ -1504,10 +1504,30 @@ Deprecated Python Modules, Functions and Methods
:meth:`difflib.SequenceMatcher.isbpopular` were removed: use ``x in sm.bjunk`` and
``x in sm.bpopular``, where *sm* is a :class:`~difflib.SequenceMatcher` object.
-* :func:`importlib.util.module_for_loader` is pending deprecation. Using
- :func:`importlib.util.module_to_load` and
- :meth:`importlib.abc.Loader.init_module_attrs` allows subclasses of a loader
- to more easily customize module loading.
+* As mentioned in :ref:`whatsnew-pep-451`, a number of :mod:`importilb`
+ methods and functions are deprecated: :meth:`importlib.find_loader` is
+ replaced by :func:`importlib.util.find_spec`;
+ :meth:`importlib.machinery.PathFinder.find_module` is replaced by
+ :meth:`importlib.machinery.PathFinder.find_spec`;
+ :meth:`importlib.abc.MetaPathFinder.find_module` is replaced by
+ :meth:`importlib.abc.MetaPathFinder.find_spec`;
+ :meth:`importlib.abc.PathEntryFinder.find_loader` and
+ :meth:`~importlib.abc.PathEntryFinder.find_module` are replaced by
+ :meth:`importlib.abc.PathEntryFinder.find_spec`; all of the ``xxxLoader`` ABC
+ ``load_module`` methods (:meth:`importlib.abc.Loader.load_module`,
+ :meth:`importlib.abc.InspectLoader.load_module`,
+ :meth:`importlib.abc.FileLoader.load_module`,
+ :meth:`importlib.abc.SourceLoader.load_module`) should no longer be
+ implemented, instead loaders should implement an
+ ``exec_module`` method
+ (:meth:`importlib.abc.Loader.exec_module`,
+ :meth:`importlib.abc.InspectLoader.exec_module`
+ :meth:`importlib.abc.SourceLoader.exec_module`) and let the import system
+ take care of the rest; and
+ :meth:`importlib.abc.Loader.module_repr`,
+ :meth:`importlib.util.module_for_loader`, :meth:`importlib.util.set_loader`,
+ and :meth:`importlib.util.set_package` are no longer needed because their
+ functions are now handled automatically by the import system.
* The :mod:`imp` module is pending deprecation. To keep compatibility with
Python 2/3 code bases, the module's removal is currently not scheduled.