mirror of
https://github.com/python/cpython.git
synced 2025-10-27 19:54:38 +00:00
Issue #20763: Fix importlib.machinery.PathFinder to support
PathEntryFinder instances which only define find_module(). Reported by Yukihiro Nakadaira.
This commit is contained in:
parent
d44cebb0f5
commit
26dd0ff075
3 changed files with 26 additions and 2 deletions
|
|
@ -1869,7 +1869,7 @@ def _legacy_get_spec(cls, fullname, finder):
|
|||
loader, portions = finder.find_loader(fullname)
|
||||
else:
|
||||
loader = finder.find_module(fullname)
|
||||
portions = None
|
||||
portions = []
|
||||
if loader is not None:
|
||||
return spec_from_loader(fullname, loader)
|
||||
spec = ModuleSpec(fullname, None)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue