mirror of https://github.com/python/cpython
12c6bda4f0
fromlist of __import__ propagate. The problem previously was that if something listed in fromlist didn't exist then that's okay. The fix for that was too broad in terms of catching ImportError. The trick with the solution to this issue is that the proper refactoring of import thanks to importlib doesn't allow for a way to distinguish (portably) between an ImportError because finders couldn't find a loader, or a loader raised the exception. In Python 3.4 the hope is to introduce a new exception (e.g. ModuleNotFound) to make it clean to differentiate why ImportError was raised. |
||
---|---|---|
.. | ||
__init__.py | ||
test___package__.py | ||
test_api.py | ||
test_caching.py | ||
test_fromlist.py | ||
test_meta_path.py | ||
test_packages.py | ||
test_path.py | ||
test_relative_imports.py | ||
util.py |