This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author terry.reedy
Recipients brett.cannon, kbk, roger.serwy, terry.reedy
Date 2013-05-25.21:58:07
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1369519087.94.0.0998980125266.issue18055@psf.upfronthosting.co.za>
In-reply-to
Content
(Roger, please see Bretts opening message.)
Brett, thanks for asking. We prefer to keep active codebases in sync as much as possible. Since new import stuff is not in 2.7, we will have to skip that.

In EditorWindow.py, the patch deletes the _find_module function that wraps imp.find_module and edits the EditorWindows class open_module method that used that method. I presume that the new code somewhere duplicates the extra work done in _find_module beyond that done by imp.find_module. I verified that these are the only idlelib/*.py occurrences of 'find_module' and '_find_module'. It applies to 3.3 with chunk 3 offset a line.

The only use of open_module is its binding to File / Open Module (Alt-M). This opens a module, given by its dotted import name, in the editor, instead of importing it. This works for stdlib modules before and after the patch. I tried both text selection and keyboard entry.

As noted in the code, and explained in #18064, open_module does not work for 'current directory' modules. (A fix for that issue should wait for this one.)

I did not try anything exotic like a relative path (never used one, not sure of syntax), .pth (not used on current machine), or package directories. But I expect the new import code is more reliable for these. If there is a problem, people can always use the open dialog. So unless Roger sees something I missed, you have my green light to apply.
History
Date User Action Args
2013-05-25 21:58:07terry.reedysetrecipients: + terry.reedy, brett.cannon, kbk, roger.serwy
2013-05-25 21:58:07terry.reedysetmessageid: <1369519087.94.0.0998980125266.issue18055@psf.upfronthosting.co.za>
2013-05-25 21:58:07terry.reedylinkissue18055 messages
2013-05-25 21:58:07terry.reedycreate