mirror of
https://github.com/python/cpython.git
synced 2025-11-24 20:30:18 +00:00
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.
This commit is contained in:
parent
810c64df8f
commit
cb66eb0dec
17 changed files with 160 additions and 69 deletions
|
|
@ -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()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue