Rename Queue module to queue.
Updated documentation to use new name.
Merged revisions 63077 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r63077 | alexandre.vassalotti | 2008-05-11 15:39:48 -0400 (Sun, 11 May 2008) | 3 lines

  Added stub for the Queue module to be renamed in 3.0.
  Use the 3.0 module name to avoid spurious warnings.
........
diff --git a/Lib/test/test_dummy_thread.py b/Lib/test/test_dummy_thread.py
index 07466ce..5910458 100644
--- a/Lib/test/test_dummy_thread.py
+++ b/Lib/test/test_dummy_thread.py
@@ -7,7 +7,7 @@
 """
 import dummy_thread as _thread
 import time
-import Queue
+import queue
 import random
 import unittest
 from test import test_support
@@ -124,7 +124,7 @@
             """Use to test _thread.start_new_thread() passes args properly."""
             queue.put((arg1, arg2))
 
-        testing_queue = Queue.Queue(1)
+        testing_queue = queue.Queue(1)
         _thread.start_new_thread(arg_tester, (testing_queue, True, True))
         result = testing_queue.get()
         self.failUnless(result[0] and result[1],
@@ -148,7 +148,7 @@
             queue.put(_thread.get_ident())
 
         thread_count = 5
-        testing_queue = Queue.Queue(thread_count)
+        testing_queue = queue.Queue(thread_count)
         if test_support.verbose:
             print()
             print("*** Testing multiple thread creation "\
diff --git a/Lib/test/test_queue.py b/Lib/test/test_queue.py
index 8c96194..df7b7e3 100644
--- a/Lib/test/test_queue.py
+++ b/Lib/test/test_queue.py
@@ -1,6 +1,6 @@
-# Some simple Queue module tests, plus some failure conditions
+# Some simple queue module tests, plus some failure conditions
 # to ensure the Queue locks remain stable.
-import Queue
+import queue
 import sys
 import threading
 import time
@@ -112,12 +112,12 @@
         try:
             q.put(full, block=0)
             self.fail("Didn't appear to block with a full queue")
-        except Queue.Full:
+        except queue.Full:
             pass
         try:
             q.put(full, timeout=0.01)
             self.fail("Didn't appear to time-out with a full queue")
-        except Queue.Full:
+        except queue.Full:
             pass
         # Test a blocking put
         self.do_blocking_test(q.put, (full,), q.get, ())
@@ -129,12 +129,12 @@
         try:
             q.get(block=0)
             self.fail("Didn't appear to block with an empty queue")
-        except Queue.Empty:
+        except queue.Empty:
             pass
         try:
             q.get(timeout=0.01)
             self.fail("Didn't appear to time-out with an empty queue")
-        except Queue.Empty:
+        except queue.Empty:
             pass
         # Test a blocking get
         self.do_blocking_test(q.get, (), q.put, ('empty',))
@@ -196,13 +196,13 @@
 
 
 class QueueTest(BaseQueueTest):
-    type2test = Queue.Queue
+    type2test = queue.Queue
 
 class LifoQueueTest(BaseQueueTest):
-    type2test = Queue.LifoQueue
+    type2test = queue.LifoQueue
 
 class PriorityQueueTest(BaseQueueTest):
-    type2test = Queue.PriorityQueue
+    type2test = queue.PriorityQueue
 
 
 
@@ -210,21 +210,21 @@
 class FailingQueueException(Exception):
     pass
 
-class FailingQueue(Queue.Queue):
+class FailingQueue(queue.Queue):
     def __init__(self, *args):
         self.fail_next_put = False
         self.fail_next_get = False
-        Queue.Queue.__init__(self, *args)
+        queue.Queue.__init__(self, *args)
     def _put(self, item):
         if self.fail_next_put:
             self.fail_next_put = False
             raise FailingQueueException("You Lose")
-        return Queue.Queue._put(self, item)
+        return queue.Queue._put(self, item)
     def _get(self):
         if self.fail_next_get:
             self.fail_next_get = False
             raise FailingQueueException("You Lose")
-        return Queue.Queue._get(self)
+        return queue.Queue._get(self)
 
 class FailingQueueTest(unittest.TestCase, BlockingTestMixin):
 
diff --git a/Lib/test/test_socket.py b/Lib/test/test_socket.py
index 8c5cf93..ab860dd 100644
--- a/Lib/test/test_socket.py
+++ b/Lib/test/test_socket.py
@@ -9,7 +9,7 @@
 import thread, threading
 import time
 import traceback
-import Queue
+import queue
 import sys
 import os
 import array
@@ -96,7 +96,7 @@
         self.server_ready = threading.Event()
         self.client_ready = threading.Event()
         self.done = threading.Event()
-        self.queue = Queue.Queue(1)
+        self.queue = queue.Queue(1)
 
         # Do some munging to start the client test.
         methodname = self.id()