summary refs log tree commit diff
diff options
context:
space:
mode:
authorPatrick Cloke <clokep@users.noreply.github.com>2021-08-18 11:00:37 -0400
committerGitHub <noreply@github.com>2021-08-18 15:00:37 +0000
commitd9856d9150c05577282cb52f548de7737bb1e454 (patch)
tree83b569b426696947830220829cbf4a41bb69d6b1
parentConvert room member storage tuples to attrs. (#10629) (diff)
downloadsynapse-d9856d9150c05577282cb52f548de7737bb1e454.tar.xz
Fix weakref_slot parameter for room member storage attrs. (#10642)
Follow-up to #10629 which set it to true, not false.
Diffstat (limited to '')
-rw-r--r--changelog.d/10642.misc1
-rw-r--r--synapse/storage/roommember.py8
2 files changed, 5 insertions, 4 deletions
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.