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

(cherry picked from commit 0fc3517cf4)

Co-authored-by: slateny <46876382+slateny@users.noreply.github.com>
This commit is contained in:
Miss Islington (bot) 2022-04-14 02:18:31 -07:00 committed by GitHub
parent 72114c06fd
commit 52ce75fc1e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View File

@ -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)
@ -248,7 +248,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`.

View File

@ -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)