File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -50,6 +50,17 @@ def _find_module(fullname, path=None):
5050 path = module .__path__
5151 except AttributeError :
5252 raise ImportError ('No source for module ' + module .__name__ )
53+ if descr [2 ] != imp .PY_SOURCE :
54+ # If all of the above fails and didn't raise an exception,fallback
55+ # to a straight import which can find __init__.py in a package.
56+ m = __import__ (fullname )
57+ try :
58+ filename = m .__file__
59+ except AttributeError :
60+ pass
61+ else :
62+ file = None
63+ descr = os .path .splitext (filename ), None , imp .PY_SOURCE
5364 return file , filename , descr
5465
5566class EditorWindow (object ):
Original file line number Diff line number Diff line change @@ -227,6 +227,12 @@ Build
227227- Issue #11268: Prevent Mac OS X Installer failure if Documentation
228228 package had previously been installed.
229229
230+ IDLE
231+ ----
232+
233+ - Issue #11718: IDLE's open module dialog couldn't find the __init__.py
234+ file in a package.
235+
230236Tools/Demos
231237-----------
232238
You can’t perform that action at this time.
0 commit comments