-
-
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
Ws example fix #1193
Ws example fix #1193
Conversation
…pe' to fix import error in the web socket server example.
… in the web socket server example.
Current coverage is 98.34% (diff: 100%)@@ master #1193 diff @@
==========================================
Files 29 29
Lines 6533 6533
Methods 0 0
Messages 0 0
Branches 1095 1095
==========================================
Hits 6425 6425
Misses 56 56
Partials 52 52
|
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 fix comments
@@ -5,7 +5,7 @@ | |||
import asyncio | |||
import os | |||
|
|||
from aiohttp.web import (Application, Response, WebSocketResponse, WSMsgType, | |||
from aiohttp.web import (Application, MsgType, Response, WebSocketResponse, |
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.
MsgType
is a deprecated name in favor of WSMsgType
.
@@ -27,7 +27,7 @@ | |||
request.app['sockets'].append(resp) | |||
|
|||
async for msg in resp: | |||
if msg.type == WSMsgType.TEXT: | |||
if msg.type == MsgType.TEXT: |
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.
Replace with WSMsgType
back
Thanks! |
Glad to be able to help! |
What do these changes do?
This minimal pull request fixes depreceated API usage in the
examples/web_ws.py
example.Are there changes in behavior for the user?
Users should now be able to run the
examples/web_ws.py
example without any problems.Checklist
CONTRIBUTORS.txt
CHANGES.rst
#isuue_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.