[Python-checkins] cpython (2.7): Fix #15567. collections.deque wasn't imported

brian.curtin python-checkins at python.org
Fri Aug 10 06:05:29 CEST 2012


http://hg.python.org/cpython/rev/260f3ad7af4b
changeset:   78484:260f3ad7af4b
branch:      2.7
parent:      78481:6dab233a115e
user:        Brian Curtin <brian at python.org>
date:        Thu Aug 09 23:04:42 2012 -0500
summary:
  Fix #15567. collections.deque wasn't imported

files:
  Lib/threading.py |  3 ++-
  Misc/NEWS        |  2 ++
  2 files changed, 4 insertions(+), 1 deletions(-)


diff --git a/Lib/threading.py b/Lib/threading.py
--- a/Lib/threading.py
+++ b/Lib/threading.py
@@ -10,6 +10,7 @@
 
 import warnings
 
+from collections import deque as _deque
 from time import time as _time, sleep as _sleep
 from traceback import format_exc as _format_exc
 
@@ -913,7 +914,7 @@
             self.rc = Condition(self.mon)
             self.wc = Condition(self.mon)
             self.limit = limit
-            self.queue = deque()
+            self.queue = _deque()
 
         def put(self, item):
             self.mon.acquire()
diff --git a/Misc/NEWS b/Misc/NEWS
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -92,6 +92,8 @@
 Library
 -------
 
+- Issue #15567: Fix NameError when running threading._test
+
 - Issue #13052: Fix IDLE crashing when replace string in Search/Replace dialog
   ended with '\'. Patch by Roger Serwy.
 

-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list