Issue #17177: The imp module is pending deprecation.

To make sure there is no issue with code that is both Python 2 and 3
compatible, there are no plans to remove the module any sooner than
Python 4 (unless the community moves to Python 3 solidly before then).
This commit is contained in:
Brett Cannon 2013-06-16 13:13:40 -04:00
parent 39295e7a55
commit e4f41deccf
15 changed files with 103 additions and 85 deletions

View file

@ -2,7 +2,7 @@
================================================================
.. deprecated:: 3.4
The :mod:`imp` package has been deprecated in favor of :mod:`importlib`.
The :mod:`imp` package is pending deprecation in favor of :mod:`importlib`.
.. module:: imp
:synopsis: Access the implementation of the import statement.
@ -232,7 +232,7 @@ file paths.
Return the :pep:`3147` magic tag string matching this version of Python's
magic number, as returned by :func:`get_magic`.
.. note::
.. deprecated:: 3.4
You may use :attr:`sys.implementation.cache_tag` directly starting
in Python 3.3.
@ -355,6 +355,9 @@ to indicate the search result of :func:`find_module`.
``None`` is inserted into ``sys.path_importer_cache`` instead of an
instance of :class:`NullImporter`.
.. deprecated:: 3.4
Insert ``None`` into ``sys.path_importer_cache`` instead.
.. _examples-imp:

View file

@ -230,6 +230,9 @@ Deprecated Python modules, functions and methods
:meth:`importlib.abc.Loader.init_module_attrs` allows subclasses of a loader
to more easily customize module loading.
* The :mod:`imp` module is pending deprecation. To keep compatibility with
Python 2/3 code bases, the module's removal is currently not scheduled.
Deprecated functions and types of the C API
-------------------------------------------