diff options
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/http/cookies.py | 4 | ||||
-rw-r--r-- | Lib/idlelib/macosxSupport.py | 2 | ||||
-rw-r--r-- | Lib/idlelib/rpc.py | 2 | ||||
-rw-r--r-- | Lib/multiprocessing/queues.py | 19 | ||||
-rw-r--r-- | Lib/test/test_descr.py | 10 | ||||
-rw-r--r-- | Lib/webbrowser.py | 4 |
6 files changed, 27 insertions, 14 deletions
diff --git a/Lib/http/cookies.py b/Lib/http/cookies.py index b84c259..1051cdd 100644 --- a/Lib/http/cookies.py +++ b/Lib/http/cookies.py @@ -514,7 +514,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 def __ParseString(self, str, patt=_CookiePattern): diff --git a/Lib/idlelib/macosxSupport.py b/Lib/idlelib/macosxSupport.py index b794a83..d270530 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 d3fc3b0..0c56ccd 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 bbaf6d5..e96659b 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 e447d5a..804a5c9 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 1d9ff43..aee797d 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 |