This repository has been archived by the owner on Apr 26, 2024. It is now read-only.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fix leaking per-room profiles for local users when rebuilding directory #10761
Fix leaking per-room profiles for local users when rebuilding directory #10761
Changes from 9 commits
e83e24f
fe335e7
e370bce
559d5c7
c3bc1d4
ede54d6
b74c822
269fa14
d99aee0
c5f34ac
61d584e
eac5c23
6e61645
039fb4c
cfe7458
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Where did this come from/Can you explain? (sounds sarcastic — it's not. I just wonder if this is what we're meant to do. I guess the store is one of those big mixins we were talking about [finally clicked in my head]. I don't know enough about Python multi-inheritance rules — do we do this anywhere else? Will it cause problems?)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
DataStore is a class with a lot of parents; dunno if we'd consider that a mixin. (I think of a mixin as something that's designed to be used with multiple inheritance, but isn't really a standalone Thing/Entity by itself.)
But yeah, the DataStore inherits from 9001 other Stores but... they're not all independent. Sometimes they call each other's methods.
Being honest, my motivation is
erm, pass. I think the status quo is "yeah it sucks, and @erikjohnston has a plan how we could do things better one day"
I had to be careful to order the parent classes, or else Python will fail to create a class because it can't build a consistent MRO.
Was hoping to rely on unit tests to figure that out. Would appreciate input from the rest of the team here.
Having looked over it, I think this these classes get pulled in by the
UserDirectoryBackgroundUpdateStore
, not theUserDirectoryStore
.