Mercurial > cpython-lru_cache-weakref
comparison Python/Python-ast.c @ 78758:ca4bf8e10bc0
Issue #15316: Let exceptions raised during imports triggered by the
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.
| author | Brett Cannon <brett@python.org> |
|---|---|
| date | Fri, 24 Aug 2012 18:25:59 -0400 |
| parents | 85cccc38d01c |
| children | ffb2fa900cb7 |
comparison
equal
deleted
inserted
replaced
| 78757:249f8c232a30 | 78758:ca4bf8e10bc0 |
|---|
