-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Polish docs and ABC, convert everything except multipart and client to async/await syntax #2483
Conversation
Codecov Report
@@ Coverage Diff @@
## master #2483 +/- ##
==========================================
- Coverage 97.15% 97.14% -0.02%
==========================================
Files 39 39
Lines 8097 8099 +2
Branches 1416 1416
==========================================
+ Hits 7867 7868 +1
Misses 99 99
- Partials 131 132 +1
Continue to review full report at Codecov.
|
@@ -408,6 +408,9 @@ def write(self, data): | |||
assert not self._eof_sent, "EOF has already been sent" | |||
assert self._payload_writer is not None, \ | |||
"Response has not been started" | |||
warnings.warn("drain method is deprecated, use await resp.write()", |
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.
write
method should be changed to async. Otherwise this suggestion will lead to errors.
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.
Please elaborate
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.
StreamResponse.write
is not async
now. What it returns is a mystery. According the interface StreamResponse.write
breaks it. So it would be fine to expect strange things including TypeErrors on trying to await non-coroutine value.
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.
write
is async now.
@kxepal please review again. |
@kxepal thanks! |
@kxepal say again I very appreciate your reviews. |
@asvetlov you're welcome! Glad to help how I can (: |
This follows aio-libs#2483
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a [new issue] for related bugs. |
The drain is still supported but removed from documentation: users should call
await resp.write()
.write()
calls writer'sdrain()
behind the scene.