summary refs log tree commit diff
path: root/tests/test_test_utils.py (unfollow)
Commit message (Collapse)AuthorFilesLines
2023-02-101.77.0rc2 v1.77.0rc2David Robertson5-3/+22
2023-02-09Bump schema version (#15036)David Robertson2-2/+8
* Bump schema version This should have been included in f10caa73eee0caa91cf373966104d1ededae2aee (and #14979). * Changelog
2023-02-08Fix bug in replication where response is cached (#15024)Erik Johnston2-0/+3
2023-02-08Permalink to the docs v1.77.0rc1David Robertson1-1/+1
2023-02-08Note the revert (that I didn't PR)David Robertson1-1/+1
2023-02-08Merge the osx wheel fix with poetry-core 1.5.0David Robertson1-2/+1
2023-02-08Rearrange itemsDavid Robertson1-23/+24
2023-02-08Manually add new news fragmentsDavid Robertson3-2/+2
2023-02-07Hacky fix to make mac wheels (#15019)David Robertson3-2/+12
* Skip testing PyPy wheels One of the test builds on #15015 failed to install a pp38-* wheel because it didn't have access to the openssl headers to build `cryptography` from source. We don't run CI against PyPy so I'm going to be a meanie and skip testing the wheels. (And I've no idea why 3.8 was special in the first place, either.) * Hack the name of the wheel so cibw can test it I hate hate hate hate hate hate hate hate hate this * Changelog * Apply suggestions from code review Co-authored-by: Patrick Cloke <clokep@users.noreply.github.com> --------- Co-authored-by: Patrick Cloke <clokep@users.noreply.github.com>
2023-02-07Include no actions instead of dont_notify for suppressing edits. (#15016)Patrick Cloke2-1/+2
2023-02-07Disambiguate `get_ex_outlier_stream_rows` queryDavid Robertson1-4/+4
A backwards-compatible piece of #14979 that's safe to land now.
2023-02-07Revert "Add `event_stream_ordering` column to membership state tables (#14979)"David Robertson4-145/+11
This reverts commit 5fdc12f482c68e2cdbb78d7db5de2cfe621720d4.
2023-02-071.77.0rc1David Robertson63-61/+67
2023-02-07Proper types for tests.test_terms_auth (#15007)David Robertson3-7/+17
* Proper types for tests.test_terms_auth * Changelog
2023-02-07Add tests for using _flatten_dict with an event. (#15002)Patrick Cloke3-9/+68
2023-02-07Properly typecheck types.http (#14988)David Robertson17-191/+298
* Tweak http types in Synapse AFACIS these are correct, and they make mypy happier on tests.http. * Type hints for test_proxyagent * type hints for test_srv_resolver * test_matrix_federation_agent * tests.http.server._base * tests.http.__init__ * tests.http.test_additional_resource * tests.http.test_client * tests.http.test_endpoint * tests.http.test_matrixfederationclient * tests.http.test_servlet * tests.http.test_simple_client * tests.http.test_site * One fixup in tests.server * Untyped defs * Changelog * Fixup syntax for Python 3.7 * Fix olddeps syntax * Use a twisted IPv4 addr for dummy_address * Fix typo, thanks Sean Co-authored-by: Sean Quah <8349537+squahtx@users.noreply.github.com> * Remove redundant `Optional` --------- Co-authored-by: Sean Quah <8349537+squahtx@users.noreply.github.com>
2023-02-07Add `event_stream_ordering` column to membership state tables (#14979)Nick Mills-Barrett5-11/+146
This adds an `event_stream_ordering` column to `current_state_events`, `local_current_membership` and `room_memberships`. Each of these tables is regularly joined with the `events` table to get the stream ordering and denormalising this into each table will yield significant query performance improvements once used. Includes a background job to populate these values from the `events` table. Same idea as https://github.com/matrix-org/synapse/pull/13703. Signed off by Nick @ Beeper (@fizzadar).
2023-02-06Allow poetry-core 1.5.0 (#14949)icp2-2/+5
2023-02-06Add missing types to test_state. (#14985)Patrick Cloke3-62/+141
2023-02-06Type hints for tests.federation (#14991)David Robertson10-94/+127
* Make tests.federation pass mypy * Untyped defs in tests.federation.transport * test methods return None * Remaining type hints in tests.federation * Changelog * Avoid an uncessary type-ignore
2023-02-06Add missing type hints to tests.replication. (#14987)Patrick Cloke21-149/+193
2023-02-06Expect type stubs from canonicaljson (#14992)David Robertson2-3/+1
* canonicaljson has stubs now since https://github.com/matrix-org/python-canonicaljson/pull/52 which is included in the lockfile version we use for type checking. * Changelog
2023-02-06Type hints for tests.appservice (#14990)David Robertson9-59/+132
* Accept a Sequence of events in synapse.appservice This avoids some casts/ignores in the tests I'm about to fixup. It seems that `List[Mock]` is not a subtype of `List[EventBase]`, but `Sequence[Mock]` is a subtype of `Sequence[EventBase]`. So presumably `Mock` is considered a subtype of anything, much like `Any`. * make tests.appservice.test_scheduler pass mypy * Extra hints in tests.appservice.test_scheduler * Extra hints in tests.appservice.test_api * Extra hints in tests.appservice.test_appservice * Disallow untyped defs * Changelog
2023-02-06Bump anyhow from 1.0.68 to 1.0.69 (#14996)dependabot[bot]2-2/+3
* Bump anyhow from 1.0.68 to 1.0.69 Bumps [anyhow](https://github.com/dtolnay/anyhow) from 1.0.68 to 1.0.69. - [Release notes](https://github.com/dtolnay/anyhow/releases) - [Commits](https://github.com/dtolnay/anyhow/compare/1.0.68...1.0.69) --- updated-dependencies: - dependency-name: anyhow dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> * Changelog --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: GitHub Actions <github-actions[bot]@users.noreply.github.com>
2023-02-06Bump phonenumbers from 8.13.4 to 8.13.5 (#14999)dependabot[bot]2-3/+4
* Bump phonenumbers from 8.13.4 to 8.13.5 Bumps [phonenumbers](https://github.com/daviddrysdale/python-phonenumbers) from 8.13.4 to 8.13.5. - [Release notes](https://github.com/daviddrysdale/python-phonenumbers/releases) - [Commits](https://github.com/daviddrysdale/python-phonenumbers/compare/v8.13.4...v8.13.5) --- updated-dependencies: - dependency-name: phonenumbers dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> * Changelog --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: GitHub Actions <github-actions[bot]@users.noreply.github.com>
2023-02-06Bump isort from 5.11.4 to 5.11.5 (#14998)dependabot[bot]2-4/+5
* Bump isort from 5.11.4 to 5.11.5 Bumps [isort](https://github.com/pycqa/isort) from 5.11.4 to 5.11.5. - [Release notes](https://github.com/pycqa/isort/releases) - [Changelog](https://github.com/PyCQA/isort/blob/main/CHANGELOG.md) - [Commits](https://github.com/pycqa/isort/compare/5.11.4...5.11.5) --- updated-dependencies: - dependency-name: isort dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> * Changelog --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: GitHub Actions <github-actions[bot]@users.noreply.github.com>
2023-02-06Bump serde_json from 1.0.91 to 1.0.92 (#14997)dependabot[bot]2-2/+3
* Bump serde_json from 1.0.91 to 1.0.92 Bumps [serde_json](https://github.com/serde-rs/json) from 1.0.91 to 1.0.92. - [Release notes](https://github.com/serde-rs/json/releases) - [Commits](https://github.com/serde-rs/json/compare/v1.0.91...v1.0.92) --- updated-dependencies: - dependency-name: serde_json dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> * Changelog --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: GitHub Actions <github-actions[bot]@users.noreply.github.com>
2023-02-06Bump prometheus-client from 0.15.0 to 0.16.0 (#14995)dependabot[bot]2-3/+4
* Bump prometheus-client from 0.15.0 to 0.16.0 Bumps [prometheus-client](https://github.com/prometheus/client_python) from 0.15.0 to 0.16.0. - [Release notes](https://github.com/prometheus/client_python/releases) - [Commits](https://github.com/prometheus/client_python/compare/v0.15.0...v0.16.0) --- updated-dependencies: - dependency-name: prometheus-client dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> * Changelog --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: GitHub Actions <github-actions[bot]@users.noreply.github.com>
2023-02-06Bump types-setuptools from 65.6.0.3 to 67.1.0.0 (#14994)dependabot[bot]2-3/+4
* Bump types-setuptools from 65.6.0.3 to 67.1.0.0 Bumps [types-setuptools](https://github.com/python/typeshed) from 65.6.0.3 to 67.1.0.0. - [Release notes](https://github.com/python/typeshed/releases) - [Commits](https://github.com/python/typeshed/commits) --- updated-dependencies: - dependency-name: types-setuptools dependency-type: direct:development update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> * Changelog --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: GitHub Actions <github-actions[bot]@users.noreply.github.com>
2023-02-06Bump hiredis from 2.1.1 to 2.2.1 (#14993)dependabot[bot]2-90/+91
* Bump hiredis from 2.1.1 to 2.2.1 Bumps [hiredis](https://github.com/redis/hiredis-py) from 2.1.1 to 2.2.1. - [Release notes](https://github.com/redis/hiredis-py/releases) - [Changelog](https://github.com/redis/hiredis-py/blob/master/CHANGELOG.md) - [Commits](https://github.com/redis/hiredis-py/compare/v2.1.1...v2.2.1) --- updated-dependencies: - dependency-name: hiredis dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> * Changelog --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: GitHub Actions <github-actions[bot]@users.noreply.github.com>
2023-02-06Only notify the target of a membership event (#14971)David Robertson2-8/+31
* Only notify the target of a membership event Naughty, but should be a big speedup in large rooms
2023-02-03Properly typecheck tests.api (#14983)David Robertson7-110/+140
2023-02-03Implement MSC3958: suppress notifications from edits (#14960)Patrick Cloke9-2/+76
Co-authored-by: Brad Murray <brad@beeper.com> Co-authored-by: Nick Barrett <nick@beeper.com> Copy the suppress_edits push rule from Beeper to implement MSC3958. https://github.com/beeper/synapse/blame/9415a1284b1bfb558bd66f28c24ca1611e6c6fa2/rust/src/push/base_rules.rs#L98-L114
2023-02-03Properly typecheck tests.app (#14984David Robertson5-15/+29
2023-02-03Add a docstring & tests for _flatten_dict. (#14981)Patrick Cloke3-1/+49
2023-02-03Support the backwards compatibility features in MSC3952. (#14958)Patrick Cloke7-59/+184
If the feature is enabled and the event has a `m.mentions` property, skip processing of the legacy mentions rules.
2023-02-03Faster joins: Refactor handling of servers in room (#14954)Sean Quah9-37/+77
Ensure that the list of servers in a partial state room always contains the server we joined off. Also refactor `get_partial_state_servers_at_join` to return `None` when the given room is no longer partial stated, to explicitly indicate when the room has partial state. Otherwise it's not clear whether an empty list means that the room has full state, or the room is partial stated, but the server we joined off told us that there are no servers in the room. Signed-off-by: Sean Quah <seanq@matrix.org>
2023-02-03Reload the pyo3-log config when the Python logging config changes. (#14976)Patrick Cloke5-20/+44
Since pyo3-log is initialized very early in the Python start-up it caches the state of the loggers before they're fully initialized (and thus are essentially disabled). Whenever we reload the logging configuration we now also tell pyo3-log to discard any cached logging configuration it has; it will refetch the current logging configuration from Python at the next point it logs. This fixes Rust log lines not appearing in the homeserver logs.
2023-02-02Skip unused calculations in sync handler. (#14908)Patrick Cloke3-125/+137
If a sync request does not need to calculate per-room entries & is not generating presence & is not generating device list data (e.g. during initial sync) avoid the expensive calculation of room specific data. This is a micro-optimisation for clients syncing simply to receive to-device information.
2023-02-02Do not calculate presence or ephemeral events when they are filtered out ↵Patrick Cloke2-10/+10
(#14970) This expands the previous optimisation from being only for initial sync to being for all sync requests. It also inverts some of the logic to be inclusive instead of exclusive.
2023-02-02Skip unused calculations in sync handler. (#14908)Patrick Cloke3-125/+137
If a sync request does not need to calculate per-room entries & is not generating presence & is not generating device list data (e.g. during initial sync) avoid the expensive calculation of room specific data. This is a micro-optimisation for clients syncing simply to receive to-device information.
2023-02-02Do not calculate presence or ephemeral events when they are filtered out ↵Patrick Cloke2-10/+10
(#14970) This expands the previous optimisation from being only for initial sync to being for all sync requests. It also inverts some of the logic to be inclusive instead of exclusive.
2023-02-02Fetch fewer events when getting hosts in room (#14962)David Robertson2-2/+45
2023-02-02Fix stupid bugDavid Robertson1-2/+4
2023-02-02Don't notify a target who's not in the roomDavid Robertson1-2/+11
Also avoid unncessary DB queries when creating a room
2023-02-02Only notify the target of a membership eventDavid Robertson2-9/+21
Naughty, but should be a big speedup in large rooms Changelog
2023-02-02Bump dtolnay/rust-toolchain from e645b0cf01249a964ec099494d38d2da0f0b349f to ↵dependabot[bot]4-15/+16
9cd00a88a73addc8617065438eff914dd08d0955 (#14968)
2023-02-01Make extension-module optional, but default. (#14965)Patrick Cloke2-1/+6
2023-02-01Allow enabling the asyncio reactor in complement (#14858)realtyem6-4/+42
Signed-off-by: Jason Little realtyem@gmail.com
2023-02-01Bump hiredis from 2.0.0 to 2.1.1 (#14939)dependabot[bot]2-43/+92
* Bump hiredis from 2.0.0 to 2.1.1 Bumps [hiredis](https://github.com/redis/hiredis-py) from 2.0.0 to 2.1.1. - [Release notes](https://github.com/redis/hiredis-py/releases) - [Changelog](https://github.com/redis/hiredis-py/blob/master/CHANGELOG.md) - [Commits](https://github.com/redis/hiredis-py/compare/v2.0.0...v2.1.1) --- updated-dependencies: - dependency-name: hiredis dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> * Changelog --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: GitHub Actions <github-actions[bot]@users.noreply.github.com>
2023-02-01Add helper to parse an enum from query args & use it. (#14956)Patrick Cloke25-96/+176
The `parse_enum` helper pulls an enum value from the query string (by delegating down to the parse_string helper with values generated from the enum). This is used to pull out "f" and "b" in most places and then we thread the resulting Direction enum throughout more code.
2023-02-01Attempt to delete more duplicate rows in receipts_linearized table. (#14915)Patrick Cloke3-9/+30
The previous assumption was that the stream_id column was unique (for a room ID, receipt type, user ID tuple), but this turned out to be incorrect. Now find the max stream ID, then map this back to a database-specific row identifier and delete other rows which match the (room ID, receipt type, user ID) tuple, but *not* the row ID.
2023-02-01Bump docker/build-push-action from 3 to 4 (#14952)dependabot[bot]2-1/+2
* Bump docker/build-push-action from 3 to 4 Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 3 to 4. - [Release notes](https://github.com/docker/build-push-action/releases) - [Commits](https://github.com/docker/build-push-action/compare/v3...v4) --- updated-dependencies: - dependency-name: docker/build-push-action dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> * Changelog --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: GitHub Actions <github-actions[bot]@users.noreply.github.com>
2023-02-01Cherry-pick "Fetch fewer events when getting hosts in room" (WIP #14962)David Robertson2-2/+46
This is a squashed verion of the following commits: - bc739a444fb5bffc6dd3b57399a223bc5b5b4a15 - 70947443798e995ff026819cf5dd6823134ac81a - f781304e1882fd60cdef84d3405767773237629d - 7ee3976debf925fc2f79381c0c51003588e31e32
2023-02-01Add more user information to export-data command. (#14894)Dirk Klimpel6-20/+206
* The user's profile information. * The user's devices. * The user's connections / IP address information.
2023-02-01lnav config for synpase logs (#14953)David Robertson3-0/+115
2023-02-01Fix my hackDavid Robertson1-4/+4
The tag isn't set unless we force tracing, apparently
2023-02-01Fix inconsistencies between MSC3952 and implementation. (#14957)Patrick Cloke2-3/+4
* Correct the push rule IDs. * Removes the sound tweak for room notifications.
2023-01-31update changelog and upgrade notes v1.76.0H. Shay2-2/+2
2023-01-31update changelogH. Shay1-9/+10
2023-01-311.76.0H. Shay4-2/+16
2023-01-31HACK: force tracing for partial state /send_join responsesDavid Robertson1-0/+5
2023-01-31Tag /send_join responses to detect faster joins (#14950)David Robertson3-0/+12
* Tag /send_join responses to detect faster joins * Changelog * Define a proper SynapseTag * isort
2023-01-31Revert "Tag /send_join responses to detect faster joins"David Robertson1-2/+0
This reverts commit 204bdb7f07d4cb4a6cf5fda404071a4f0210bcbb. I will cherry pick #14950 in its place.
2023-01-31Fix running cargo bench & test in CI. (#14943)Patrick Cloke3-0/+36
2023-01-31Tag /send_join responses to detect faster joins (#14950)David Robertson3-0/+12
* Tag /send_join responses to detect faster joins * Changelog * Define a proper SynapseTag * isort
2023-01-31Fix "Re-starting finished log context" spam when creating events (#14947)Sean Quah2-1/+4
`run_in_background` calls re-use the current logging context. When they are not awaited, they can complete after the current logging context has been marked as finished, which leads to log spam. Use `run_as_background_process` instead. Fixes one of the instances of #13090. Signed-off-by: Sean Quah <seanq@matrix.org>
2023-01-31Tag /send_join responses to detect faster joinsDavid Robertson1-0/+2
2023-01-31Make sqlite database migrations transactional again, part two (#14926)Sean Quah5-5/+109
#14910 fixed the regression introduced by #13873 where sqlite database migrations would no longer run inside a transaction. However, it committed the transaction before Synapse updated its bookkeeping of which migrations have been run, which means that migrations may be run again after they have completed successfully. Leave the transaction open at the end of `executescript`, to restore the old, correct behaviour. Also make the PostgreSQL behaviour consistent with SQLite. Fixes #14909. Signed-off-by: Sean Quah <seanq@matrix.org>
2023-01-31Reject boolean power levels (#14944)David Robertson4-6/+7
* Better test for bad values in power levels events The previous test only checked that Synapse didn't raise an exception, but didn't check that we had correctly interpreted the value of the dodgy power level. It also conflated two things: bad room notification levels, and bad user levels. There _is_ logic for converting the latter to integers, but we should test it separately. * Check we ignore types that don't convert to int * Handle `None` values in `notifications.room` * Changelog * Also test that bad values are rejected by event auth * Docstring * linter scripttttttttt * Test boolean values in PL content * Reject boolean power levels * Changelog
2023-01-31Prefer `type(x) is int` to `isinstance(x, int)` (#14945)David Robertson14-47/+75
* Perfer `type(x) is int` to `isinstance(x, int)` This covered all additional instances I could see where `x` was user-controlled. The remaining cases are ``` $ rg -s 'isinstance.*[^_]int' tests/replication/_base.py 576: if isinstance(obj, int): synapse/util/caches/stream_change_cache.py 136: assert isinstance(stream_pos, int) 214: assert isinstance(stream_pos, int) 246: assert isinstance(stream_pos, int) 267: assert isinstance(stream_pos, int) synapse/replication/tcp/external_cache.py 133: if isinstance(result, int): synapse/metrics/__init__.py 100: if isinstance(calls, (int, float)): synapse/handlers/appservice.py 262: assert isinstance(new_token, int) synapse/config/_util.py 62: if isinstance(p, int): ``` which cover metrics, logic related to `jsonschema`, and replication and data streams. AFAICS these are all internal to Synapse * Changelog
2023-01-30Handle malformed values of `notification.room` in power level events (#14942)David Robertson4-17/+128
* Better test for bad values in power levels events The previous test only checked that Synapse didn't raise an exception, but didn't check that we had correctly interpreted the value of the dodgy power level. It also conflated two things: bad room notification levels, and bad user levels. There _is_ logic for converting the latter to integers, but we should test it separately. * Check we ignore types that don't convert to int * Handle `None` values in `notifications.room` * Changelog * Also test that bad values are rejected by event auth * Docstring * linter scripttttttttt
2023-01-30Initial batch of notes on faster joins (#14677)David Robertson3-0/+377
Co-authored-by: Olivier Wilkinson (reivilibre) <oliverw@matrix.org> Co-authored-by: Shay <hillerys@element.io>
2023-01-30Bump types-pillow from 9.4.0.3 to 9.4.0.5 (#14938)dependabot[bot]2-3/+4
* Bump types-pillow from 9.4.0.3 to 9.4.0.5 Bumps [types-pillow](https://github.com/python/typeshed) from 9.4.0.3 to 9.4.0.5. - [Release notes](https://github.com/python/typeshed/releases) - [Commits](https://github.com/python/typeshed/commits) --- updated-dependencies: - dependency-name: types-pillow dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> * Changelog --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: GitHub Actions <github-actions[bot]@users.noreply.github.com>
2023-01-30Bump types-jsonschema from 4.17.0.2 to 4.17.0.3 (#14937)dependabot[bot]2-3/+4
* Bump types-jsonschema from 4.17.0.2 to 4.17.0.3 Bumps [types-jsonschema](https://github.com/python/typeshed) from 4.17.0.2 to 4.17.0.3. - [Release notes](https://github.com/python/typeshed/releases) - [Commits](https://github.com/python/typeshed/commits) --- updated-dependencies: - dependency-name: types-jsonschema dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> * Changelog --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: GitHub Actions <github-actions[bot]@users.noreply.github.com>
2023-01-30Bump types-pyyaml from 6.0.12.2 to 6.0.12.3 (#14936)dependabot[bot]2-3/+4
* Bump types-pyyaml from 6.0.12.2 to 6.0.12.3 Bumps [types-pyyaml](https://github.com/python/typeshed) from 6.0.12.2 to 6.0.12.3. - [Release notes](https://github.com/python/typeshed/releases) - [Commits](https://github.com/python/typeshed/commits) --- updated-dependencies: - dependency-name: types-pyyaml dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> * Changelog --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: GitHub Actions <github-actions[bot]@users.noreply.github.com>
2023-01-30Bump ijson from 3.1.4 to 3.2.0.post0 (#14935)dependabot[bot]2-63/+80
* Bump ijson from 3.1.4 to 3.2.0.post0 Bumps [ijson](https://github.com/ICRAR/ijson) from 3.1.4 to 3.2.0.post0. - [Release notes](https://github.com/ICRAR/ijson/releases) - [Changelog](https://github.com/ICRAR/ijson/blob/master/CHANGELOG.md) - [Commits](https://github.com/ICRAR/ijson/compare/v3.1.4...v3.2.0.post0) --- updated-dependencies: - dependency-name: ijson dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> * Changelog --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: GitHub Actions <github-actions[bot]@users.noreply.github.com>
2023-01-27Implement MSC3952: Intentional mentions (#14823)Patrick Cloke11-11/+263
MSC3952 defines push rules which searches for mentions in a list of Matrix IDs in the event body, instead of searching the entire event body for display name / local part. This is implemented behind an experimental configuration flag and does not yet implement the backwards compatibility pieces of the MSC.
2023-01-27Describe faster joinsDavid Robertson1-0/+17
2023-01-27Use an enum for direction. (#14927)Patrick Cloke9-44/+76
For better type safety we use an enum instead of strings to configure direction (backwards or forwards).
2023-01-271.76.0rc2 v1.76.0rc2David Robertson5-5/+25
2023-01-26Add missing type hints in tests (#14879)Patrick Cloke8-42/+75
* FIx-up type hints in tests.logging. * Add missing type hints to test_transactions.
2023-01-26Fix paginating /relations with a live token (#14866)Patrick Cloke3-70/+123
The `/relations` endpoint was not properly handle "live tokens" (i.e sync tokens), to do this properly we abstract the code that `/messages` has and re-use it.
2023-01-26Use StrCollection in place of Collection[str] in (most) handlers code. (#14922)Patrick Cloke13-58/+43
Due to the increased safety of StrCollection over Collection[str] and Sequence[str].
2023-01-26Batch look-ups to see if rooms are partial stated. (#14917)Patrick Cloke4-11/+43
* Batch look-ups to see if rooms are partial stated. * Fix issues found in linting. * Fix typo. * Apply suggestions from code review Co-authored-by: Sean Quah <8349537+squahtx@users.noreply.github.com> * Clarify comments. Co-authored-by: Sean Quah <8349537+squahtx@users.noreply.github.com> * Also improve the cache size while we're at it * is_partial_state_rooms -> is_partial_state_room_batched * Run `black` * Improve annotation for `simple_select_many_batch` * Fix is_partial_state_room_batched impl * Okay, _actually_ fix impl * Update description. * Update synapse/storage/databases/main/room.py Co-authored-by: Patrick Cloke <clokep@users.noreply.github.com> * Run black. Co-authored-by: Sean Quah <8349537+squahtx@users.noreply.github.com> Co-authored-by: David Robertson <davidr@element.io>
2023-01-26Fix typo in release script (#14920)David Robertson2-1/+2
* Fix typo in release script * Changelog
2023-01-26Fix initialization of `_device_list_id_gen` (#14914)Sean Quah2-0/+2
On startup, the `_device_list_id_gen` stream id generator is initialized using the maximum stream id seen in a list of tables. When we started populating the `device_list_remote_pending` table in #13913, we forgot to add it to the aforementioned list of tables, so the stream id generator can hand out old stream ids after a restart. The end result is that Synapse can fail to handle device list update EDUs after a restart when a partial state join is in progress. Add the `device_list_remote_pending` table to the list of tables to consider when initializing the `_device_list_id_gen` stream id generator. Signed-off-by: Sean Quah <seanq@matrix.org>
2023-01-26Fix type hints in typing edu unit tests (#14886)Andrew Morgan5-43/+66
2023-01-25Fix a bug in the send_local_online_presence_to module API (#14880)Patrick Cloke5-11/+19
Destination was being used incorrectly (a single destination instead of a list of destinations was being passed). This also updates some of the types in the area to not use Collection[str], which is a footgun.
2023-01-25Add missing type hints for tests.events. (#14904)Patrick Cloke6-64/+91
2023-01-25Document how to handle Dependabot pull requests. (#14916)Patrick Cloke2-0/+15
2023-01-25Fix type hints in knocking tests. (#14887)Andrew Morgan4-7/+5
2023-01-25Fix link syntax in changelogDavid Robertson1-1/+1
2023-01-25Refer to upgrade notesDavid Robertson1-0/+6
2023-01-25Touch-up the features sectionDavid Robertson1-3/+3