summaryrefslogtreecommitdiff
path: root/Lib/importlib/machinery.py
diff options
context:
space:
mode:
authorBrett Cannon <brett@python.org>2012-05-11 12:58:42 -0400
committerBrett Cannon <brett@python.org>2012-05-11 12:58:42 -0400
commitcb66eb0deca1d5cd232f97c76a215ecaab958d30 (patch)
treef38497a2e61cf8be225c4e7394961703cea5f66c /Lib/importlib/machinery.py
parent810c64df8f8bf70a2cb7a626004185616cb88213 (diff)
downloadcpython-git-cb66eb0deca1d5cd232f97c76a215ecaab958d30.tar.gz
Issue #13959: Deprecate imp.get_suffixes() for new attributes on
importlib.machinery that provide the suffix details for import. The attributes were not put on imp so as to compartmentalize everything importlib needs for setting up imports in importlib.machinery. This also led to an indirect deprecation of inspect.getmoduleinfo() as it directly returned imp.get_suffix's returned tuple which no longer makes sense.
Diffstat (limited to 'Lib/importlib/machinery.py')
-rw-r--r--Lib/importlib/machinery.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/Lib/importlib/machinery.py b/Lib/importlib/machinery.py
index 07465ced68..d5e7250479 100644
--- a/Lib/importlib/machinery.py
+++ b/Lib/importlib/machinery.py
@@ -1,5 +1,9 @@
"""The machinery of importlib: finders, loaders, hooks, etc."""
+import _imp
+
+from ._bootstrap import (SOURCE_SUFFIXES, DEBUG_BYTECODE_SUFFIXES,
+ OPTIMIZED_BYTECODE_SUFFIXES, BYTECODE_SUFFIXES)
from ._bootstrap import BuiltinImporter
from ._bootstrap import FrozenImporter
from ._bootstrap import PathFinder
@@ -7,3 +11,5 @@ from ._bootstrap import FileFinder
from ._bootstrap import SourceFileLoader
from ._bootstrap import SourcelessFileLoader
from ._bootstrap import ExtensionFileLoader
+
+EXTENSION_SUFFIXES = _imp.extension_suffixes()