-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Waiters refac #3568
Waiters refac #3568
Conversation
@asvetlov Please take a look. Please invite others to look at it thoroughly. |
@mnach Please review |
|
||
if self._buffer: | ||
return (self._read_nowait_chunk(-1), False) | ||
# return (self._read_nowait(-1), False) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This actually right, but break one single test, since the test is wrong (based on exact implementation rather than documentation) :) Anyway both return
s do not break API. It's just an optimization.
@@ -388,31 +388,29 @@ def end_http_chunk_receiving(self) -> None: | |||
of the data corresponds to the end of a HTTP chunk , otherwise it is | |||
always False. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@asvetlov I would change the API. This function is meaningless when chunked encoding is not used. So I would raise exception if this function used on non-chunked encoding (can be checked using self._http_chunk_splits is None
)
3947b19
to
0fc8f4c
Compare
5428328
to
e931535
Compare
I agree that a waiter should return Long story short:
What do you think about this structure? Is it viable, did I miss something? |
Codecov Report
@@ Coverage Diff @@
## master #3568 +/- ##
==========================================
+ Coverage 97.9% 98.02% +0.12%
==========================================
Files 43 43
Lines 8560 8781 +221
Branches 1378 1489 +111
==========================================
+ Hits 8381 8608 +227
+ Misses 74 71 -3
+ Partials 105 102 -3
Continue to review full report at Codecov.
|
5bfcb37
to
42cd03c
Compare
This is just a simplifaction. Actually, the value means nothing.
42cd03c
to
1ab3b1b
Compare
@asvetlov I have fixed everything. Merge ? |
Merge ? |
PING |
Hi. |
@asvetlov regarding 3.5 release: it does not add any new features or fixes any bugs. Since I don't know rules for LTS releases, I can not answer. |
OK, I'm sure changes are correct, so please merge. |
Thank you and sorry for waiting |
* 🐽 streams: change waiters return value to None This is just a simplifaction. Actually, the value means nothing. * 🐽 stream.readchunk() refactoring (cherry picked from commit 36331ce) Co-authored-by: Коренберг Марк <[email protected]>
* 🐽 streams: change waiters return value to None This is just a simplifaction. Actually, the value means nothing. * 🐽 stream.readchunk() refactoring (cherry picked from commit 36331ce) Co-authored-by: Коренберг Марк <[email protected]>
What do these changes do?
Are there changes in behavior for the user?
Related issue number
Checklist
CONTRIBUTORS.txt
CHANGES
folder<issue_id>.<type>
for example (588.bugfix)issue_id
change 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.