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
c57f9f9419
Merge from 3.3 for fix for issue #16730
2013-01-11 15:42:30 -05:00
Brett Cannon
a9976b3e32
Issue #16730 : Don't raise an exception in
...
importlib.machinery.FileFinder when the directory has become
unreadable or a file. This brings semantics in line with Python 3.2
import.
Reported and diagnosed by David Pritchard.
2013-01-11 15:40:12 -05:00
Serhiy Storchaka
a29159b075
Issue #16793 . Replace deprecated unittest asserts with modern counterparts.
2012-12-28 00:34:57 +02:00
Andrew Svetlov
f7a17b48d7
Replace IOError with OSError ( #16715 )
2012-12-25 16:47:37 +02:00
Eric Snow
a6cfb28bd2
Issue #15627 : This is simply an update to the name of a new method recently added
...
to importlib.abc.SourceLoader.
2012-12-04 23:43:43 -08:00
Barry Warsaw
dd61c3ba7e
Do a better job of preserving the state of sys.modules.
2012-11-20 17:10:39 -05:00
Barry Warsaw
ed843b5e5c
Do a better job of preserving the state of sys.modules.
2012-11-20 17:10:10 -05:00
Barry Warsaw
b72c10996e
- Issue #16514 : Fix regression causing a traceback when sys.path[0] is None
...
(actually, any non-string or non-bytes type).
2012-11-20 15:35:27 -05:00
Barry Warsaw
82c1c781c7
- Issue #16514 : Fix regression causing a traceback when sys.path[0] is None
...
(actually, any non-string or non-bytes type).
2012-11-20 15:22:51 -05:00
Brett Cannon
5650e4f41c
Issue #15627 : Add the compile_source() method to
...
importlib.abc.SourceLoader.
This provides an easy hook into the import system to allow for source
transformations, AST optimizations, etc.
2012-11-18 10:03:31 -05:00
Andrew Svetlov
90a654b1dd
Issue #15641 : Clean up deprecated classes from importlib
...
Patch by Taras Lyapun.
2012-11-05 09:34:46 +02:00
Nadeem Vawda
6d70870812
Clean up some warnings in test suite output.
2012-10-14 01:42:32 +02:00
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