diff options
author | R David Murray <rdmurray@bitdance.com> | 2014-02-02 16:32:31 (GMT) |
---|---|---|
committer | R David Murray <rdmurray@bitdance.com> | 2014-02-02 16:32:31 (GMT) |
commit | 900aeb722112da02d0ae3d7087115f500db4408b (patch) | |
tree | 6ebed3532ae8c3fad8a29e195afc76d5ede16d90 | |
parent | 4885f49e7fcef35ad25c50f4c6876c56e2a9f545 (diff) | |
download | cpython-900aeb722112da02d0ae3d7087115f500db4408b.zip cpython-900aeb722112da02d0ae3d7087115f500db4408b.tar.gz cpython-900aeb722112da02d0ae3d7087115f500db4408b.tar.bz2 |
whatsnew: some more importlib replacements for imp functions.
get_magic->util.MAGIC_NUMBER, source_from_cache, and cache_from_source.
-rw-r--r-- | Doc/whatsnew/3.4.rst | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/Doc/whatsnew/3.4.rst b/Doc/whatsnew/3.4.rst index 4417f74..1d285fe 100644 --- a/Doc/whatsnew/3.4.rst +++ b/Doc/whatsnew/3.4.rst @@ -761,7 +761,6 @@ This extended error description will be formatted using the of the error response. (Contributed by Karl Cow in :issue:`12921`.) - importlib --------- @@ -780,11 +779,20 @@ The :func:`~importlib.reload` function has been moved from :mod:`imp` to :mod:`importlib` as part of the :mod:`imp` module deprecation. (Contributed by Berker Peksag in :issue:`18193`.) +:mod:`importlib.util` now has a :data:`~importlib.util.MAGIC_NUMBER` attribute +providing access to the bytecode version number. This replaces the +:func:`~imp.get_magic` function in the deprecated :mod:`imp` module. +(Contributed by Brett Cannon in :issue:`18192`.) + +New :mod:`importlib.util` functions :func:`~importlib.util.cache_from_source` +and :func:`~importlib.util.source_from_cache` replace the same-named functions +in the deprecated :mod:`imp` module. (Contributed by Brett Cannon in +:issue:`18194`.) + inspect ------- - The inspect module now offers a basic :ref:`command line interface <inspect-module-cli>` to quickly display source code and other information for modules, classes and functions. (Contributed by Claudiu Popa |