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

Drop WSMessage.tp #2372

Merged
merged 1 commit into from
Oct 22, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGES/2321.removal
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Drop WSMessage.tp
4 changes: 0 additions & 4 deletions aiohttp/http_websocket.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,10 +91,6 @@ def json(self, *, loads=json.loads):
"""
return loads(self.data)

@property
def tp(self):
return self.type


WS_CLOSED_MESSAGE = WSMessage(WSMsgType.CLOSED, None, None)
WS_CLOSING_MESSAGE = WSMessage(WSMsgType.CLOSING, None, None)
Expand Down
1 change: 0 additions & 1 deletion tests/test_client_ws.py
Original file line number Diff line number Diff line change
Expand Up @@ -406,7 +406,6 @@ async def test_reader_read_exception(ws_key, key_data, loop):

msg = await resp.receive()
assert msg.type == aiohttp.WSMsgType.ERROR
assert msg.type is msg.tp
assert resp.exception() is exc

session.close()
Expand Down
1 change: 0 additions & 1 deletion tests/test_web_websocket.py
Original file line number Diff line number Diff line change
Expand Up @@ -387,7 +387,6 @@ def test_receive_exc_in_reader(make_request, loop):

msg = yield from ws.receive()
assert msg.type == WSMsgType.ERROR
assert msg.type is msg.tp
assert msg.data is exc
assert ws.exception() is exc

Expand Down