Skip to content

Commit

Permalink
[PR #8747/e97b17a6 backport][3.10] Make MESSAGE_TYPES_WITH_CONTENT a …
Browse files Browse the repository at this point in the history
…frozenset for the WebSocketReader (#8750)

Co-authored-by: J. Nick Koston <nick@koston.org>
  • Loading branch information
patchback[bot] and bdraco committed Aug 19, 2024
1 parent c7ff47b commit 83bd239
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
1 change: 1 addition & 0 deletions CHANGES/8747.misc.rst
10 changes: 6 additions & 4 deletions aiohttp/http_websocket.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,10 +94,12 @@ class WSMsgType(IntEnum):
error = ERROR


MESSAGE_TYPES_WITH_CONTENT: Final = (
WSMsgType.BINARY,
WSMsgType.TEXT,
WSMsgType.CONTINUATION,
MESSAGE_TYPES_WITH_CONTENT: Final = frozenset(
{
WSMsgType.BINARY,
WSMsgType.TEXT,
WSMsgType.CONTINUATION,
}
)

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

0 comments on commit 83bd239

Please sign in to comment.