From d9856d9150c05577282cb52f548de7737bb1e454 Mon Sep 17 00:00:00 2001 From: Patrick Cloke Date: Wed, 18 Aug 2021 11:00:37 -0400 Subject: Fix weakref_slot parameter for room member storage attrs. (#10642) Follow-up to #10629 which set it to true, not false. --- changelog.d/10642.misc | 1 + synapse/storage/roommember.py | 8 ++++---- 2 files changed, 5 insertions(+), 4 deletions(-) create mode 100644 changelog.d/10642.misc diff --git a/changelog.d/10642.misc b/changelog.d/10642.misc new file mode 100644 index 0000000000..cca1eb6c57 --- /dev/null +++ b/changelog.d/10642.misc @@ -0,0 +1 @@ +Convert room member storage tuples to `attrs` classes. diff --git a/synapse/storage/roommember.py b/synapse/storage/roommember.py index 0ff66debdf..9fad67ce48 100644 --- a/synapse/storage/roommember.py +++ b/synapse/storage/roommember.py @@ -23,7 +23,7 @@ from synapse.types import PersistedEventPosition 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 @@ -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. -- cgit 1.4.1