From f08ef64926c986f278071f94e29c32e4ad252507 Mon Sep 17 00:00:00 2001 From: Erik Johnston Date: Mon, 18 Jan 2021 15:24:04 +0000 Subject: [PATCH] Enforce all replication HTTP clients calls use kwargs (#9144) --- changelog.d/9144.misc | 1 + synapse/replication/http/_base.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) create mode 100644 changelog.d/9144.misc diff --git a/changelog.d/9144.misc b/changelog.d/9144.misc new file mode 100644 index 0000000000..38a506b170 --- /dev/null +++ b/changelog.d/9144.misc @@ -0,0 +1 @@ +Enforce that replication HTTP clients are called with keyword arguments only. diff --git a/synapse/replication/http/_base.py b/synapse/replication/http/_base.py index 1492ac922c..288727a566 100644 --- a/synapse/replication/http/_base.py +++ b/synapse/replication/http/_base.py @@ -177,7 +177,7 @@ class ReplicationEndpoint(metaclass=abc.ABCMeta): @trace(opname="outgoing_replication_request") @outgoing_gauge.track_inprogress() - async def send_request(instance_name="master", **kwargs): + async def send_request(*, instance_name="master", **kwargs): if instance_name == local_instance_name: raise Exception("Trying to send HTTP request to self") if instance_name == "master":