Commit Graph

11 Commits

Author SHA1 Message Date
Brett Cannon 327992330e Issue #17099: Have importlib.find_loader() raise ValueError when
__loader__ is not set on a module. This brings the exception in line
with when __loader__ is None (which is equivalent to not having the
attribute defined).
2013-03-13 11:09:08 -07:00
Brett Cannon c0b631c0c4 merge w/ 3.3 2013-02-03 16:16:44 -05:00
Brett Cannon 7a34f02f9e Way too many places create modules temporarily that never set
__loader__ for this test to succeed without a major changes. It also
doesn't test the original issue of modules imported by Py_Initialize()
having __loader__ set (the rest of the test covers that).
2013-02-03 16:16:07 -05:00
Brett Cannon df80914a1e merge 2013-02-03 11:38:16 -05:00
Brett Cannon 9de80ac127 pyexpat/xml.parsers.expat create their errors and model modules from
scratch. This means they do not set __loader__ by default. This is
acceptable under importlib/PEP 302 definitions, so relax the test that
was trying to apply this universally.
2013-02-03 11:37:13 -05:00
Brett Cannon 85ae3566d1 Merge w/ 3.3 more fixes thanks to issue #17098 2013-02-01 16:36:29 -05:00
Brett Cannon da9cf0eef8 Issue #17098: Be more stringent of setting __loader__ on early imported
modules. Also made test more rigorous.
2013-02-01 15:31:49 -05:00
Brett Cannon f41fa4f3a0 merge with 3.3 2013-02-01 14:51:43 -05:00
Brett Cannon e7387b4708 Add a test for fix of issue #17098 2013-02-01 14:43:59 -05: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
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