Commit Graph

12 Commits

Author SHA1 Message Date
Brett Cannon a6ce4fd426 Closes issue #15111: Calling __import__ with a module specified in
fromlist which causes its own ImportError (e.g. the module tries to
import a non-existent module) should have that exception propagate.
2012-10-10 19:03:46 -04:00
Antoine Pitrou 5b9eccb383 Issue #15794: Relax a test case due to the deadlock detection's conservativeness. 2012-08-28 20:10:18 +02:00
Brett Cannon 12c6bda4f0 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.
2012-08-24 18:25:59 -04:00
Nick Coghlan 48fec05391 Close #14846: Handle a sys.path entry going away 2012-08-20 13:18:15 +10:00
Brett Cannon ac9f2f3de3 Issue #15576: Allow extension modules to be a package's __init__
module again. Also took the opportunity to stop accidentally exporting
_imp.extension_suffixes() as public.
2012-08-10 13:47:54 -04:00
Brett Cannon f4dc9204cc 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.
2012-08-10 12:21:12 -04:00
Nick Coghlan ff79486bb5 Close #15519: Properly expose WindowsRegistryFinder in importlib and bring the name into line with normal import terminology. Original patch by Eric Snow 2012-08-02 21:45:24 +10:00
Nick Coghlan 8a9080feff Issue #15502: Bring the importlib ABCs into line with the current state of the import protocols given PEP 420. Original patch by Eric Snow. 2012-08-02 21:26:03 +10:00
Barry Warsaw 0efcf99c9e abc fixes. 2012-07-31 17:52:32 -04:00
Brett Cannon 636601dfba Remove a relative import that escaped test.test_importlib. 2012-07-21 09:54:58 -04:00
Brett Cannon d382bfc921 Move importlib.test.benchmark to Tools/importbench to make it more
visible and to place it with other micro-benchmarks (e.g.
stringbench).
2012-07-20 14:54:53 -04:00
Brett Cannon 45a5e3afe5 Issue #15168: Move importlb.test to test.test_importlib.
This should make the Linux distros happy as it is now easier to leave
importlib's tests out of their base Python distribution.
2012-07-20 14:48:53 -04:00