summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTerry Jan Reedy <tjreedy@udel.edu>2013-08-10 22:17:01 (GMT)
committerTerry Jan Reedy <tjreedy@udel.edu>2013-08-10 22:17:01 (GMT)
commitbb8114cbe633d8d66a595099d6680c8cf7f8abe5 (patch)
tree6f2dff350f4f0f6bfbf7962a4725cec37f2438e3
parent0fd115650a9a5f4e4dcdbe360bc9e473a8900711 (diff)
downloadcpython-bb8114cbe633d8d66a595099d6680c8cf7f8abe5.zip
cpython-bb8114cbe633d8d66a595099d6680c8cf7f8abe5.tar.gz
cpython-bb8114cbe633d8d66a595099d6680c8cf7f8abe5.tar.bz2
Issue #18676: Change 'positive' to 'non-negative' in queue.py put and get
docstrings and ValueError messages. Patch by Zhongyue Luo
-rw-r--r--Lib/Queue.py8
-rw-r--r--Misc/ACKS1
-rw-r--r--Misc/NEWS3
3 files changed, 8 insertions, 4 deletions
diff --git a/Lib/Queue.py b/Lib/Queue.py
index 2db8d76..00364b3 100644
--- a/Lib/Queue.py
+++ b/Lib/Queue.py
@@ -109,7 +109,7 @@ class Queue:
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'
@@ -125,7 +125,7 @@ class Queue:
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 @@ class Queue:
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
@@ -167,7 +167,7 @@ class Queue:
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
index 736887d..fae831e 100644
--- a/Misc/ACKS
+++ b/Misc/ACKS
@@ -629,6 +629,7 @@ Ray Loyzaga
Lukas Lueg
Loren Luke
Fredrik Lundh
+Zhongyue Luo
Mark Lutz
Jim Lynch
Mikael Lyngvig
diff --git a/Misc/NEWS b/Misc/NEWS
index 7e346d0..c9b7fdc 100644
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -29,6 +29,9 @@ Core and Builtins
Library
-------
+- Issue #18676: Change 'positive' to 'non-negative' in queue.py put and get
+ docstrings and ValueError messages. Patch by Zhongyue Luo
+
- Issue #17998: Fix an internal error in regular expression engine.
- Issue #17557: Fix os.getgroups() to work with the modified behavior of