Skip to content
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

Merged
merged 4 commits into from
Sep 21, 2016
Merged

Ws example fix #1193

merged 4 commits into from
Sep 21, 2016

Conversation

fr0stbite
Copy link
Contributor

@fr0stbite fr0stbite commented Sep 19, 2016

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

  • I think the code is well written
  • Unit tests for the changes exist
  • Documentation reflects the changes
  • Add yourself to CONTRIBUTORS.txt
  • Add a new entry to CHANGES.rst
    • Choose any open position to avoid merge conflicts with other PRs.
    • Add a link to the issue you are fixing (if any) using #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.

@codecov-io
Copy link

codecov-io commented Sep 20, 2016

Current coverage is 98.34% (diff: 100%)

Merging #1193 into master will not change coverage

@@             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          

Powered by Codecov. Last update 4b85245...b402ebb

Copy link
Member

@asvetlov asvetlov left a 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,
Copy link
Member

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:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Replace with WSMsgType back

@asvetlov asvetlov merged commit dc1a183 into aio-libs:master Sep 21, 2016
@asvetlov
Copy link
Member

Thanks!

@fr0stbite
Copy link
Contributor Author

Glad to be able to help!

@fr0stbite fr0stbite deleted the ws_example_fix branch September 21, 2016 16:37
@lock
Copy link

lock bot commented Oct 29, 2019

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.

If you feel like there's important points made in this discussion,
please include those exceprts into that new issue.

@lock lock bot added the outdated label Oct 29, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Oct 29, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants