Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Make event objects unhashable #15305

Closed
wants to merge 2 commits into from
Closed
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 changelog.d/15305.misc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Make EventBase unhashable.
4 changes: 4 additions & 0 deletions synapse/events/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
Generic,
Iterable,
List,
NoReturn,
Optional,
Sequence,
Tuple,
Expand Down Expand Up @@ -338,6 +339,9 @@ def __init__(
type: DictProperty[str] = DictProperty("type")
user_id: DictProperty[str] = DictProperty("sender")

def __hash__(self) -> NoReturn:
raise NotImplementedError()

@property
def event_id(self) -> str:
raise NotImplementedError()
Expand Down