Issue1672800
Created on 2007-03-03.03:06:25 by pjenvey, last changed 2007-03-09.17:23:38 by cgroves.
msg2675 (view) |
Author: Philip Jenvey (pjenvey) |
Date: 2007-03-03.03:06:25 |
|
Attempting to pass a None globals object to __import__ raises an error.
This is commonly done when you only want to specify one of the last arguments (like fromlist), and don't bother specifying globals (or locals), e.g.:
__import__('mypackage.mymodule', None, None, ['mymodule'])
Tests are also attached. Without the fix, the following is raised by the new test:
======================================================================
ERROR: testImpWrapperNoContext (__main__.ImportHooksTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/beans/home/pjenvey/src/java/jython-2.3/dist/Lib/unittest.py", line 229, in __call__
File "test_importhooks.py", line 208, in testImpWrapperNoContext
File "test_importhooks.py", line 201, in doTestImpWrapper
AttributeError: __getitem__
|
msg2676 (view) |
Author: Charlie Groves (cgroves) |
Date: 2007-03-09.17:23:38 |
|
committed in r3136 on trunk.
|
|
Date |
User |
Action |
Args |
2007-03-03 03:06:25 | pjenvey | create | |
|