Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit c556c64

Browse files
committed
Issue #14018: Update the OS X IDLE Tcl/Tk warning check to include
the Apple-supplied Tck/Tk versions shipped with OS X 10.7 and 10.8. They are not as buggy as the 10.6 version but can still easily crash.
1 parent 8f328d0 commit c556c64

2 files changed

Lines changed: 14 additions & 6 deletions

File tree

Lib/idlelib/NEWS.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,10 @@ What's New in IDLE 3.2.4?
1818
- Issue #14937: Perform auto-completion of filenames in strings even for
1919
non-ASCII filenames. Likewise for identifiers.
2020

21+
- Issue #14018: Update checks for unstable system Tcl/Tk versions on OS X
22+
to include versions shipped with OS X 10.7 and 10.8 in addition to 10.6.
23+
24+
2125
What's New in IDLE 3.2.3?
2226
=========================
2327

Lib/idlelib/macosxSupport.py

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -37,17 +37,21 @@ def isCarbonAquaTk(root):
3737
def tkVersionWarning(root):
3838
"""
3939
Returns a string warning message if the Tk version in use appears to
40-
be one known to cause problems with IDLE. The Apple Cocoa-based Tk 8.5
41-
that was shipped with Mac OS X 10.6.
40+
be one known to cause problems with IDLE.
41+
1. Apple Cocoa-based Tk 8.5.7 shipped with Mac OS X 10.6 is unusable.
42+
2. Apple Cocoa-based Tk 8.5.9 in OS X 10.7 and 10.8 is better but
43+
can still crash unexpectedly.
4244
"""
4345

4446
if (runningAsOSXApp() and
45-
('AppKit' in root.tk.call('winfo', 'server', '.')) and
46-
(root.tk.call('info', 'patchlevel') == '8.5.7') ):
47-
return (r"WARNING: The version of Tcl/Tk (8.5.7) in use may"
47+
('AppKit' in root.tk.call('winfo', 'server', '.')) ):
48+
patchlevel = root.tk.call('info', 'patchlevel')
49+
if patchlevel not in ('8.5.7', '8.5.9'):
50+
return False
51+
return (r"WARNING: The version of Tcl/Tk ({0}) in use may"
4852
r" be unstable.\n"
4953
r"Visit http://www.python.org/download/mac/tcltk/"
50-
r" for current information.")
54+
r" for current information.".format(patchlevel))
5155
else:
5256
return False
5357

0 commit comments

Comments
 (0)