From 2ebb3025a350f5dfaeb32f51e412be0debefcaf0 Mon Sep 17 00:00:00 2001 From: Julian Hille Date: Wed, 15 Mar 2023 10:08:59 +0100 Subject: [PATCH] Prepare for release 1.79.0.0 --- CHANGELOG.md | 11 ++++++- .../test_utils/event_injection.py | 31 +++++++++++++++++++ matrix_synapse_testutils/unittest.py | 4 +-- pyproject.toml | 2 +- 4 files changed, 44 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 63f8428..667a8e9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,14 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. ## [Unreleased] + +### [1.79.0.0] - 2023-03-15 + +### Updated + +- Synapse to 1.79.0 + + ### [1.78.0.0] - 2023-02-28 ### Updated @@ -118,7 +126,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Location of github action workflow file `build.yml` - Fix robustness for matrix-synapse name and packages changes and rebuilding in the same path (updater script) -[unreleased]: https://github.com/conhealth/LifeTime-Desktop/compare/v1.78.0.0...HEAD +[unreleased]: https://github.com/conhealth/LifeTime-Desktop/compare/v1.79.0.0...HEAD +[1.79.0.0]: https://github.com/conhealth/LifeTime-Desktop/compare/v1.78.0.0...v1.79.0.0 [1.78.0.0]: https://github.com/conhealth/LifeTime-Desktop/compare/v1.77.0.0...v1.78.0.0 [1.77.0.0]: https://github.com/conhealth/LifeTime-Desktop/compare/v1.76.0.0...v1.77.0.0 [1.76.0.0]: https://github.com/conhealth/LifeTime-Desktop/compare/v1.75.0.0...v1.76.0.0 diff --git a/matrix_synapse_testutils/test_utils/event_injection.py b/matrix_synapse_testutils/test_utils/event_injection.py index a6330ed..9679904 100644 --- a/matrix_synapse_testutils/test_utils/event_injection.py +++ b/matrix_synapse_testutils/test_utils/event_injection.py @@ -102,3 +102,34 @@ async def create_event( context = await unpersisted_context.persist(event) return event, context + + +async def mark_event_as_partial_state( + hs: synapse.server.HomeServer, + event_id: str, + room_id: str, +) -> None: + """ + (Falsely) mark an event as having partial state. + + Naughty, but occasionally useful when checking that partial state doesn't + block something from happening. + + If the event already has partial state, this insert will fail (event_id is unique + in this table). + """ + store = hs.get_datastores().main + await store.db_pool.simple_upsert( + table="partial_state_rooms", + keyvalues={"room_id": room_id}, + values={}, + insertion_values={"room_id": room_id}, + ) + + await store.db_pool.simple_insert( + table="partial_state_events", + values={ + "room_id": room_id, + "event_id": event_id, + }, + ) diff --git a/matrix_synapse_testutils/unittest.py b/matrix_synapse_testutils/unittest.py index d88a137..421d7a8 100644 --- a/matrix_synapse_testutils/unittest.py +++ b/matrix_synapse_testutils/unittest.py @@ -723,7 +723,7 @@ def create_and_send_event( event_creator = self.hs.get_event_creation_handler() requester = create_requester(user) - event, context = self.get_success( + event, unpersisted_context = self.get_success( event_creator.create_event( requester, { @@ -735,7 +735,7 @@ def create_and_send_event( prev_event_ids=prev_event_ids, ) ) - + context = self.get_success(unpersisted_context.persist(event)) if soft_failed: event.internal_metadata.soft_failed = True diff --git a/pyproject.toml b/pyproject.toml index 98cf9f3..06f8cf7 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -16,7 +16,7 @@ classifiers = [ "Topic :: Software Development" ] dependencies = [ - "matrix-synapse[test]==1.78.0" + "matrix-synapse[test]==1.79.0" ] [project.urls]