Issue495604

classification
Title: imp.find_module fails when None is 2 arg
Type: Severity: normal
Components: Library Versions:
Milestone:
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: bckfnn Nosy List: bckfnn, bzimmer
Priority: normal Keywords:

Created on 2001-12-20.20:53:44 by bzimmer, last changed 2001-12-27.15:22:17 by bckfnn.

Messages
msg540 (view) Author: Brian Zimmer (bzimmer) Date: 2001-12-20.20:53:44
According to Python documentation, if the second 
argument is None the value of sys.path should be 
used.  This fails in Jython.

$ python
Python 2.1 (#15, Apr 16 2001, 18:25:49) [MSC 32 bit 
(Intel)] on win32
Type "copyright", "credits" or "license" for more 
information.
>>> import imp
>>> m = imp.find_module("re", None)
>>>

$ jython
Jython 2.1b2 on java1.3.1 (JIT: null)
Type "copyright", "credits" or "license" for more 
information.
>>> import imp
>>> m = imp.find_module("re", None)
Traceback (innermost last):
  File "<console>", line 1, in ?
AttributeError: __getitem__
>>>


testcase:

import imp
imp.find_module("re", None)
msg541 (view) Author: Finn Bock (bckfnn) Date: 2001-12-27.11:49:43
Logged In: YES 
user_id=4201

Added as test353.py
msg542 (view) Author: Finn Bock (bckfnn) Date: 2001-12-27.15:22:17
Logged In: YES 
user_id=4201

Fixed in imp.java: 2.6;
History
Date User Action Args
2001-12-20 20:53:44bzimmercreate