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

Commit bbb8333

Browse files
committed
Merge remote-tracking branch 'origin/develop' into clokep/thread-bundled-relations
2 parents ee68683 + 319dcb9 commit bbb8333

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

61 files changed

+724
-310
lines changed

CHANGES.md

+14-4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
1+
Synapse 1.47.0rc3 (2021-11-16)
2+
==============================
3+
4+
Bugfixes
5+
--------
6+
7+
- Fix a bug introduced in 1.47.0rc1 which caused worker processes to not halt startup in the presence of outstanding database migrations. ([\#11346](https://github.com/matrix-org/synapse/issues/11346))
8+
- Fix a bug introduced in 1.47.0rc1 which prevented the 'remove deleted devices from `device_inbox` column' background process from running when updating from a recent Synapse version. ([\#11303](https://github.com/matrix-org/synapse/issues/11303), [\#11353](https://github.com/matrix-org/synapse/issues/11353))
9+
10+
111
Synapse 1.47.0rc2 (2021-11-10)
212
==============================
313

@@ -8678,14 +8688,14 @@ General:
86788688

86798689
Federation:
86808690

8681-
- Add key distribution mechanisms for fetching public keys of unavailable remote home servers. See [Retrieving Server Keys](https://github.com/matrix-org/matrix-doc/blob/6f2698/specification/30_server_server_api.rst#retrieving-server-keys) in the spec.
8691+
- Add key distribution mechanisms for fetching public keys of unavailable remote homeservers. See [Retrieving Server Keys](https://github.com/matrix-org/matrix-doc/blob/6f2698/specification/30_server_server_api.rst#retrieving-server-keys) in the spec.
86828692

86838693
Configuration:
86848694

86858695
- Add support for multiple config files.
86868696
- Add support for dictionaries in config files.
86878697
- Remove support for specifying config options on the command line, except for:
8688-
- `--daemonize` - Daemonize the home server.
8698+
- `--daemonize` - Daemonize the homeserver.
86898699
- `--manhole` - Turn on the twisted telnet manhole service on the given port.
86908700
- `--database-path` - The path to a sqlite database to use.
86918701
- `--verbose` - The verbosity level.
@@ -8890,7 +8900,7 @@ This version adds support for using a TURN server. See docs/turn-howto.rst on ho
88908900
Homeserver:
88918901

88928902
- Add support for redaction of messages.
8893-
- Fix bug where inviting a user on a remote home server could take up to 20-30s.
8903+
- Fix bug where inviting a user on a remote homeserver could take up to 20-30s.
88948904
- Implement a get current room state API.
88958905
- Add support specifying and retrieving turn server configuration.
88968906

@@ -8980,7 +8990,7 @@ Changes in synapse 0.2.3 (2014-09-12)
89808990

89818991
Homeserver:
89828992

8983-
- Fix bug where we stopped sending events to remote home servers if a user from that home server left, even if there were some still in the room.
8993+
- Fix bug where we stopped sending events to remote homeservers if a user from that homeserver left, even if there were some still in the room.
89848994
- Fix bugs in the state conflict resolution where it was incorrectly rejecting events.
89858995

89868996
Webclient:

changelog.d/11230.bugfix

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Fix a long-standing bug wherein display names or avatar URLs containing null bytes cause an internal server error
2+
when stored in the DB.

changelog.d/11280.misc

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Drop unused db tables `room_stats_historical` and `user_stats_historical`.

changelog.d/11316.misc

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Add type hints to storage classes.

changelog.d/11318.feature

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Add support for the `/_matrix/client/v3` APIs from Matrix v1.1.

changelog.d/11320.doc

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Changed the word 'Home server' as one word 'homeserver' in documentation.

changelog.d/11327.misc

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Test that room alias deletion works as intended.

changelog.d/11328.misc

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Add type hints to `synapse.util`.

changelog.d/11330.misc

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Improve type annotations in Synapse's test suite.

changelog.d/11332.misc

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Add type hints to storage classes.

changelog.d/11335.feature

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Support the stable version of [MSC2778](https://github.com/matrix-org/matrix-doc/pull/2778): the `m.login.application_service` login type. Contributed by @tulir.

changelog.d/11339.misc

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Add type hints to storage classes.

changelog.d/11340.bugfix

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Fix a bug, introduced in Synapse 1.46.0, which caused the `check_3pid_auth` and `on_logged_out` callbacks in legacy password authentication provider modules to not be registered. Modules using the generic module API were not affected.

changelog.d/11342.misc

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Add type hints to storage classes.

changelog.d/11347.feature

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Add admin API to un-shadow-ban a user.

changelog.d/11355.bugfix

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Fix a bug introduced in 1.41.0 where space hierarchy responses would be incorrectly reused if multiple users were to make the same request at the same time.

changelog.d/11359.misc

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Require all files in synapse/ and tests/ to pass mypy unless specifically excluded.

debian/changelog

+6
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
matrix-synapse-py3 (1.47.0~rc3) stable; urgency=medium
2+
3+
* New synapse release 1.47.0~rc3.
4+
5+
-- Synapse Packaging team <[email protected]> Tue, 16 Nov 2021 14:32:47 +0000
6+
17
matrix-synapse-py3 (1.47.0~rc2) stable; urgency=medium
28

39
[ Dan Callahan ]

docs/admin_api/user_admin_api.md

+9-3
Original file line numberDiff line numberDiff line change
@@ -948,7 +948,7 @@ The following fields are returned in the JSON response body:
948948
See also the
949949
[Client-Server API Spec on pushers](https://matrix.org/docs/spec/client_server/latest#get-matrix-client-r0-pushers).
950950

951-
## Shadow-banning users
951+
## Controlling whether a user is shadow-banned
952952

953953
Shadow-banning is a useful tool for moderating malicious or egregiously abusive users.
954954
A shadow-banned users receives successful responses to their client-server API requests,
@@ -961,16 +961,22 @@ or broken behaviour for the client. A shadow-banned user will not receive any
961961
notification and it is generally more appropriate to ban or kick abusive users.
962962
A shadow-banned user will be unable to contact anyone on the server.
963963

964-
The API is:
964+
To shadow-ban a user the API is:
965965

966966
```
967967
POST /_synapse/admin/v1/users/<user_id>/shadow_ban
968968
```
969969

970+
To un-shadow-ban a user the API is:
971+
972+
```
973+
DELETE /_synapse/admin/v1/users/<user_id>/shadow_ban
974+
```
975+
970976
To use it, you will need to authenticate by providing an `access_token` for a
971977
server admin: [Admin API](../usage/administration/admin_api)
972978

973-
An empty JSON dict is returned.
979+
An empty JSON dict is returned in both cases.
974980

975981
**Parameters**
976982

docs/ancient_architecture_notes.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
## Server to Server Stack
99

10-
To use the server to server stack, home servers should only need to
10+
To use the server to server stack, homeservers should only need to
1111
interact with the Messaging layer.
1212

1313
The server to server side of things is designed into 4 distinct layers:
@@ -23,7 +23,7 @@ Server with a domain specific API.
2323

2424
1. **Messaging Layer**
2525

26-
This is what the rest of the Home Server hits to send messages, join rooms,
26+
This is what the rest of the homeserver hits to send messages, join rooms,
2727
etc. It also allows you to register callbacks for when it get's notified by
2828
lower levels that e.g. a new message has been received.
2929

@@ -45,7 +45,7 @@ Server with a domain specific API.
4545

4646
For incoming PDUs, it has to check the PDUs it references to see
4747
if we have missed any. If we have go and ask someone (another
48-
home server) for it.
48+
homeserver) for it.
4949

5050
3. **Transaction Layer**
5151

docs/turn-howto.md

+8-8
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
# Overview
22

3-
This document explains how to enable VoIP relaying on your Home Server with
3+
This document explains how to enable VoIP relaying on your homeserver with
44
TURN.
55

6-
The synapse Matrix Home Server supports integration with TURN server via the
6+
The synapse Matrix homeserver supports integration with TURN server via the
77
[TURN server REST API](<https://tools.ietf.org/html/draft-uberti-behave-turn-rest-00>). This
8-
allows the Home Server to generate credentials that are valid for use on the
9-
TURN server through the use of a secret shared between the Home Server and the
8+
allows the homeserver to generate credentials that are valid for use on the
9+
TURN server through the use of a secret shared between the homeserver and the
1010
TURN server.
1111

1212
The following sections describe how to install [coturn](<https://github.com/coturn/coturn>) (which implements the TURN REST API) and integrate it with synapse.
@@ -165,18 +165,18 @@ This will install and start a systemd service called `coturn`.
165165
166166
## Synapse setup
167167
168-
Your home server configuration file needs the following extra keys:
168+
Your homeserver configuration file needs the following extra keys:
169169
170170
1. "`turn_uris`": This needs to be a yaml list of public-facing URIs
171171
for your TURN server to be given out to your clients. Add separate
172172
entries for each transport your TURN server supports.
173173
2. "`turn_shared_secret`": This is the secret shared between your
174-
Home server and your TURN server, so you should set it to the same
174+
homeserver and your TURN server, so you should set it to the same
175175
string you used in turnserver.conf.
176176
3. "`turn_user_lifetime`": This is the amount of time credentials
177-
generated by your Home Server are valid for (in milliseconds).
177+
generated by your homeserver are valid for (in milliseconds).
178178
Shorter times offer less potential for abuse at the expense of
179-
increased traffic between web clients and your home server to
179+
increased traffic between web clients and your homeserver to
180180
refresh credentials. The TURN REST API specification recommends
181181
one day (86400000).
182182
4. "`turn_allow_guests`": Whether to allow guest users to use the

mypy.ini

+15-72
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ exclude = (?x)
2828
|synapse/storage/databases/main/account_data.py
2929
|synapse/storage/databases/main/cache.py
3030
|synapse/storage/databases/main/devices.py
31-
|synapse/storage/databases/main/directory.py
3231
|synapse/storage/databases/main/e2e_room_keys.py
3332
|synapse/storage/databases/main/end_to_end_keys.py
3433
|synapse/storage/databases/main/event_federation.py
@@ -39,15 +38,13 @@ exclude = (?x)
3938
|synapse/storage/databases/main/metrics.py
4039
|synapse/storage/databases/main/monthly_active_users.py
4140
|synapse/storage/databases/main/presence.py
42-
|synapse/storage/databases/main/profile.py
4341
|synapse/storage/databases/main/purge_events.py
4442
|synapse/storage/databases/main/push_rule.py
4543
|synapse/storage/databases/main/receipts.py
4644
|synapse/storage/databases/main/room.py
4745
|synapse/storage/databases/main/roommember.py
4846
|synapse/storage/databases/main/search.py
4947
|synapse/storage/databases/main/state.py
50-
|synapse/storage/databases/main/state_deltas.py
5148
|synapse/storage/databases/main/stats.py
5249
|synapse/storage/databases/main/transactions.py
5350
|synapse/storage/databases/main/user_directory.py
@@ -175,100 +172,46 @@ disallow_untyped_defs = True
175172
[mypy-synapse.state.*]
176173
disallow_untyped_defs = True
177174

178-
[mypy-synapse.storage]
175+
[mypy-synapse.storage.databases.main.client_ips]
179176
disallow_untyped_defs = True
180177

181-
[mypy-synapse.streams.*]
182-
disallow_untyped_defs = True
183-
184-
[mypy-synapse.util.batching_queue]
185-
disallow_untyped_defs = True
186-
187-
[mypy-synapse.util.caches.cached_call]
188-
disallow_untyped_defs = True
189-
190-
[mypy-synapse.util.caches.dictionary_cache]
191-
disallow_untyped_defs = True
192-
193-
[mypy-synapse.util.caches.lrucache]
194-
disallow_untyped_defs = True
195-
196-
[mypy-synapse.util.caches.response_cache]
197-
disallow_untyped_defs = True
198-
199-
[mypy-synapse.util.caches.stream_change_cache]
200-
disallow_untyped_defs = True
201-
202-
[mypy-synapse.util.caches.ttl_cache]
178+
[mypy-synapse.storage.databases.main.directory]
203179
disallow_untyped_defs = True
204180

205-
[mypy-synapse.util.daemonize]
181+
[mypy-synapse.storage.databases.main.room_batch]
206182
disallow_untyped_defs = True
207183

208-
[mypy-synapse.util.file_consumer]
184+
[mypy-synapse.storage.databases.main.profile]
209185
disallow_untyped_defs = True
210186

211-
[mypy-synapse.util.frozenutils]
187+
[mypy-synapse.storage.databases.main.state_deltas]
212188
disallow_untyped_defs = True
213189

214-
[mypy-synapse.util.hash]
190+
[mypy-synapse.storage.databases.main.user_erasure_store]
215191
disallow_untyped_defs = True
216192

217-
[mypy-synapse.util.httpresourcetree]
193+
[mypy-synapse.storage.util.*]
218194
disallow_untyped_defs = True
219195

220-
[mypy-synapse.util.iterutils]
221-
disallow_untyped_defs = True
222-
223-
[mypy-synapse.util.linked_list]
224-
disallow_untyped_defs = True
225-
226-
[mypy-synapse.util.logcontext]
227-
disallow_untyped_defs = True
228-
229-
[mypy-synapse.util.logformatter]
230-
disallow_untyped_defs = True
231-
232-
[mypy-synapse.util.macaroons]
233-
disallow_untyped_defs = True
234-
235-
[mypy-synapse.util.manhole]
236-
disallow_untyped_defs = True
237-
238-
[mypy-synapse.util.module_loader]
239-
disallow_untyped_defs = True
240-
241-
[mypy-synapse.util.msisdn]
242-
disallow_untyped_defs = True
243-
244-
[mypy-synapse.util.patch_inline_callbacks]
245-
disallow_untyped_defs = True
246-
247-
[mypy-synapse.util.ratelimitutils]
248-
disallow_untyped_defs = True
249-
250-
[mypy-synapse.util.retryutils]
251-
disallow_untyped_defs = True
252-
253-
[mypy-synapse.util.rlimit]
196+
[mypy-synapse.streams.*]
254197
disallow_untyped_defs = True
255198

256-
[mypy-synapse.util.stringutils]
199+
[mypy-synapse.util.*]
257200
disallow_untyped_defs = True
258201

259-
[mypy-synapse.util.templates]
260-
disallow_untyped_defs = True
202+
[mypy-synapse.util.caches.treecache]
203+
disallow_untyped_defs = False
261204

262-
[mypy-synapse.util.threepids]
205+
[mypy-tests.handlers.test_user_directory]
263206
disallow_untyped_defs = True
264207

265-
[mypy-synapse.util.wheel_timer]
208+
[mypy-tests.storage.test_profile]
266209
disallow_untyped_defs = True
267210

268-
[mypy-synapse.util.versionstring]
211+
[mypy-tests.storage.test_user_directory]
269212
disallow_untyped_defs = True
270213

271-
[mypy-tests]
214+
[mypy-tests.rest.client.test_directory]
272215
disallow_untyped_defs = True
273216

274217
;; Dependencies without annotations

synapse/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
except ImportError:
4848
pass
4949

50-
__version__ = "1.47.0rc2"
50+
__version__ = "1.47.0rc3"
5151

5252
if bool(os.environ.get("SYNAPSE_TEST_PATCH_LOG_CONTEXTS", False)):
5353
# We import here so that we don't have to install a bunch of deps when

synapse/app/homeserver.py

+1
Original file line numberDiff line numberDiff line change
@@ -193,6 +193,7 @@ def _configure_named_resource(
193193
{
194194
"/_matrix/client/api/v1": client_resource,
195195
"/_matrix/client/r0": client_resource,
196+
"/_matrix/client/v3": client_resource,
196197
"/_matrix/client/unstable": client_resource,
197198
"/_matrix/client/v2_alpha": client_resource,
198199
"/_matrix/client/versions": client_resource,

0 commit comments

Comments
 (0)