diff --git a/scripts-dev/build_debian_packages.py b/scripts-dev/build_debian_packages.py
index c03e3418c0..b192faba14 100755
--- a/scripts-dev/build_debian_packages.py
+++ b/scripts-dev/build_debian_packages.py
@@ -32,7 +32,6 @@ DISTS = (
"debian:sid", # (EOL not specified yet) (our EOL forced by Python 3.11 is 2027-10-24)
"ubuntu:focal", # 20.04 LTS (EOL 2025-04) (our EOL forced by Python 3.8 is 2024-10-14)
"ubuntu:jammy", # 22.04 LTS (EOL 2027-04) (our EOL forced by Python 3.10 is 2026-10-04)
- "ubuntu:kinetic", # 22.10 (EOL 2023-07-20) (our EOL forced by Python 3.10 is 2026-10-04)
"ubuntu:lunar", # 23.04 (EOL 2024-01) (our EOL forced by Python 3.11 is 2027-10-24)
"debian:trixie", # (EOL not specified yet)
)
diff --git a/scripts-dev/federation_client.py b/scripts-dev/federation_client.py
index 5ad334b4d8..e8baeac5e2 100755
--- a/scripts-dev/federation_client.py
+++ b/scripts-dev/federation_client.py
@@ -329,6 +329,17 @@ class MatrixConnectionAdapter(HTTPAdapter):
raise ValueError("Invalid host:port '%s'" % (server_name,))
return out[0], port, out[0]
+ # Look up SRV for Matrix 1.8 `matrix-fed` service first
+ try:
+ srv = srvlookup.lookup("matrix-fed", "tcp", server_name)[0]
+ print(
+ f"SRV lookup on _matrix-fed._tcp.{server_name} gave {srv}",
+ file=sys.stderr,
+ )
+ return srv.host, srv.port, server_name
+ except Exception:
+ pass
+ # Fall back to deprecated `matrix` service
try:
srv = srvlookup.lookup("matrix", "tcp", server_name)[0]
print(
@@ -337,6 +348,7 @@ class MatrixConnectionAdapter(HTTPAdapter):
)
return srv.host, srv.port, server_name
except Exception:
+ # Fall even further back to just port 8448
return server_name, 8448, server_name
@staticmethod
diff --git a/scripts-dev/mypy_synapse_plugin.py b/scripts-dev/mypy_synapse_plugin.py
index 8058e9c993..a0b3854f1b 100644
--- a/scripts-dev/mypy_synapse_plugin.py
+++ b/scripts-dev/mypy_synapse_plugin.py
@@ -30,9 +30,10 @@ class SynapsePlugin(Plugin):
self, fullname: str
) -> Optional[Callable[[MethodSigContext], CallableType]]:
if fullname.startswith(
- "synapse.util.caches.descriptors.CachedFunction.__call__"
- ) or fullname.startswith(
- "synapse.util.caches.descriptors._LruCachedFunction.__call__"
+ (
+ "synapse.util.caches.descriptors.CachedFunction.__call__",
+ "synapse.util.caches.descriptors._LruCachedFunction.__call__",
+ )
):
return cached_function_method_signature
return None
diff --git a/scripts-dev/release.py b/scripts-dev/release.py
index 4ac8eaa889..74f41a40ec 100755
--- a/scripts-dev/release.py
+++ b/scripts-dev/release.py
@@ -244,11 +244,17 @@ def _prepare() -> None:
else:
debian_version = new_version
- run_until_successful(
- f'dch -M -v {debian_version} "New Synapse release {new_version}."',
- shell=True,
- )
- run_until_successful('dch -M -r -D stable ""', shell=True)
+ if sys.platform == "darwin":
+ run_until_successful(
+ f"docker run --rm -v .:/synapse ubuntu:latest /synapse/scripts-dev/docker_update_debian_changelog.sh {new_version}",
+ shell=True,
+ )
+ else:
+ run_until_successful(
+ f'dch -M -v {debian_version} "New Synapse release {new_version}."',
+ shell=True,
+ )
+ run_until_successful('dch -M -r -D stable ""', shell=True)
# Show the user the changes and ask if they want to edit the change log.
synapse_repo.git.add("-u")
@@ -566,19 +572,27 @@ def _notify(message: str) -> None:
# for this.
click.echo(f"\a{message}")
+ app_name = "Synapse Release Script"
+
# Try and run notify-send, but don't raise an Exception if this fails
# (This is best-effort)
- # TODO Support other platforms?
- subprocess.run(
- [
- "notify-send",
- "--app-name",
- "Synapse Release Script",
- "--expire-time",
- "3600000",
- message,
- ]
- )
+ if sys.platform == "darwin":
+ # See https://developer.apple.com/library/archive/documentation/AppleScript/Conceptual/AppleScriptLangGuide/reference/ASLR_cmds.html#//apple_ref/doc/uid/TP40000983-CH216-SW224
+ subprocess.run(
+ f"""osascript -e 'display notification "{message}" with title "{app_name}"'""",
+ shell=True,
+ )
+ else:
+ subprocess.run(
+ [
+ "notify-send",
+ "--app-name",
+ app_name,
+ "--expire-time",
+ "3600000",
+ message,
+ ]
+ )
@cli.command()
|