diff options
| author | Brett Cannon <brett@python.org> | 2013-06-14 19:02:34 -0400 |
|---|---|---|
| committer | Brett Cannon <brett@python.org> | 2013-06-14 19:02:34 -0400 |
| commit | 05a647deedd11c227619f9463920526471db54f1 (patch) | |
| tree | 0b7ac3a4d54cbd4fc5065484104385c61ef56fd9 /Lib/imp.py | |
| parent | 4d7056258b07df7cbb1b9b44e7a1a9bad04f7454 (diff) | |
| download | cpython-git-05a647deedd11c227619f9463920526471db54f1.tar.gz | |
Issue #18192: Introduce importlib.util.MAGIC_NUMBER and document the
deprecation of imp.get_magic().
Diffstat (limited to 'Lib/imp.py')
| -rw-r--r-- | Lib/imp.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/Lib/imp.py b/Lib/imp.py index ad0fd6a478..e06fbe64c2 100644 --- a/Lib/imp.py +++ b/Lib/imp.py @@ -23,6 +23,7 @@ from importlib._bootstrap import cache_from_source, source_from_cache from importlib import _bootstrap from importlib import machinery +from importlib import util import importlib import os import sys @@ -44,8 +45,11 @@ IMP_HOOK = 9 def get_magic(): - """Return the magic number for .pyc or .pyo files.""" - return _bootstrap._MAGIC_BYTES + """**DEPRECATED** + + Return the magic number for .pyc or .pyo files. + """ + return util.MAGIC_NUMBER def get_tag(): |
