[Python-checkins] cpython (merge 3.2 -> 3.2): merge from push conflict.
senthil.kumaran
python-checkins at python.org
Wed Apr 13 03:43:49 CEST 2011
http://hg.python.org/cpython/rev/104429122abb
changeset: 69307:104429122abb
branch: 3.2
parent: 69304:35388341060d
parent: 69297:27eda70c25b1
user: Senthil Kumaran <orsenthil at gmail.com>
date: Wed Apr 13 09:39:35 2011 +0800
summary:
merge from push conflict.
files:
Lib/idlelib/EditorWindow.py | 11 +++++++++++
Misc/NEWS | 6 ++++++
2 files changed, 17 insertions(+), 0 deletions(-)
diff --git a/Lib/idlelib/EditorWindow.py b/Lib/idlelib/EditorWindow.py
--- a/Lib/idlelib/EditorWindow.py
+++ b/Lib/idlelib/EditorWindow.py
@@ -50,6 +50,17 @@
path = module.__path__
except AttributeError:
raise ImportError('No source for module ' + module.__name__)
+ if descr[2] != imp.PY_SOURCE:
+ # If all of the above fails and didn't raise an exception,fallback
+ # to a straight import which can find __init__.py in a package.
+ m = __import__(fullname)
+ try:
+ filename = m.__file__
+ except AttributeError:
+ pass
+ else:
+ file = None
+ descr = os.path.splitext(filename), None, imp.PY_SOURCE
return file, filename, descr
class EditorWindow(object):
diff --git a/Misc/NEWS b/Misc/NEWS
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -227,6 +227,12 @@
- Issue #11268: Prevent Mac OS X Installer failure if Documentation
package had previously been installed.
+IDLE
+----
+
+- Issue #11718: IDLE's open module dialog couldn't find the __init__.py
+ file in a package.
+
Tools/Demos
-----------
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list