Issue 19944: Fix importlib.find_spec() so it imports parents as needed.

The function is also moved to importlib.util.
This commit is contained in:
Eric Snow 2014-01-25 15:32:46 -07:00
parent 128ee220e2
commit 6029e08691
11 changed files with 292 additions and 230 deletions

View file

@ -611,7 +611,7 @@ def get_data(package, resource):
which does not support get_data(), then None is returned.
"""
spec = importlib.find_spec(package)
spec = importlib.util.find_spec(package)
if spec is None:
return None
loader = spec.loader