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

Commit fcc7aa1

Browse files
committed
Fix hashable issue (introduced in develop since base of this PR)
1 parent c839469 commit fcc7aa1

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

synapse/api/room_versions.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,10 @@ class PushRuleRoomFlag:
5858
EXTENSIBLE_EVENTS = "org.matrix.msc3932.extensible_events"
5959

6060

61-
@attr.s(slots=True, frozen=True, auto_attribs=True)
61+
# eq=False means equality and hashing are done using object identity, which suits
62+
# our purposes because each RoomVersion is instantiated only once and some of
63+
# the fields are not hashable.
64+
@attr.s(slots=True, frozen=True, auto_attribs=True, eq=False)
6265
class RoomVersion:
6366
"""An object which describes the unique attributes of a room version."""
6467

0 commit comments

Comments
 (0)