summaryrefslogtreecommitdiffstats
path: root/Lib/importlib/__init__.py
diff options
context:
space:
mode:
authorBrett Cannon <brett@python.org>2012-08-10 16:21:12 (GMT)
committerBrett Cannon <brett@python.org>2012-08-10 16:21:12 (GMT)
commitf4dc9204cc406ab41c2d643c1a64375a6a2954e5 (patch)
treec0cf92198b707bac6a68b801305ad86b24eb814f /Lib/importlib/__init__.py
parent2d6266d5f148549979df024459e29b73307b86c4 (diff)
downloadcpython-f4dc9204cc406ab41c2d643c1a64375a6a2954e5.zip
cpython-f4dc9204cc406ab41c2d643c1a64375a6a2954e5.tar.gz
cpython-f4dc9204cc406ab41c2d643c1a64375a6a2954e5.tar.bz2
Issue #15502: Finish bringing importlib.abc in line with the current
state of the import system. Also make importlib.invalidate_caches() work with sys.meta_path instead of sys.path_importer_cache to completely separate the path-based import system from the overall import system. Patch by Eric Snow.
Diffstat (limited to 'Lib/importlib/__init__.py')
-rw-r--r--Lib/importlib/__init__.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/Lib/importlib/__init__.py b/Lib/importlib/__init__.py
index d30691a..6f40dac 100644
--- a/Lib/importlib/__init__.py
+++ b/Lib/importlib/__init__.py
@@ -38,9 +38,9 @@ from ._bootstrap import __import__
def invalidate_caches():
- """Call the invalidate_caches() method on all finders stored in
- sys.path_importer_caches (where implemented)."""
- for finder in sys.path_importer_cache.values():
+ """Call the invalidate_caches() method on all meta path finders stored in
+ sys.meta_path (where implemented)."""
+ for finder in sys.meta_path:
if hasattr(finder, 'invalidate_caches'):
finder.invalidate_caches()