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

Change EventContext to use the Storage class #6564

Merged
merged 3 commits into from
Dec 20, 2019

Conversation

erikjohnston
Copy link
Member

This is needed as get_state_ids_for_group will be moving out of the main data store.

@@ -295,28 +298,30 @@ class _AsyncEventContextImpl(EventContext):
that was replaced.
"""

# This needs to have a default as we're inheriting
_storage = attr.ib(default=None)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Annoyingly this needs a default, otherwise attr complains (as we're inheriting from a attr class which have attributes with default values). I'm not sure if there's another way round this beyond removing all the defaults.

@erikjohnston erikjohnston requested a review from a team December 18, 2019 15:03
Copy link
Member

@richvdh richvdh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm otherwise

synapse/events/snapshot.py Show resolved Hide resolved
@erikjohnston erikjohnston merged commit fa780e9 into develop Dec 20, 2019
@erikjohnston erikjohnston deleted the erikj/context_storage branch January 9, 2020 15:47
babolivier pushed a commit that referenced this pull request Sep 1, 2021
* commit 'fa780e972':
  Change EventContext to use the Storage class (#6564)
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants