diff options
author | Brett Cannon <brett@python.org> | 2012-05-11 16:58:42 (GMT) |
---|---|---|
committer | Brett Cannon <brett@python.org> | 2012-05-11 16:58:42 (GMT) |
commit | cb66eb0deca1d5cd232f97c76a215ecaab958d30 (patch) | |
tree | f38497a2e61cf8be225c4e7394961703cea5f66c /Lib/modulefinder.py | |
parent | 810c64df8f8bf70a2cb7a626004185616cb88213 (diff) | |
download | cpython-cb66eb0deca1d5cd232f97c76a215ecaab958d30.zip cpython-cb66eb0deca1d5cd232f97c76a215ecaab958d30.tar.gz cpython-cb66eb0deca1d5cd232f97c76a215ecaab958d30.tar.bz2 |
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/modulefinder.py')
-rw-r--r-- | Lib/modulefinder.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Lib/modulefinder.py b/Lib/modulefinder.py index c0910aa..683e305 100644 --- a/Lib/modulefinder.py +++ b/Lib/modulefinder.py @@ -222,8 +222,9 @@ class ModuleFinder: # But we must also collect Python extension modules - although # we cannot separate normal dlls from Python extensions. suffixes = [] - for triple in imp.get_suffixes(): - suffixes.append(triple[0]) + suffixes += importlib.machinery.EXTENSION_SUFFIXES[:] + suffixes += importlib.machinery.SOURCE_SUFFIXES[:] + suffixes += importlib.machinery.BYTECODE_SUFFIXES[:] for dir in m.__path__: try: names = os.listdir(dir) |