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

Fix weakref_slot parameter for room member storage attrs. #10642

Merged
merged 1 commit into from
Aug 18, 2021
Merged
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/10642.misc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Convert room member storage tuples to `attrs` classes.
8 changes: 4 additions & 4 deletions synapse/storage/roommember.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
logger = logging.getLogger(__name__)


@attr.s(slots=True, frozen=True, weakref_slot=True, auto_attribs=True)
@attr.s(slots=True, frozen=True, weakref_slot=False, auto_attribs=True)
class RoomsForUser:
room_id: str
sender: str
Expand All @@ -32,19 +32,19 @@ class RoomsForUser:
stream_ordering: int


@attr.s(slots=True, frozen=True, weakref_slot=True, auto_attribs=True)
@attr.s(slots=True, frozen=True, weakref_slot=False, auto_attribs=True)
class GetRoomsForUserWithStreamOrdering:
room_id: str
event_pos: PersistedEventPosition


@attr.s(slots=True, frozen=True, weakref_slot=True, auto_attribs=True)
@attr.s(slots=True, frozen=True, weakref_slot=False, auto_attribs=True)
class ProfileInfo:
avatar_url: Optional[str]
display_name: Optional[str]


@attr.s(slots=True, frozen=True, weakref_slot=True, auto_attribs=True)
@attr.s(slots=True, frozen=True, weakref_slot=False, auto_attribs=True)
class MemberSummary:
# A truncated list of (user_id, event_id) tuples for users of a given
# membership type, suitable for use in calculating heroes for a room.
Expand Down