-
-
Couldn't load subscription status.
- Fork 2.1k
Fixed 7616: EmptyStreamReader.iter_chunks() never ends #7644
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
Conversation
…ter_chunks() never ends
|
Looks like failing test |
Codecov Report
@@ Coverage Diff @@
## master #7644 +/- ##
=======================================
Coverage 97.36% 97.36%
=======================================
Files 106 106
Lines 31541 31550 +9
Branches 3593 3595 +2
=======================================
+ Hits 30709 30718 +9
Misses 630 630
Partials 202 202
Flags with carried forward coverage won't be shown. Click here to find out more.
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
|
I stripped the comments because I think the code is fairly clear, and the tests ensure someone won't mess it up in future. |
Backport to 3.9: 💚 backport PR created✅ Backport PR branch: Backported as #7645 🤖 @patchback |
## What do these changes do? Fixes an issue reported in [7616](#7616) - An iteration of the chunks of an EmptyStreamReader with iter_chunks() never ends. ## Are there changes in behavior for the user? - `EmptyStreamReader` `iter_chunks()` does not get stuck - First call of `EmptyStreamReader` `readchunk()` now returns `(b"", False)`. All the subsequent calls return `(b"", True)`. Before this PR it was always `(b"", True)`. ## Related issue number [7616](#7616) (cherry picked from commit 6639f7d)
What do these changes do?
Fixes an issue reported in 7616 - An iteration of the chunks of an EmptyStreamReader with iter_chunks() never ends.
Are there changes in behavior for the user?
EmptyStreamReaderiter_chunks()does not get stuckEmptyStreamReaderreadchunk()now returns(b"", False). All the subsequent calls return(b"", True). Before this PR it was always(b"", True).Related issue number
7616
Checklist
CONTRIBUTORS.txtCHANGESfolder<issue_id>.<type>for example (588.bugfix)issue_idchange it to the pr id after creating the pr.feature: Signifying a new feature..bugfix: Signifying a bug fix..doc: Signifying a documentation improvement..removal: Signifying a deprecation or removal of public API..misc: A ticket has been closed, but it is not of interest to users.