]> granicus.if.org Git - python/commitdiff
Fix #15567. collections.deque wasn't imported
authorBrian Curtin <brian@python.org>
Fri, 10 Aug 2012 04:04:42 +0000 (23:04 -0500)
committerBrian Curtin <brian@python.org>
Fri, 10 Aug 2012 04:04:42 +0000 (23:04 -0500)
Lib/threading.py
Misc/NEWS

index 22908550e09cc1ee1ac7e667798a38c9e9d488cb..db9ab29c7dad8560b9cf02c405038e7d5b18fc8e 100644 (file)
@@ -10,6 +10,7 @@ except ImportError:
 
 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 @@ def _test():
             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()
index 7010133d6de920dc24a3c71ecb992993b885820d..91ad192e0d695ae78b4cbef8302cf41acfce9368 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -92,6 +92,8 @@ Core and Builtins
 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.