summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
authorBrett Cannon <brett@python.org>2013-06-14 23:02:34 (GMT)
committerBrett Cannon <brett@python.org>2013-06-14 23:02:34 (GMT)
commit05a647deedd11c227619f9463920526471db54f1 (patch)
tree0b7ac3a4d54cbd4fc5065484104385c61ef56fd9 /Doc
parent4d7056258b07df7cbb1b9b44e7a1a9bad04f7454 (diff)
downloadcpython-05a647deedd11c227619f9463920526471db54f1.zip
cpython-05a647deedd11c227619f9463920526471db54f1.tar.gz
cpython-05a647deedd11c227619f9463920526471db54f1.tar.bz2
Issue #18192: Introduce importlib.util.MAGIC_NUMBER and document the
deprecation of imp.get_magic().
Diffstat (limited to 'Doc')
-rw-r--r--Doc/library/imp.rst3
-rw-r--r--Doc/library/importlib.rst7
2 files changed, 10 insertions, 0 deletions
diff --git a/Doc/library/imp.rst b/Doc/library/imp.rst
index 8a75d4c..890c171 100644
--- a/Doc/library/imp.rst
+++ b/Doc/library/imp.rst
@@ -21,6 +21,9 @@ This module provides an interface to the mechanisms used to implement the
Return the magic string value used to recognize byte-compiled code files
(:file:`.pyc` files). (This value may be different for each Python version.)
+ .. deprecated:: 3.4
+ Use :attr:`importlib.util.MAGIC_NUMBER` instead.
+
.. function:: get_suffixes()
diff --git a/Doc/library/importlib.rst b/Doc/library/importlib.rst
index 0caabaa..e9b7717 100644
--- a/Doc/library/importlib.rst
+++ b/Doc/library/importlib.rst
@@ -879,6 +879,13 @@ find and load modules.
This module contains the various objects that help in the construction of
an :term:`importer`.
+.. attribute:: MAGIC_NUMBER
+
+ The bytes which represent the bytecode version number. If you need help with
+ loading/writing bytecode then consider :class:`importlib.abc.SourceLoader`.
+
+ .. versionadded:: 3.4
+
.. function:: resolve_name(name, package)
Resolve a relative module name to an absolute one.