mirror of
https://github.com/python/cpython.git
synced 2025-08-22 17:55:18 +00:00
bpo-41006: importlib.util no longer imports typing (GH-20938)
Create importlib._abc submodule to avoid importing typing when importlib.util is imported. Move Loader ABC into importlib._abc.
This commit is contained in:
parent
236a0f5cf0
commit
9e09849d20
4 changed files with 55 additions and 51 deletions
|
@ -1,5 +1,5 @@
|
|||
"""Utility code for constructing importers, etc."""
|
||||
from . import abc
|
||||
from ._abc import Loader
|
||||
from ._bootstrap import module_from_spec
|
||||
from ._bootstrap import _resolve_name
|
||||
from ._bootstrap import spec_from_loader
|
||||
|
@ -263,7 +263,7 @@ class _LazyModule(types.ModuleType):
|
|||
delattr(self, attr)
|
||||
|
||||
|
||||
class LazyLoader(abc.Loader):
|
||||
class LazyLoader(Loader):
|
||||
|
||||
"""A loader that creates a module which defers loading until attribute access."""
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue