-
-
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
Fix examples/docs for websocket send commands being a coroutine #1886
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1886 +/- ##
=======================================
Coverage 97.06% 97.06%
=======================================
Files 37 37
Lines 7556 7556
Branches 1314 1314
=======================================
Hits 7334 7334
Misses 100 100
Partials 122 122
Continue to review full report at Codecov.
|
Thanks! |
When I started yielding from sending messages I quickly ran into Python bug 29930: 2 drains in parallel will raise an Do you think that we should add this to the aiohttp docs? |
Yeah, this is exactly why I use the latest commit of 3.6.1+ by building python from source every day for 32 and 64 bit windows. Also all the more reason to use 'async def' and 'await' as well. I also can't wait for the day when python 3.4.x reaches no further patches by EOL so that way aiohttp can drop python 3.4 and go full 'async def' and 'await'. |
I think the main showstopper for dropping Python 3.4 support is absence of 3.5 in Debian stable. |
Yeah, if I was part of Debian development I would change that to latest commit of 3.6.1+. After all I do not think 3.6.1+ from github would not break most things for 3.4. But it would allow people to use 'async def' and 'await' on the fly without needing for them to manually compile 3.5 or 3.6 to begin with. |
@asvetlov stretch shipped, IIRC it's 3.5 |
Yes, I know. @balloob do you know plans for Raspberry PI? |
Raspberry PI is expecting a Debian Stretch based release over the summer. Last time it was ~5 months after the Debian stable release. (source - last paragraph "One final thing") |
What do these changes do?
Version 1.3 made websocket send commands awaitable: b3c80ee. However that change did not update tests/examples. This PR finishes that work.
It went unnoticed because when a send method is called, the bytes are actually written to the socket and a coroutine is returned for the drain command.
Noticed it because setting
PYTHONASYNCIODEBUG
to 1 started printing errors about unawaited coroutines.Are there changes in behavior for the user?
No
Related issue number
No
Checklist
CONTRIBUTORS.txt
CHANGES.rst
#issue_number
format at the end of changelog message. Use Pull Request number if there are no issues for PR or PR covers the issue only partially.