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.
|
| 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.
write method should be changed to async. Otherwise this suggestion will lead to errors.
There was a problem hiding this comment.
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.
|
@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 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.