[Python-checkins] gh-90879: Fix missing parameter for put_nowait() (GH-91514)

miss-islington webhook-mailer at python.org
Thu Apr 14 05:23:26 EDT 2022


https://github.com/python/cpython/commit/f3f5d4be7a9a8d058524c4b8e85371862245ae31
commit: f3f5d4be7a9a8d058524c4b8e85371862245ae31
branch: 3.9
author: Miss Islington (bot) <31488909+miss-islington at users.noreply.github.com>
committer: miss-islington <31488909+miss-islington at users.noreply.github.com>
date: 2022-04-14T02:23:15-07:00
summary:

gh-90879: Fix missing parameter for put_nowait() (GH-91514)

(cherry picked from commit 0fc3517cf46ec79b4681c31916d4081055a7ed09)

Co-authored-by: slateny <46876382+slateny at users.noreply.github.com>

files:
M Doc/library/queue.rst
M Lib/queue.py

diff --git a/Doc/library/queue.rst b/Doc/library/queue.rst
index 0ec5900bef5bb..def39eae8adc5 100644
--- a/Doc/library/queue.rst
+++ b/Doc/library/queue.rst
@@ -138,7 +138,7 @@ provide the public methods described below.
 
 .. method:: Queue.put_nowait(item)
 
-   Equivalent to ``put(item, False)``.
+   Equivalent to ``put(item, block=False)``.
 
 
 .. method:: Queue.get(block=True, timeout=None)
@@ -249,7 +249,7 @@ SimpleQueue Objects
 
 .. method:: SimpleQueue.put_nowait(item)
 
-   Equivalent to ``put(item)``, provided for compatibility with
+   Equivalent to ``put(item, block=False)``, provided for compatibility with
    :meth:`Queue.put_nowait`.
 
 
diff --git a/Lib/queue.py b/Lib/queue.py
index 10dbcbc18ece8..55f50088460f9 100644
--- a/Lib/queue.py
+++ b/Lib/queue.py
@@ -298,7 +298,7 @@ def get(self, block=True, timeout=None):
     def put_nowait(self, item):
         '''Put an item into the queue without blocking.
 
-        This is exactly equivalent to `put(item)` and is only provided
+        This is exactly equivalent to `put(item, block=False)` and is only provided
         for compatibility with the Queue class.
         '''
         return self.put(item, block=False)



More information about the Python-checkins mailing list