0
0
Fork 1
mirror of https://mau.dev/maunium/synapse.git synced 2024-11-16 06:51:46 +01:00
Commit graph

24232 commits

Author SHA1 Message Date
dependabot[bot]
ac8c9ac50d
Bump python-multipart from 0.0.9 to 0.0.10 (#17745)
Bumps [python-multipart](https://github.com/Kludex/python-multipart)
from 0.0.9 to 0.0.10.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/Kludex/python-multipart/releases">python-multipart's
releases</a>.</em></p>
<blockquote>
<h2>Version 0.0.10</h2>
<h2>What's Changed</h2>
<ul>
<li>Support <code>on_header_begin</code> by <a
href="https://github.com/Kludex"><code>@​Kludex</code></a> in <a
href="https://redirect.github.com/Kludex/python-multipart/pull/103">Kludex/python-multipart#103</a></li>
<li>Improve type hints on <code>FormParser</code> by <a
href="https://github.com/Kludex"><code>@​Kludex</code></a> in <a
href="https://redirect.github.com/Kludex/python-multipart/pull/104">Kludex/python-multipart#104</a></li>
<li>Fix <code>OnFileCallback</code> type by <a
href="https://github.com/Kludex"><code>@​Kludex</code></a> in <a
href="https://redirect.github.com/Kludex/python-multipart/pull/106">Kludex/python-multipart#106</a></li>
<li>Improve type hints by <a
href="https://github.com/Kludex"><code>@​Kludex</code></a> in <a
href="https://redirect.github.com/Kludex/python-multipart/pull/110">Kludex/python-multipart#110</a></li>
<li>Improve type hints on <code>File</code> by <a
href="https://github.com/Kludex"><code>@​Kludex</code></a> in <a
href="https://redirect.github.com/Kludex/python-multipart/pull/111">Kludex/python-multipart#111</a></li>
<li>Add type hint to helper functions by <a
href="https://github.com/Kludex"><code>@​Kludex</code></a> in <a
href="https://redirect.github.com/Kludex/python-multipart/pull/112">Kludex/python-multipart#112</a></li>
<li>Minor fix for Field.<strong>repr</strong> by <a
href="https://github.com/eltbus"><code>@​eltbus</code></a> in <a
href="https://redirect.github.com/Kludex/python-multipart/pull/114">Kludex/python-multipart#114</a></li>
<li>Fix use of chunk_size parameter by <a
href="https://github.com/jhnstrk"><code>@​jhnstrk</code></a> in <a
href="https://redirect.github.com/Kludex/python-multipart/pull/136">Kludex/python-multipart#136</a></li>
<li>Allow digits and valid token chars in headers by <a
href="https://github.com/jhnstrk"><code>@​jhnstrk</code></a> in <a
href="https://redirect.github.com/Kludex/python-multipart/pull/134">Kludex/python-multipart#134</a></li>
<li>Fix headers being carried between parts. fixes <a
href="https://redirect.github.com/Kludex/python-multipart/issues/63">#63</a>
by <a href="https://github.com/jhnstrk"><code>@​jhnstrk</code></a> in <a
href="https://redirect.github.com/Kludex/python-multipart/pull/135">Kludex/python-multipart#135</a></li>
</ul>
<h2>New Contributors</h2>
<ul>
<li><a
href="https://github.com/onuralpszr"><code>@​onuralpszr</code></a> made
their first contribution in <a
href="https://redirect.github.com/Kludex/python-multipart/pull/108">Kludex/python-multipart#108</a></li>
<li><a
href="https://github.com/janusheide"><code>@​janusheide</code></a> made
their first contribution in <a
href="https://redirect.github.com/Kludex/python-multipart/pull/119">Kludex/python-multipart#119</a></li>
<li><a
href="https://github.com/yecril23pl"><code>@​yecril23pl</code></a> made
their first contribution in <a
href="https://redirect.github.com/Kludex/python-multipart/pull/121">Kludex/python-multipart#121</a></li>
<li><a href="https://github.com/manunio"><code>@​manunio</code></a> made
their first contribution in <a
href="https://redirect.github.com/Kludex/python-multipart/pull/117">Kludex/python-multipart#117</a></li>
<li><a href="https://github.com/jhnstrk"><code>@​jhnstrk</code></a> made
their first contribution in <a
href="https://redirect.github.com/Kludex/python-multipart/pull/136">Kludex/python-multipart#136</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/Kludex/python-multipart/compare/0.0.9...0.0.10">https://github.com/Kludex/python-multipart/compare/0.0.9...0.0.10</a></p>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/Kludex/python-multipart/blob/master/CHANGELOG.md">python-multipart's
changelog</a>.</em></p>
<blockquote>
<h2>0.0.10 (2024-09-21)</h2>
<ul>
<li>Support <code>on_header_begin</code> <a
href="https://redirect.github.com/Kludex/python-multipart/pull/103">#103</a>.</li>
<li>Improve type hints on <code>FormParser</code> <a
href="https://redirect.github.com/Kludex/python-multipart/pull/104">#104</a>.</li>
<li>Fix <code>OnFileCallback</code> type <a
href="https://redirect.github.com/Kludex/python-multipart/pull/106">#106</a>.</li>
<li>Improve type hints <a
href="https://redirect.github.com/Kludex/python-multipart/pull/110">#110</a>.</li>
<li>Improve type hints on <code>File</code> <a
href="https://redirect.github.com/Kludex/python-multipart/pull/111">#111</a>.</li>
<li>Add type hint to helper functions <a
href="https://redirect.github.com/Kludex/python-multipart/pull/112">#112</a>.</li>
<li>Minor fix for Field.<strong>repr</strong> <a
href="https://redirect.github.com/Kludex/python-multipart/pull/114">#114</a>.</li>
<li>Fix use of chunk_size parameter <a
href="https://redirect.github.com/Kludex/python-multipart/pull/136">#136</a>.</li>
<li>Allow digits and valid token chars in headers <a
href="https://redirect.github.com/Kludex/python-multipart/pull/134">#134</a>.</li>
<li>Fix headers being carried between parts <a
href="https://redirect.github.com/Kludex/python-multipart/pull/135">#135</a>.</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="851a0263fc"><code>851a026</code></a>
Add entry to changelog (<a
href="https://redirect.github.com/Kludex/python-multipart/issues/157">#157</a>)</li>
<li><a
href="265d6a4d1c"><code>265d6a4</code></a>
Upgrade documentation packages (<a
href="https://redirect.github.com/Kludex/python-multipart/issues/156">#156</a>)</li>
<li><a
href="21825fced4"><code>21825fc</code></a>
Version 0.0.10 (<a
href="https://redirect.github.com/Kludex/python-multipart/issues/155">#155</a>)</li>
<li><a
href="0defda6213"><code>0defda6</code></a>
Update pipelines (<a
href="https://redirect.github.com/Kludex/python-multipart/issues/154">#154</a>)</li>
<li><a
href="c664cef3bb"><code>c664cef</code></a>
Use uv (<a
href="https://redirect.github.com/Kludex/python-multipart/issues/153">#153</a>)</li>
<li><a
href="8b85d35fd7"><code>8b85d35</code></a>
Fix headers being carried between parts. fixes <a
href="https://redirect.github.com/Kludex/python-multipart/issues/63">#63</a>
(<a
href="https://redirect.github.com/Kludex/python-multipart/issues/135">#135</a>)</li>
<li><a
href="3ea51c714e"><code>3ea51c7</code></a>
Allow digits and valid token chars in headers (<a
href="https://redirect.github.com/Kludex/python-multipart/issues/134">#134</a>)</li>
<li><a
href="3a722ed61a"><code>3a722ed</code></a>
Fix use of chunk_size parameter (<a
href="https://redirect.github.com/Kludex/python-multipart/issues/136">#136</a>)</li>
<li><a
href="b5a5c19902"><code>b5a5c19</code></a>
Bump the python-packages group with 7 updates (<a
href="https://redirect.github.com/Kludex/python-multipart/issues/138">#138</a>)</li>
<li><a
href="eb7b1fc392"><code>eb7b1fc</code></a>
Bump the github-actions group with 1 update (<a
href="https://redirect.github.com/Kludex/python-multipart/issues/139">#139</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/Kludex/python-multipart/compare/0.0.9...0.0.10">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=python-multipart&package-manager=pip&previous-version=0.0.9&new-version=0.0.10)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-09-24 18:50:57 +02:00
dependabot[bot]
443a9eb335
Bump bytes from 1.7.1 to 1.7.2 (#17743)
Bumps [bytes](https://github.com/tokio-rs/bytes) from 1.7.1 to 1.7.2.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/tokio-rs/bytes/releases">bytes's
releases</a>.</em></p>
<blockquote>
<h2>Bytes 1.7.2</h2>
<h1>1.7.2 (September 17, 2024)</h1>
<h3>Fixed</h3>
<ul>
<li>Fix default impl of <code>Buf::{get_int, get_int_le}</code> (<a
href="https://redirect.github.com/tokio-rs/bytes/issues/732">#732</a>)</li>
</ul>
<h3>Documented</h3>
<ul>
<li>Fix double spaces in comments and doc comments (<a
href="https://redirect.github.com/tokio-rs/bytes/issues/731">#731</a>)</li>
</ul>
<h3>Internal changes</h3>
<ul>
<li>Ensure BytesMut::advance reduces capacity (<a
href="https://redirect.github.com/tokio-rs/bytes/issues/728">#728</a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/tokio-rs/bytes/blob/master/CHANGELOG.md">bytes's
changelog</a>.</em></p>
<blockquote>
<h1>1.7.2 (September 17, 2024)</h1>
<h3>Fixed</h3>
<ul>
<li>Fix default impl of <code>Buf::{get_int, get_int_le}</code> (<a
href="https://redirect.github.com/tokio-rs/bytes/issues/732">#732</a>)</li>
</ul>
<h3>Documented</h3>
<ul>
<li>Fix double spaces in comments and doc comments (<a
href="https://redirect.github.com/tokio-rs/bytes/issues/731">#731</a>)</li>
</ul>
<h3>Internal changes</h3>
<ul>
<li>Ensure BytesMut::advance reduces capacity (<a
href="https://redirect.github.com/tokio-rs/bytes/issues/728">#728</a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="d7c1d658d9"><code>d7c1d65</code></a>
chore: prepare bytes v1.7.2 (<a
href="https://redirect.github.com/tokio-rs/bytes/issues/736">#736</a>)</li>
<li><a
href="ac46ebdd46"><code>ac46ebd</code></a>
ci: update nightly to nightly-2024-09-15 (<a
href="https://redirect.github.com/tokio-rs/bytes/issues/734">#734</a>)</li>
<li><a
href="79fb85323c"><code>79fb853</code></a>
fix: apply sign extension when decoding int (<a
href="https://redirect.github.com/tokio-rs/bytes/issues/732">#732</a>)</li>
<li><a
href="291df5acc9"><code>291df5a</code></a>
Fix double spaces in comments and doc comments (<a
href="https://redirect.github.com/tokio-rs/bytes/issues/731">#731</a>)</li>
<li><a
href="ed7d5ff39e"><code>ed7d5ff</code></a>
test: ensure BytesMut::advance reduces capacity (<a
href="https://redirect.github.com/tokio-rs/bytes/issues/728">#728</a>)</li>
<li>See full diff in <a
href="https://github.com/tokio-rs/bytes/compare/v1.7.1...v1.7.2">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=bytes&package-manager=cargo&previous-version=1.7.1&new-version=1.7.2)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-09-24 18:33:57 +02:00
Erik Johnston
aad26cb93f
Never return negative bump stamp (#17748)
Fixes #17737
2024-09-24 10:07:23 +00:00
Andrew Ferrazzutti
5173741c71
Support MSC4140: Delayed events (Futures) (#17326) 2024-09-23 13:33:48 +01:00
Erik Johnston
75e2c17d2a
Speed up sorting of sliding sync rooms in initial request (#17734)
We do this by using the event stream cache.

---------

Co-authored-by: Devon Hudson <devon.dmytro@gmail.com>
2024-09-20 08:12:56 +01:00
Erik Johnston
a851f6b237
Sliding sync: Add connection tracking to the account_data extension (#17695)
This is basically exactly the same logic as for receipts. Essentially we
just need to track which room account data we have and haven't sent down
to clients, and use that when we pull stuff out.

I think this just needs a couple of extra tests written

---------

Co-authored-by: Eric Eastwood <eric.eastwood@beta.gouv.fr>
2024-09-19 19:51:51 +01:00
Eric Eastwood
c2e5e9e67c
Sliding Sync: Avoid fetching left rooms and add back newly_left rooms (#17725)
Performance optimization: We can avoid fetching rooms that the user has
left themselves (which could be a significant amount), then only add
back rooms that the user has `newly_left` (left in the token range of an
incremental sync). It's a lot faster to fetch less rooms than fetch them
all and throw them away in most cases. Since the user only leaves a room
(or is state reset out) once in a blue moon, we can avoid a lot of work.

Based on @erikjohnston's branch, erikj/ss_perf


---------

Co-authored-by: Erik Johnston <erik@matrix.org>
2024-09-19 10:07:18 -05:00
Erik Johnston
07a51d2a56
Fix sliding sync for rooms with unknown room version (#17733)
Follow on from #17727
2024-09-19 14:01:11 +01:00
Eric Eastwood
83fc225030
Sliding Sync: Add cache to get_tags_for_room(...) (#17730)
Add cache to `get_tags_for_room(...)`

This helps Sliding Sync because `get_tags_for_room(...)` is going to be
used in https://github.com/element-hq/synapse/pull/17695

Essentially, we're just trying to match `get_account_data_for_room(...)`
which already has a tree cache.
2024-09-19 12:43:26 +01:00
Eric Eastwood
a9c0e27eb7
Sliding Sync: No need to sort if the range is large enough to cover all of the rooms (#17731)
No need to sort if the range is large enough to cover all of the rooms
in the list. Previously, we would only do this optimization if the range
was exactly large enough.

Follow-up to https://github.com/element-hq/synapse/pull/17672
2024-09-19 09:33:34 +01:00
Eric Eastwood
faf5b40520
Sliding Sync: Fix _bulk_get_max_event_pos(...) being inefficient (#17728)
Fix `_bulk_get_max_event_pos(...)` being inefficient. It kept adding all
of the `batch_results` to the `results` over and over every time we
checked a single room in the batch.

I think we still ended up with the right answer before because we
accumulate `recheck_rooms` and actually recheck them to overwrite the
bad data we wrote to the `results` before.

Introduced in
https://github.com/element-hq/synapse/pull/17606/files#diff-cbd54e4b5a2a1646299d659a2d5884d6cb14e608efd2e1658e72b465bb66e31bR1481
2024-09-19 09:32:16 +01:00
Eric Eastwood
af998e6c66
Sliding sync: Ignore invites from ignored users (#17729)
`m.ignored_user_list` in account data
2024-09-18 18:09:23 -05:00
Eric Eastwood
61b7c31772
Sliding Sync: Shortcut for checking if certain background updates have completed (#17724)
Shortcut for checking if certain background updates have completed

Pulling this change out from one of @erikjohnston's branches
(https://github.com/element-hq/synapse/compare/develop...erikj/ss_perf)

---------

Co-authored-by: Erik Johnston <erikj@element.io>
2024-09-18 13:12:14 -05:00
Kegan Dougal
3c8a116e1a
Sliding Sync: bugfix: ensure we can sync with SSS even with missing rooms (#17727)
Fixes https://github.com/element-hq/element-x-ios/issues/3300

Some rooms are missing from `sliding_sync_joined_rooms`. When this
happens, the first call will succeed, but any subsequent calls for this
room ID will cause the cache to return `None` for the room ID, rather
than not having the key at all. This then causes the `<=` check to
throw.

Root cause: https://github.com/element-hq/synapse/issues/17726

### Pull Request Checklist

<!-- Please read
https://element-hq.github.io/synapse/latest/development/contributing_guide.html
before submitting your pull request -->

* [x] Pull request is based on the develop branch
* [ ] Pull request includes a [changelog
file](https://element-hq.github.io/synapse/latest/development/contributing_guide.html#changelog).
The entry should:
- Be a short description of your change which makes sense to users.
"Fixed a bug that prevented receiving messages from other servers."
instead of "Moved X method from `EventStore` to `EventWorkerStore`.".
  - Use markdown where necessary, mostly for `code blocks`.
  - End with either a period (.) or an exclamation mark (!).
  - Start with a capital letter.
- Feel free to credit yourself, by adding a sentence "Contributed by
@github_username." or "Contributed by [Your Name]." to the end of the
entry.
* [ ] [Code
style](https://element-hq.github.io/synapse/latest/code_style.html) is
correct
(run the
[linters](https://element-hq.github.io/synapse/latest/development/contributing_guide.html#run-the-linters))
2024-09-18 16:25:50 +00:00
Shay
51dd4df0a3
Add an Admin API endpoint to redact all a user's events (#17506) 2024-09-18 10:08:01 +00:00
Eric Eastwood
8881ad6d4b
Sliding Sync: Short-circuit have_finished_sliding_sync_background_jobs (#17723)
We only need to check it if returned bump stamp is `None`, which is rare.

Pulling this change out from one of @erikjohnston's branches
(https://github.com/element-hq/synapse/compare/develop...erikj/ss_perf)
2024-09-17 17:36:59 -05:00
Olivier 'reivilibre
d40bc279ed Merge branch 'master' into develop 2024-09-17 15:47:32 +01:00
Olivier 'reivilibre
d10872ee75 1.115.0 2024-09-17 14:32:29 +01:00
Eric Eastwood
03937a1cae
Sliding Sync: Return room tags in account data extension (#17707)
The account data extension was also updated to avoid copies when we pull
the data out of the cache.

Fix https://github.com/element-hq/synapse/issues/17694
2024-09-16 13:47:35 -05:00
dependabot[bot]
285de43e48
Bump anyhow from 1.0.87 to 1.0.89 (#17716)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-09-16 18:52:48 +01:00
dependabot[bot]
4900438712
Bump pyasn1 from 0.6.0 to 0.6.1 (#17714)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-09-16 18:52:10 +01:00
dependabot[bot]
cf982d2e32
Bump ruff from 0.6.4 to 0.6.5 (#17715)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-09-16 18:51:33 +01:00
dependabot[bot]
7589565edd
Bump types-requests from 2.32.0.20240712 to 2.32.0.20240914 (#17713)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-09-16 18:32:39 +01:00
dependabot[bot]
7ed23e072e
Bump sentry-sdk from 2.13.0 to 2.14.0 (#17712) 2024-09-16 18:32:01 +01:00
David Baker
4ac783549c
Sliding Sync: Support filtering by 'tags' / 'not_tags' in SSS (#17662)
This appears to be enough to make Element Web work (or at least move it
on to the next hurdle)

---------

Co-authored-by: Eric Eastwood <eric.eastwood@beta.gouv.fr>
2024-09-12 20:18:19 -05:00
Erik Johnston
1cb84aaab5
Sliding Sync: Increase concurrency of sliding sync a bit (#17696)
For initial requests a typical page size is 20 rooms, so we may as well
do the batching as 20.

This should speed up bigger syncs a little bit.
2024-09-12 16:36:16 -05:00
Eric Eastwood
9b83fb7c16
Sliding Sync: Move filters tests to rest layer (#17703)
Move filters tests to rest layer in order to test the new (with sliding
sync tables) and fallback paths that Sliding Sync can use.

Also found a bug in the new path because it's not being tested which is
also fixed in this PR. We now take into account `has_known_state` when
filtering.

Spawning from
https://github.com/element-hq/synapse/pull/17662#discussion_r1755574791.
This should have been done when we started using the new sliding sync
tables in https://github.com/element-hq/synapse/pull/17630
2024-09-12 15:27:03 -05:00
Andrew Morgan
c5b4be6d07 Merge branch 'release-v1.115' into develop 2024-09-12 13:05:43 +01:00
Andrew Morgan
4c66a7cbed 1.115.0rc2 2024-09-12 11:10:31 +01:00
Éloi Rivard
ebad618bf0
import pydantic objects from the _pydantic_compat module (#17667)
This PR changes `from pydantic import BaseModel` to `from
synapse._pydantic_compat import BaseModel` (as well as `constr`,
`conbytes`, `conint`, `confloat`).

It allows `check_pydantic_models.py` to mock those pydantic objects only
in the synapse module, and not interfere with pydantic objects in
external dependencies.

This should solve the CI problems for #17144, which breaks because
`check_pydantic_models.py` patches pydantic models from
[scim2-models](https://scim2-models.readthedocs.io/).

/cc @DMRobertson @gotmax23
fixes #17659 


### Pull Request Checklist

<!-- Please read
https://element-hq.github.io/synapse/latest/development/contributing_guide.html
before submitting your pull request -->

* [x] Pull request is based on the develop branch
* [x] Pull request includes a [changelog
file](https://element-hq.github.io/synapse/latest/development/contributing_guide.html#changelog).
The entry should:
- Be a short description of your change which makes sense to users.
"Fixed a bug that prevented receiving messages from other servers."
instead of "Moved X method from `EventStore` to `EventWorkerStore`.".
  - Use markdown where necessary, mostly for `code blocks`.
  - End with either a period (.) or an exclamation mark (!).
  - Start with a capital letter.
- Feel free to credit yourself, by adding a sentence "Contributed by
@github_username." or "Contributed by [Your Name]." to the end of the
entry.
* [x] [Code
style](https://element-hq.github.io/synapse/latest/code_style.html) is
correct
(run the
[linters](https://element-hq.github.io/synapse/latest/development/contributing_guide.html#run-the-linters))
2024-09-11 21:01:43 +00:00
Eric Eastwood
16af80b8fb
Sliding Sync: Use Sliding Sync tables for sorting (#17693)
Use Sliding Sync tables for sorting
(`bulk_get_last_event_pos_in_room_before_stream_ordering(...)` ->
`_bulk_get_max_event_pos(...)`)
2024-09-11 12:16:24 -05:00
Eric Eastwood
e4a1f271b9
Sliding Sync: Make sure we get up-to-date information from get_sliding_sync_rooms_for_user(...) (#17692)
We need to bust the `get_sliding_sync_rooms_for_user`
cache when the room encryption is updated and any
other field that is used in the query.

Follow-up to https://github.com/element-hq/synapse/pull/17630

- Bust cache for membership change (cross-reference
`get_rooms_for_user`)
- Bust cache for room `encryption` (cross-reference
`get_room_encryption`)
- Bust cache for `forgotten` (cross-reference
`did_forget`/`get_forgotten_rooms_for_user`)
2024-09-11 12:13:54 -05:00
Erik Johnston
6b131a99fe Merge remote-tracking branch 'origin/release-v1.115' into develop 2024-09-11 16:43:07 +01:00
Erik Johnston
76f7c91e44 Sliding sync: don't fetch room summary for named rooms. (#17683)
For rooms with a name we can skip fetching a full room summary, as we
don't need to calculate heroes, and instead just fetch the room counts
directly.

This also changes things to not return counts and heroes for non-joined
rooms. For left/banned rooms we were returning zero values anyway, and
for invite/knock rooms we don't really want to leak such information
(even if some of is included in the stripped state).
2024-09-11 16:42:50 +01:00
Erik Johnston
b732d13d4c Sliding sync: various fixups to the background update (#17652) 2024-09-11 16:42:15 +01:00
Erik Johnston
596b96411b
Sliding sync: various fixups to the background update (#17652) 2024-09-11 15:38:46 +01:00
Erik Johnston
f6c2b0ec2e
Sliding sync: don't fetch room summary for named rooms. (#17683)
For rooms with a name we can skip fetching a full room summary, as we
don't need to calculate heroes, and instead just fetch the room counts
directly.

This also changes things to not return counts and heroes for non-joined
rooms. For left/banned rooms we were returning zero values anyway, and
for invite/knock rooms we don't really want to leak such information
(even if some of is included in the stripped state).
2024-09-11 13:16:57 +01:00
Travis Ralston
a7fcac5648
Enable guest access on new media endpoints, per MSC4189 (#17675) 2024-09-10 18:29:24 +01:00
V02460
e06e3c4004
Add config option turn_shared_secret_path (#17690)
Co-authored-by: Andrew Morgan <1342360+anoadragon453@users.noreply.github.com>
2024-09-10 17:27:46 +00:00
dependabot[bot]
60441059a3
Bump anyhow from 1.0.86 to 1.0.87 (#17685)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-09-10 18:05:31 +01:00
Jeremy Wright
1b197752b6
Fix minor misspelling in README.rst. (#17664) 2024-09-10 17:33:25 +01:00
dependabot[bot]
598a83d005
Bump cryptography from 43.0.0 to 43.0.1 (#17689)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-09-10 17:32:17 +01:00
dependabot[bot]
be603de2cb
Bump serde_json from 1.0.127 to 1.0.128 (#17687)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-09-10 17:31:34 +01:00
dependabot[bot]
62523571ae
Bump serde from 1.0.209 to 1.0.210 (#17686) 2024-09-10 17:30:37 +01:00
Devon Hudson
5562a89168
Update changelog 2024-09-10 08:48:41 -06:00
Devon Hudson
59bcbcec0a
1.115.0rc1 2024-09-10 08:42:01 -06:00
dependabot[bot]
d8b926d323
Bump idna from 3.7 to 3.8 (#17682) 2024-09-10 10:34:54 +01:00
dependabot[bot]
2efed1d4fb
Bump types-setuptools from 71.1.0.20240818 to 74.1.0.20240907 (#17681) 2024-09-10 10:34:45 +01:00
dependabot[bot]
cd24bc2f36
Bump ruff from 0.6.2 to 0.6.4 (#17680) 2024-09-10 10:34:34 +01:00
dependabot[bot]
a193d4a1b5
Bump authlib from 1.3.1 to 1.3.2 (#17679) 2024-09-10 10:34:26 +01:00