-
-
Notifications
You must be signed in to change notification settings - Fork 34.7k
gh-119154: Simplify consumers by making queue.Queue an iterable
#120503
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
Changes from 6 commits
Commits
Show all changes
27 commits
Select commit
Hold shift + click to select a range
e826a01
Add `queue.Queue.__iter__()`
nineteendo c8cbe4d
Add `asyncio.Queue.__iter__()`
nineteendo 940e3c0
📜🤖 Added by blurb_it.
blurb-it[bot] 8fca288
Fix lint
nineteendo 499457c
Wait
nineteendo 7f206d9
Update 2024-06-14-13-37-45.gh-issue-120499.JK7Mv8.rst
nineteendo 3cad181
Move while loop inside try/except block
nineteendo cc9f7ef
test iteration
nineteendo 92d7dc0
Reduce diff
nineteendo a92e031
Run test
nineteendo 3621cc1
Reduce diff
nineteendo 98252c6
Adapt example from asyncio
nineteendo 4b1ff4b
Simpler example
nineteendo 5e9f48b
Put definition first
nineteendo 4b382ec
Print worker name
nineteendo 076a7a6
Restore example
nineteendo 6132f5a
Indent example
nineteendo 9a28bc5
Cleanup tests
nineteendo 0a69fd9
Instantiate
nineteendo 4407eed
Move inside with block
nineteendo 1e500ab
Add comment
nineteendo 101409f
Separate function definition
nineteendo bcdb21f
Update whatsnew
nineteendo 0743257
Update blurb
nineteendo 5e37cd5
Rename 2024-06-14-13-37-45.gh-issue-120499.JK7Mv8.rst to 2024-06-14-1…
nineteendo 1f05869
Merge branch 'main' into add-Queue.__iter__
nineteendo b23a1b3
Clarify documentation
nineteendo File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
Misc/NEWS.d/next/Core and Builtins/2024-06-14-13-37-45.gh-issue-120499.JK7Mv8.rst
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| Make :class:`queue.Queue` an iterable. |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.