summaryrefslogtreecommitdiffstats
path: root/Lib/importlib/__init__.py
diff options
context:
space:
mode:
authorAntoine Pitrou <solipsis@pitrou.net>2012-02-20 00:48:16 (GMT)
committerAntoine Pitrou <solipsis@pitrou.net>2012-02-20 00:48:16 (GMT)
commitc541f8ef40634c379aab0e4537777203a910d355 (patch)
tree9b731dfbfc79f8c7ae11ec43d7f7914b4d32082b /Lib/importlib/__init__.py
parent336b2f45e5c1212470b1b443a92d953f026b951e (diff)
downloadcpython-c541f8ef40634c379aab0e4537777203a910d355.zip
cpython-c541f8ef40634c379aab0e4537777203a910d355.tar.gz
cpython-c541f8ef40634c379aab0e4537777203a910d355.tar.bz2
Issue #14043: Speed up importlib's _FileFinder by at least 8x, and add a new importlib.invalidate_caches() function.
importlib is now often faster than imp.find_module() at finding modules.
Diffstat (limited to 'Lib/importlib/__init__.py')
-rw-r--r--Lib/importlib/__init__.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/importlib/__init__.py b/Lib/importlib/__init__.py
index 940a9a2..50e9391 100644
--- a/Lib/importlib/__init__.py
+++ b/Lib/importlib/__init__.py
@@ -18,7 +18,7 @@ References on import:
http://www.python.org/dev/peps/pep-0328
"""
-__all__ = ['__import__', 'import_module']
+__all__ = ['__import__', 'import_module', 'invalidate_caches']
from . import _bootstrap
@@ -37,7 +37,7 @@ _bootstrap._setup(sys, imp)
# Public API #########################################################
-from ._bootstrap import __import__
+from ._bootstrap import __import__, invalidate_caches
def import_module(name, package=None):