From 114942760626edb0e6d36524b5575c99f8a64b21 Mon Sep 17 00:00:00 2001 From: slateny <46876382+slateny@users.noreply.github.com> Date: Wed, 13 Apr 2022 17:42:00 -0700 Subject: [PATCH 1/5] Fix missing parameter for put_nowait() --- Doc/library/queue.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Doc/library/queue.rst b/Doc/library/queue.rst index cbf27d2bb10d04..3a1a3b9e691833 100644 --- a/Doc/library/queue.rst +++ b/Doc/library/queue.rst @@ -248,7 +248,7 @@ SimpleQueue Objects .. method:: SimpleQueue.put_nowait(item) - Equivalent to ``put(item)``, provided for compatibility with + Equivalent to ``put(item, False)``, provided for compatibility with :meth:`Queue.put_nowait`. From 0669ed44ac9530993895b93553da6bd8d700c22c Mon Sep 17 00:00:00 2001 From: slateny <46876382+slateny@users.noreply.github.com> Date: Wed, 13 Apr 2022 18:10:20 -0700 Subject: [PATCH 2/5] Update docstring also --- Lib/queue.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Lib/queue.py b/Lib/queue.py index 10dbcbc18ece85..20625805e07408 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, False)` and is only provided for compatibility with the Queue class. ''' return self.put(item, block=False) From 066d59e807fdd3f2403e52dbe68f52ead3997596 Mon Sep 17 00:00:00 2001 From: slateny <46876382+slateny@users.noreply.github.com> Date: Wed, 13 Apr 2022 23:10:54 -0700 Subject: [PATCH 3/5] Update Lib/queue.py Co-authored-by: Dong-hee Na --- Lib/queue.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Lib/queue.py b/Lib/queue.py index 20625805e07408..55f50088460f9e 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, False)` 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) From 369168526d8a7aad712ce39f73d9f8eb1087f58d Mon Sep 17 00:00:00 2001 From: slateny <46876382+slateny@users.noreply.github.com> Date: Wed, 13 Apr 2022 23:10:58 -0700 Subject: [PATCH 4/5] Update Doc/library/queue.rst Co-authored-by: Dong-hee Na --- Doc/library/queue.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Doc/library/queue.rst b/Doc/library/queue.rst index 3a1a3b9e691833..76d8cb1d106c66 100644 --- a/Doc/library/queue.rst +++ b/Doc/library/queue.rst @@ -248,7 +248,7 @@ SimpleQueue Objects .. method:: SimpleQueue.put_nowait(item) - Equivalent to ``put(item, False)``, provided for compatibility with + Equivalent to ``put(item, block=False)``, provided for compatibility with :meth:`Queue.put_nowait`. From 58471312e4b312691fb604094ba92f2da260a60d Mon Sep 17 00:00:00 2001 From: slateny <46876382+slateny@users.noreply.github.com> Date: Wed, 13 Apr 2022 23:12:14 -0700 Subject: [PATCH 5/5] Update for consistency --- Doc/library/queue.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Doc/library/queue.rst b/Doc/library/queue.rst index 76d8cb1d106c66..540dde9e154e80 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)