Message2675
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__ |
|
| Date |
User |
Action |
Args |
| 2008-02-20 17:18:40 | admin | link | issue1672800 messages |
| 2008-02-20 17:18:40 | admin | create | |
|