From a1cbe3e4185f05671d606f8f46fcbc112e18e295 Mon Sep 17 00:00:00 2001 From: Alex Kuzmenko Date: Sun, 22 Oct 2017 17:07:46 +0300 Subject: [PATCH] Drop WSMessage.tp --- CHANGES/2321.removal | 1 + aiohttp/http_websocket.py | 4 ---- tests/test_client_ws.py | 1 - tests/test_web_websocket.py | 1 - 4 files changed, 1 insertion(+), 6 deletions(-) create mode 100644 CHANGES/2321.removal diff --git a/CHANGES/2321.removal b/CHANGES/2321.removal new file mode 100644 index 00000000000..31ae9f9ea32 --- /dev/null +++ b/CHANGES/2321.removal @@ -0,0 +1 @@ +Drop WSMessage.tp diff --git a/aiohttp/http_websocket.py b/aiohttp/http_websocket.py index 37f20787039..94a98c7d3e9 100644 --- a/aiohttp/http_websocket.py +++ b/aiohttp/http_websocket.py @@ -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) diff --git a/tests/test_client_ws.py b/tests/test_client_ws.py index 222cbdf401e..fb86cc8c039 100644 --- a/tests/test_client_ws.py +++ b/tests/test_client_ws.py @@ -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() diff --git a/tests/test_web_websocket.py b/tests/test_web_websocket.py index 7e793fd0302..167c7ce84bc 100644 --- a/tests/test_web_websocket.py +++ b/tests/test_web_websocket.py @@ -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