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:
Victor Stinner 2020-06-17 23:15:59 +02:00 committed by GitHub
parent 236a0f5cf0
commit 9e09849d20
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 55 additions and 51 deletions

View file

@ -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."""