mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
Close #15387: inspect.getmodulename() now uses a new importlib.machinery.all_suffixes() API rather than the deprecated inspect.getmoduleinfo()
This commit is contained in:
parent
90db661b43
commit
76e077001d
5 changed files with 40 additions and 6 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue