summary refs log tree commit diff
path: root/synapse/python_dependencies.py
diff options
context:
space:
mode:
authorAndrew Morgan <1342360+anoadragon453@users.noreply.github.com>2019-06-21 16:52:09 +0100
committerGitHub <noreply@github.com>2019-06-21 16:52:09 +0100
commit5d6644efe070b908dd802c299c9e6a1427cb8adf (patch)
treef65b372fa6377aaaa11f0e26a337e2c38ffd9aac /synapse/python_dependencies.py
parentFix "Unexpected entry in 'full_schemas'" log warning (#5509) (diff)
downloadsynapse-5d6644efe070b908dd802c299c9e6a1427cb8adf.tar.xz
Only import jinja2 when needed (#5514)
Fixes https://github.com/matrix-org/synapse/issues/5431

`jinja2` was being imported even when it wasn't strictly necessary. This made it required to run Synapse, even if the functionality that required it wasn't enabled. This was causing new Synapse installations to crash on startup.

Email modules are now required.
Diffstat (limited to 'synapse/python_dependencies.py')
-rw-r--r--synapse/python_dependencies.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/synapse/python_dependencies.py b/synapse/python_dependencies.py
index 77e2d1a0e1..13698d9638 100644
--- a/synapse/python_dependencies.py
+++ b/synapse/python_dependencies.py
@@ -72,10 +72,11 @@ REQUIREMENTS = [
     # Twisted 18.7.0 requires attrs>=17.4.0
     "attrs>=17.4.0",
     "netaddr>=0.7.18",
+    "Jinja2>=2.9",
+    "bleach>=1.4.3",
 ]
 
 CONDITIONAL_REQUIREMENTS = {
-    "email": ["Jinja2>=2.9", "bleach>=1.4.3"],
     "matrix-synapse-ldap3": ["matrix-synapse-ldap3>=0.1"],
     # we use execute_batch, which arrived in psycopg 2.7.
     "postgres": ["psycopg2>=2.7"],