summaryrefslogtreecommitdiff
path: root/Lib
diff options
context:
space:
mode:
Diffstat (limited to 'Lib')
-rw-r--r--Lib/http/cookies.py4
-rw-r--r--Lib/idlelib/macosxSupport.py2
-rw-r--r--Lib/idlelib/rpc.py2
-rw-r--r--Lib/multiprocessing/queues.py19
-rw-r--r--Lib/test/test_descr.py10
-rw-r--r--Lib/webbrowser.py4
6 files changed, 27 insertions, 14 deletions
diff --git a/Lib/http/cookies.py b/Lib/http/cookies.py
index 695161a380..9cb80b9923 100644
--- a/Lib/http/cookies.py
+++ b/Lib/http/cookies.py
@@ -535,7 +535,9 @@ class BaseCookie(dict):
if type(rawdata) == type(""):
self.__ParseString(rawdata)
else:
- self.update(rawdata)
+ # self.update() wouldn't call our custom __setitem__
+ for k, v in rawdata.items():
+ self[k] = v
return
# end load()
diff --git a/Lib/idlelib/macosxSupport.py b/Lib/idlelib/macosxSupport.py
index b794a83bd5..d2705300d7 100644
--- a/Lib/idlelib/macosxSupport.py
+++ b/Lib/idlelib/macosxSupport.py
@@ -9,7 +9,7 @@ def runningAsOSXApp():
"""
Returns True if Python is running from within an app on OSX.
If so, assume that Python was built with Aqua Tcl/Tk rather than
- X11 Tck/Tk.
+ X11 Tcl/Tk.
"""
return (sys.platform == 'darwin' and '.app' in sys.executable)
diff --git a/Lib/idlelib/rpc.py b/Lib/idlelib/rpc.py
index d3fc3b0d2a..0c56ccdcfe 100644
--- a/Lib/idlelib/rpc.py
+++ b/Lib/idlelib/rpc.py
@@ -595,4 +595,4 @@ class MethodProxy(object):
# XXX KBK 09Sep03 We need a proper unit test for this module. Previously
-# existing test code was removed at Rev 1.27.
+# existing test code was removed at Rev 1.27 (r34098).
diff --git a/Lib/multiprocessing/queues.py b/Lib/multiprocessing/queues.py
index bbaf6d5550..e96659b8d9 100644
--- a/Lib/multiprocessing/queues.py
+++ b/Lib/multiprocessing/queues.py
@@ -282,9 +282,22 @@ class JoinableQueue(Queue):
Queue.__setstate__(self, state[:-2])
self._cond, self._unfinished_tasks = state[-2:]
- def put(self, item, block=True, timeout=None):
- Queue.put(self, item, block, timeout)
- self._unfinished_tasks.release()
+ def put(self, obj, block=True, timeout=None):
+ assert not self._closed
+ if not self._sem.acquire(block, timeout):
+ raise Full
+
+ self._notempty.acquire()
+ self._cond.acquire()
+ try:
+ if self._thread is None:
+ self._start_thread()
+ self._buffer.append(obj)
+ self._unfinished_tasks.release()
+ self._notempty.notify()
+ finally:
+ self._cond.release()
+ self._notempty.release()
def task_done(self):
self._cond.acquire()
diff --git a/Lib/test/test_descr.py b/Lib/test/test_descr.py
index b3ca89af5b..17d96b2a4b 100644
--- a/Lib/test/test_descr.py
+++ b/Lib/test/test_descr.py
@@ -1268,13 +1268,9 @@ order (MRO) for bases """
self.assertEqual(super(D,D).goo(), (D,))
self.assertEqual(super(D,d).goo(), (D,))
- # Verify that argument is checked for callability (SF bug 753451)
- try:
- classmethod(1).__get__(1)
- except TypeError:
- pass
- else:
- self.fail("classmethod should check for callability")
+ # Verify that a non-callable will raise
+ meth = classmethod(1).__get__(1)
+ self.assertRaises(TypeError, meth)
# Verify that classmethod() doesn't allow keyword args
try:
diff --git a/Lib/webbrowser.py b/Lib/webbrowser.py
index 1d9ff4340c..aee797d399 100644
--- a/Lib/webbrowser.py
+++ b/Lib/webbrowser.py
@@ -626,7 +626,9 @@ if "BROWSER" in os.environ:
# and prepend to _tryorder
for cmdline in _userchoices:
if cmdline != '':
- _synthesize(cmdline, -1)
+ cmd = _synthesize(cmdline, -1)
+ if cmd[1] is None:
+ register(cmdline, None, GenericBrowser(cmdline), -1)
cmdline = None # to make del work if _userchoices was empty
del cmdline
del _userchoices