Close #15387: inspect.getmodulename() now uses a new importlib.machinery.all_suffixes() API rather than the deprecated inspect.getmoduleinfo()

This commit is contained in:
Nick Coghlan 2012-07-18 23:14:57 +10:00
parent 90db661b43
commit 76e077001d
5 changed files with 40 additions and 6 deletions

View file

@ -13,3 +13,7 @@ from ._bootstrap import SourcelessFileLoader
from ._bootstrap import ExtensionFileLoader
EXTENSION_SUFFIXES = _imp.extension_suffixes()
def all_suffixes():
"""Returns a list of all recognized module suffixes for this process"""
return SOURCE_SUFFIXES + BYTECODE_SUFFIXES + EXTENSION_SUFFIXES