summary refs log tree commit diff
diff options
context:
space:
mode:
authorreivilibre <oliverw@matrix.org>2022-01-06 16:36:26 +0000
committerGitHub <noreply@github.com>2022-01-06 16:36:26 +0000
commiteec34b1f2a53af45807cb718a26861be3f2fd43c (patch)
tree109c8317ffb1892335e000937d8b0bf0187e427c
parentTweak changelog for #11677 (diff)
downloadsynapse-eec34b1f2a53af45807cb718a26861be3f2fd43c.tar.xz
Work around Mjolnir compatibility issue by adding an import for `glob_to_regex` in `synapse.util`, where it moved from. (#11696)
Diffstat (limited to '')
-rw-r--r--changelog.d/11696.misc1
-rw-r--r--synapse/util/__init__.py7
2 files changed, 8 insertions, 0 deletions
diff --git a/changelog.d/11696.misc b/changelog.d/11696.misc
new file mode 100644
index 0000000000..e8f39dde18
--- /dev/null
+++ b/changelog.d/11696.misc
@@ -0,0 +1 @@
+Work around Mjolnir compatibility issue by adding an import for `glob_to_regex` in `synapse.util`, where it moved from.
\ No newline at end of file
diff --git a/synapse/util/__init__.py b/synapse/util/__init__.py
index f157132210..511f52534b 100644
--- a/synapse/util/__init__.py
+++ b/synapse/util/__init__.py
@@ -31,6 +31,13 @@ from synapse.logging import context
 if typing.TYPE_CHECKING:
     pass
 
+# FIXME Mjolnir imports glob_to_regex from this file, but it was moved to
+#       matrix_common.
+#       As a temporary workaround, we import glob_to_regex here for
+#       compatibility with current versions of Mjolnir.
+# See https://github.com/matrix-org/mjolnir/pull/174
+from matrix_common.regex import glob_to_regex  # noqa
+
 logger = logging.getLogger(__name__)