summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorBarry Warsaw <barry@python.org>2012-07-30 18:34:43 (GMT)
committerBarry Warsaw <barry@python.org>2012-07-30 18:34:43 (GMT)
commit38732ea8326409e14350de1442558d6b9cf3a443 (patch)
tree7bc4430d71353c2b1ca9256f795e7145efeed7bf /Lib
parentdee609c09fb9a09d5e341e2f5975150016f85f00 (diff)
parent504ba313fc081966b721a4e697dffc13840b9e69 (diff)
downloadcpython-38732ea8326409e14350de1442558d6b9cf3a443.zip
cpython-38732ea8326409e14350de1442558d6b9cf3a443.tar.gz
cpython-38732ea8326409e14350de1442558d6b9cf3a443.tar.bz2
merge
Diffstat (limited to 'Lib')
-rw-r--r--Lib/idlelib/NEWS.txt3
-rw-r--r--Lib/idlelib/macosxSupport.py16
-rw-r--r--Lib/test/test_memoryio.py11
-rw-r--r--Lib/tkinter/simpledialog.py2
4 files changed, 25 insertions, 7 deletions
diff --git a/Lib/idlelib/NEWS.txt b/Lib/idlelib/NEWS.txt
index 1d87443..a0c957e 100644
--- a/Lib/idlelib/NEWS.txt
+++ b/Lib/idlelib/NEWS.txt
@@ -34,6 +34,9 @@ What's New in IDLE 3.3.0?
- Issue #3573: IDLE hangs when passing invalid command line args
(directory(ies) instead of file(s)).
+- Issue #14018: Update checks for unstable system Tcl/Tk versions on OS X
+ to include versions shipped with OS X 10.7 and 10.8 in addition to 10.6.
+
What's New in IDLE 3.2.1?
=========================
diff --git a/Lib/idlelib/macosxSupport.py b/Lib/idlelib/macosxSupport.py
index f93ef11..9690442 100644
--- a/Lib/idlelib/macosxSupport.py
+++ b/Lib/idlelib/macosxSupport.py
@@ -37,17 +37,21 @@ def isCarbonAquaTk(root):
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.
+ be one known to cause problems with IDLE.
+ 1. Apple Cocoa-based Tk 8.5.7 shipped with Mac OS X 10.6 is unusable.
+ 2. Apple Cocoa-based Tk 8.5.9 in OS X 10.7 and 10.8 is better but
+ can still crash unexpectedly.
"""
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"
+ ('AppKit' in root.tk.call('winfo', 'server', '.')) ):
+ patchlevel = root.tk.call('info', 'patchlevel')
+ if patchlevel not in ('8.5.7', '8.5.9'):
+ return False
+ return (r"WARNING: The version of Tcl/Tk ({0}) in use may"
r" be unstable.\n"
r"Visit http://www.python.org/download/mac/tcltk/"
- r" for current information.")
+ r" for current information.".format(patchlevel))
else:
return False
diff --git a/Lib/test/test_memoryio.py b/Lib/test/test_memoryio.py
index 49ca44f..04ec8e7 100644
--- a/Lib/test/test_memoryio.py
+++ b/Lib/test/test_memoryio.py
@@ -654,6 +654,17 @@ class CBytesIOTest(PyBytesIOTest):
memio.close()
self.assertRaises(ValueError, memio.__setstate__, (b"closed", 0, None))
+ check_sizeof = support.check_sizeof
+
+ @support.cpython_only
+ def test_sizeof(self):
+ basesize = support.calcobjsize('P2nN2Pn')
+ check = self.check_sizeof
+ self.assertEqual(object.__sizeof__(io.BytesIO()), basesize)
+ check(io.BytesIO(), basesize )
+ check(io.BytesIO(b'a'), basesize + 1 + 1 )
+ check(io.BytesIO(b'a' * 1000), basesize + 1000 + 1 )
+
class CStringIOTest(PyStringIOTest):
ioclass = io.StringIO
diff --git a/Lib/tkinter/simpledialog.py b/Lib/tkinter/simpledialog.py
index 885804b..45302b4 100644
--- a/Lib/tkinter/simpledialog.py
+++ b/Lib/tkinter/simpledialog.py
@@ -282,7 +282,7 @@ class _QueryDialog(Dialog):
self.entry = Entry(master, name="entry")
self.entry.grid(row=1, padx=5, sticky=W+E)
- if self.initialvalue:
+ if self.initialvalue is not None:
self.entry.insert(0, self.initialvalue)
self.entry.select_range(0, END)