summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNed Deily <nad@acm.org>2011-01-15 04:37:12 (GMT)
committerNed Deily <nad@acm.org>2011-01-15 04:37:12 (GMT)
commit4ce92b23fe968a6866f89e31f4bfd4585c0cead2 (patch)
treeebed0af100168b7caa6bafb9c93566b1478575ab
parentc5982967fc25985699888e04a9a7e35ff7b7372a (diff)
downloadcpython-4ce92b23fe968a6866f89e31f4bfd4585c0cead2.zip
cpython-4ce92b23fe968a6866f89e31f4bfd4585c0cead2.tar.gz
cpython-4ce92b23fe968a6866f89e31f4bfd4585c0cead2.tar.bz2
#10907: Warn OS X 10.6 IDLE users to use ActiveState Tcl/Tk 8.5,
rather than the currently problematic Apple-supplied one, when running with the 64-/32-bit installer variant.
-rw-r--r--Lib/idlelib/PyShell.py7
-rw-r--r--Lib/idlelib/macosxSupport.py17
-rw-r--r--Mac/BuildScript/resources/ReadMe.txt47
-rw-r--r--Mac/BuildScript/resources/Welcome.rtf28
-rw-r--r--Misc/NEWS4
5 files changed, 77 insertions, 26 deletions
diff --git a/Lib/idlelib/PyShell.py b/Lib/idlelib/PyShell.py
index 429ba2e..06c8bba 100644
--- a/Lib/idlelib/PyShell.py
+++ b/Lib/idlelib/PyShell.py
@@ -1417,6 +1417,13 @@ def main():
shell.interp.prepend_syspath(script)
shell.interp.execfile(script)
+ # Check for problematic OS X Tk versions and print a warning message
+ # in the IDLE shell window; this is less intrusive than always opening
+ # a separate window.
+ tkversionwarning = macosxSupport.tkVersionWarning(root)
+ if tkversionwarning:
+ shell.interp.runcommand(''.join(("print('", tkversionwarning, "')")))
+
root.mainloop()
root.destroy()
diff --git a/Lib/idlelib/macosxSupport.py b/Lib/idlelib/macosxSupport.py
index 4b365af..30dd1e1 100644
--- a/Lib/idlelib/macosxSupport.py
+++ b/Lib/idlelib/macosxSupport.py
@@ -34,6 +34,23 @@ def isCarbonAquaTk(root):
'AppKit' not in root.tk.call('winfo', 'server', '.'))
return _carbonaquatk
+def tkVersionWarning(root):
+ """
+ Returns a string warning message if the Tk version in use appears to
+ be one known to cause problems with IDLE. The Apple Cocoa-based Tk 8.5
+ that was shipped with Mac OS X 10.6.
+ """
+
+ if (runningAsOSXApp() and
+ ('AppKit' in root.tk.call('winfo', 'server', '.')) and
+ (root.tk.call('info', 'patchlevel') == '8.5.7') ):
+ return (r"WARNING: The version of Tcl/Tk (8.5.7) in use may"
+ r" be unstable.\n"
+ r"Visit http://www.python.org/download/mac/tcltk/"
+ r" for current information.")
+ else:
+ return False
+
def addOpenEventSupport(root, flist):
"""
This ensures that the application will respont to open AppleEvents, which
diff --git a/Mac/BuildScript/resources/ReadMe.txt b/Mac/BuildScript/resources/ReadMe.txt
index 67d4525..761cffb 100644
--- a/Mac/BuildScript/resources/ReadMe.txt
+++ b/Mac/BuildScript/resources/ReadMe.txt
@@ -1,29 +1,36 @@
This package will install Python $FULL_VERSION for Mac OS X
-$MACOSX_DEPLOYMENT_TARGET for the following
-architecture(s): $ARCHITECTURES.
+$MACOSX_DEPLOYMENT_TARGET for the following architecture(s):
+$ARCHITECTURES.
-Separate installers are available for older versions
-of Mac OS X, see the homepage, below.
+Installation requires approximately $INSTALL_SIZE MB of disk space,
+ignore the message that it will take zero bytes.
-Installation requires approximately $INSTALL_SIZE MB of disk
-space, ignore the message that it will take zero bytes.
+You must install onto your current boot disk, even though the
+installer does not enforce this, otherwise things will not work.
-You must install onto your current boot disk, even
-though the installer does not enforce this, otherwise
-things will not work.
+Python consists of the Python programming language interpreter, plus
+a set of programs to allow easy access to it for Mac users including
+an integrated development environment, IDLE, plus a set of pre-built
+extension modules that open up specific Macintosh technologies to
+Python programs.
-Python consists of the Python programming language
-interpreter, plus a set of programs to allow easy
-access to it for Mac users including an integrated development
-environment, IDLE, plus a set of pre-built extension modules
-that open up specific Macintosh technologies to Python programs.
+ **** IMPORTANT ****
+
+Before using IDLE or other programs using the tkinter graphical user
+interface toolkit, visit http://www.python.org/download/mac/tcltk/
+for current information about supported and recommended versions
+of Tcl/Tk for this version of Python and Mac OS X.
-The installer puts the applications in "Python $VERSION"
-in your Applications folder, and the underlying machinery in
-$PYTHONFRAMEWORKINSTALLDIR. It can optionally place
-links to the command-line tools in /usr/local as well,
-by default you have to add the "bin" directory inside
-the framework to you shell's search path.
+ *******************
+
+The installer puts applications, an "Update Shell Profile" command,
+and an Extras folder containing demo programs and tools into the
+"Python $VERSION" subfolder of the system Applications folder,
+and puts the underlying machinery into the folder
+$PYTHONFRAMEWORKINSTALLDIR. It can
+optionally place links to the command-line tools in /usr/local/bin as
+well. Double-click on the "Update Shell Profile" command to add the
+"bin" directory inside the framework to your shell's search path.
More information on Python in general can be found at
http://www.python.org.
diff --git a/Mac/BuildScript/resources/Welcome.rtf b/Mac/BuildScript/resources/Welcome.rtf
index ed4643b..d209b10 100644
--- a/Mac/BuildScript/resources/Welcome.rtf
+++ b/Mac/BuildScript/resources/Welcome.rtf
@@ -1,19 +1,35 @@
-{\rtf1\ansi\ansicpg1252\cocoartf949\cocoasubrtf430
+{\rtf1\ansi\ansicpg1252\cocoartf1038\cocoasubrtf350
{\fonttbl\f0\fswiss\fcharset0 Helvetica;}
{\colortbl;\red255\green255\blue255;}
-\paperw11900\paperh16840\margl1440\margr1440\vieww9920\viewh10660\viewkind0
+\paperw11904\paperh16836\margl1440\margr1440\vieww9640\viewh10620\viewkind0
\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural
\f0\fs24 \cf0 This package will install
-\b MacPython $FULL_VERSION
+\b Python $FULL_VERSION
\b0 for
\b Mac OS X $MACOSX_DEPLOYMENT_TARGET
\b0 .\
\
-MacPython consists of the Python programming language interpreter, plus a set of programs to allow easy access to it for Mac users including an integrated development environment \b IDLE\b0 plus a set of pre-built extension modules that open up specific Macintosh technologies to Python programs.\
+
+\b Python for Mac OS X
+\b0 consists of the Python programming language interpreter, plus a set of programs to allow easy access to it for Mac OS X users including an integrated development environment
+\b IDLE
+\b0 and a set of pre-built extension modules that open up specific Macintosh technologies to Python programs.\
\
-See the ReadMe file for more information.\
+See the ReadMe file and the Python documentation for more information.\
\
\b NOTE:
-\b0 This package will by default not update your shell profile and will also not install files in /usr/local. Double-click \b Update Shell Profile\b0 at any time to make $FULL_VERSION the default Python.}
+\b0 This package will by default not update your shell profile and will also not install files in /usr/local. Double-click
+\b Update Shell Profile
+\b0 at any time to make $FULL_VERSION the default Python.\
+\
+
+\b IMPORTANT:
+\b0
+\b IDLE
+\b0 and other programs using the
+\b tkinter
+\b0 graphical user interface toolkit require specific versions of the
+\b Tcl/Tk
+\b0 platform independent windowing toolkit. Visit {\field{\*\fldinst{HYPERLINK "http://www.python.org/download/mac/tcltk/"}}{\fldrslt http://www.python.org/download/mac/tcltk/}} for current information on supported and recommended versions of Tcl/Tk for this version of Python and Mac OS X.} \ No newline at end of file
diff --git a/Misc/NEWS b/Misc/NEWS
index bf2ec0e..c84efe1 100644
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -43,6 +43,10 @@ Core and Builtins
Library
-------
+- Issue #10907: Warn OS X 10.6 IDLE users to use ActiveState Tcl/Tk 8.5,
+ rather than the currently problematic Apple-supplied one, when running
+ with the 64-/32-bit installer variant.
+
- Issue #4953: cgi.FieldStorage and cgi.parse() parse the request as bytes, not
as unicode, and accept binary files. Add encoding and errors attributes to
cgi.FieldStorage. Patch written by Pierre Quentel (with many inputs by Glenn