@@ -1527,10 +1527,30 @@ Deprecated Python Modules, Functions and Methods
15271527 :meth: `difflib.SequenceMatcher.isbpopular ` were removed: use ``x in sm.bjunk `` and
15281528 ``x in sm.bpopular ``, where *sm * is a :class: `~difflib.SequenceMatcher ` object.
15291529
1530- * :func: `importlib.util.module_for_loader ` is pending deprecation. Using
1531- :func: `importlib.util.module_to_load ` and
1532- :meth: `importlib.abc.Loader.init_module_attrs ` allows subclasses of a loader
1533- to more easily customize module loading.
1530+ * As mentioned in :ref: `whatsnew-pep-451 `, a number of :mod: `importilb `
1531+ methods and functions are deprecated: :meth: `importlib.find_loader ` is
1532+ replaced by :func: `importlib.util.find_spec `;
1533+ :meth: `importlib.machinery.PathFinder.find_module ` is replaced by
1534+ :meth: `importlib.machinery.PathFinder.find_spec `;
1535+ :meth: `importlib.abc.MetaPathFinder.find_module ` is replaced by
1536+ :meth: `importlib.abc.MetaPathFinder.find_spec `;
1537+ :meth: `importlib.abc.PathEntryFinder.find_loader ` and
1538+ :meth: `~importlib.abc.PathEntryFinder.find_module ` are replaced by
1539+ :meth: `importlib.abc.PathEntryFinder.find_spec `; all of the ``xxxLoader `` ABC
1540+ ``load_module `` methods (:meth: `importlib.abc.Loader.load_module `,
1541+ :meth: `importlib.abc.InspectLoader.load_module `,
1542+ :meth: `importlib.abc.FileLoader.load_module `,
1543+ :meth: `importlib.abc.SourceLoader.load_module `) should no longer be
1544+ implemented, instead loaders should implement an
1545+ ``exec_module `` method
1546+ (:meth: `importlib.abc.Loader.exec_module `,
1547+ :meth: `importlib.abc.InspectLoader.exec_module `
1548+ :meth: `importlib.abc.SourceLoader.exec_module `) and let the import system
1549+ take care of the rest; and
1550+ :meth: `importlib.abc.Loader.module_repr `,
1551+ :meth: `importlib.util.module_for_loader `, :meth: `importlib.util.set_loader `,
1552+ and :meth: `importlib.util.set_package ` are no longer needed because their
1553+ functions are now handled automatically by the import system.
15341554
15351555* The :mod: `imp ` module is pending deprecation. To keep compatibility with
15361556 Python 2/3 code bases, the module's removal is currently not scheduled.
0 commit comments