Skip to content

Commit 83bd239

Browse files
[PR #8747/e97b17a6 backport][3.10] Make MESSAGE_TYPES_WITH_CONTENT a frozenset for the WebSocketReader (#8750)
Co-authored-by: J. Nick Koston <[email protected]>
1 parent c7ff47b commit 83bd239

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

CHANGES/8747.misc.rst

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
8736.misc.rst

aiohttp/http_websocket.py

+6-4
Original file line numberDiff line numberDiff line change
@@ -94,10 +94,12 @@ class WSMsgType(IntEnum):
9494
error = ERROR
9595

9696

97-
MESSAGE_TYPES_WITH_CONTENT: Final = (
98-
WSMsgType.BINARY,
99-
WSMsgType.TEXT,
100-
WSMsgType.CONTINUATION,
97+
MESSAGE_TYPES_WITH_CONTENT: Final = frozenset(
98+
{
99+
WSMsgType.BINARY,
100+
WSMsgType.TEXT,
101+
WSMsgType.CONTINUATION,
102+
}
101103
)
102104

103105
WS_KEY: Final[bytes] = b"258EAFA5-E914-47DA-95CA-C5AB0DC85B11"

0 commit comments

Comments
 (0)