[Python-checkins] cpython (merge 3.3 -> default): Issue #18676: Merge from 3.3

terry.reedy python-checkins at python.org
Sun Aug 11 00:40:32 CEST 2013


http://hg.python.org/cpython/rev/d9a9fe5e700d
changeset:   85115:d9a9fe5e700d
parent:      85110:0fce8b90f25b
parent:      85114:2122d56d6bc5
user:        Terry Jan Reedy <tjreedy at udel.edu>
date:        Sat Aug 10 18:23:18 2013 -0400
summary:
  Issue #18676: Merge from 3.3

files:
  Lib/queue.py |  8 ++++----
  Misc/ACKS    |  1 +
  Misc/NEWS    |  5 ++++-
  3 files changed, 9 insertions(+), 5 deletions(-)


diff --git a/Lib/queue.py b/Lib/queue.py
--- a/Lib/queue.py
+++ b/Lib/queue.py
@@ -120,7 +120,7 @@
 
         If optional args 'block' is true and 'timeout' is None (the default),
         block if necessary until a free slot is available. If 'timeout' is
-        a positive number, it blocks at most 'timeout' seconds and raises
+        a non-negative number, it blocks at most 'timeout' seconds and raises
         the Full exception if no free slot was available within that time.
         Otherwise ('block' is false), put an item on the queue if a free slot
         is immediately available, else raise the Full exception ('timeout'
@@ -135,7 +135,7 @@
                     while self._qsize() >= self.maxsize:
                         self.not_full.wait()
                 elif timeout < 0:
-                    raise ValueError("'timeout' must be a positive number")
+                    raise ValueError("'timeout' must be a non-negative number")
                 else:
                     endtime = time() + timeout
                     while self._qsize() >= self.maxsize:
@@ -152,7 +152,7 @@
 
         If optional args 'block' is true and 'timeout' is None (the default),
         block if necessary until an item is available. If 'timeout' is
-        a positive number, it blocks at most 'timeout' seconds and raises
+        a non-negative number, it blocks at most 'timeout' seconds and raises
         the Empty exception if no item was available within that time.
         Otherwise ('block' is false), return an item if one is immediately
         available, else raise the Empty exception ('timeout' is ignored
@@ -166,7 +166,7 @@
                 while not self._qsize():
                     self.not_empty.wait()
             elif timeout < 0:
-                raise ValueError("'timeout' must be a positive number")
+                raise ValueError("'timeout' must be a non-negative number")
             else:
                 endtime = time() + timeout
                 while not self._qsize():
diff --git a/Misc/ACKS b/Misc/ACKS
--- a/Misc/ACKS
+++ b/Misc/ACKS
@@ -773,6 +773,7 @@
 Lukas Lueg
 Loren Luke
 Fredrik Lundh
+Zhongyue Luo
 Mark Lutz
 Taras Lyapun
 Jim Lynch
diff --git a/Misc/NEWS b/Misc/NEWS
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -24,6 +24,9 @@
 Library
 -------
 
+- Issue #18676: Change 'positive' to 'non-negative' in queue.py put and get
+  docstrings and ValueError messages. Patch by Zhongyue Luo
+
 - Issue #8112: xlmrpc.server's DocXMLRPCServer server no longer raises an error
   if methods have annotations; it now correctly displays the annotations.
 
@@ -821,7 +824,7 @@
 Build
 -----
 
-- Issue #16067: Add description into MSI file to replace installer's 
+- Issue #16067: Add description into MSI file to replace installer's
   temporary name.
 
 - Issue #18257: Fix readlink usage in python-config.  Install the python

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


More information about the Python-checkins mailing list