From ea3492d30b42809e4b1c5b43953c6864bc2a2ae4 Mon Sep 17 00:00:00 2001 From: Simon Willison Date: Sun, 16 Jun 2019 10:57:01 -0700 Subject: [PATCH] Fix deprecated regex escape sequence. --- daphne/endpoints.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/daphne/endpoints.py b/daphne/endpoints.py index 83e472a..b97364f 100644 --- a/daphne/endpoints.py +++ b/daphne/endpoints.py @@ -8,7 +8,7 @@ def build_endpoint_description_strings( """ socket_descriptions = [] if host and port is not None: - host = host.strip("[]").replace(":", "\:") + host = host.strip("[]").replace(":", r"\:") socket_descriptions.append("tcp:port=%d:interface=%s" % (int(port), host)) elif any([host, port]): raise ValueError("TCP binding requires both port and host kwargs.")