summaryrefslogtreecommitdiffstats
path: root/Lib/pyclbr.py
diff options
context:
space:
mode:
authorEric Snow <ericsnowcurrently@gmail.com>2014-01-25 22:32:46 (GMT)
committerEric Snow <ericsnowcurrently@gmail.com>2014-01-25 22:32:46 (GMT)
commit6029e086911be873b2ebacb933e3df08c23084e4 (patch)
treed91555f72eacd791ecf1bdd9d169bf82ea28a49d /Lib/pyclbr.py
parent128ee220e21bd4e7eb152396ff24d879f38c5d91 (diff)
downloadcpython-6029e086911be873b2ebacb933e3df08c23084e4.zip
cpython-6029e086911be873b2ebacb933e3df08c23084e4.tar.gz
cpython-6029e086911be873b2ebacb933e3df08c23084e4.tar.bz2
Issue 19944: Fix importlib.find_spec() so it imports parents as needed.
The function is also moved to importlib.util.
Diffstat (limited to 'Lib/pyclbr.py')
-rw-r--r--Lib/pyclbr.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/pyclbr.py b/Lib/pyclbr.py
index a8d2b1f..dd58ada 100644
--- a/Lib/pyclbr.py
+++ b/Lib/pyclbr.py
@@ -42,7 +42,7 @@ Instances of this class have the following instance variables:
import io
import os
import sys
-import importlib
+import importlib.util
import tokenize
from token import NAME, DEDENT, OP
from operator import itemgetter
@@ -141,7 +141,7 @@ def _readmodule(module, path, inpackage=None):
else:
search_path = path + sys.path
# XXX This will change once issue19944 lands.
- spec = importlib.find_spec(fullmodule, search_path)
+ spec = importlib.util._find_spec_from_path(fullmodule, search_path)
fname = spec.loader.get_filename(fullmodule)
_modules[fullmodule] = dict
if spec.loader.is_package(fullmodule):