summary refs log tree commit diff
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2021-01-22 11:14:49 +0000
committerGitHub <noreply@github.com>2021-01-22 11:14:49 +0000
commit28f255d5f316d45b5e8b72e6c3da73a5a393eee2 (patch)
treeb806671cd2da5930022ff0bafeae0f068742bfb3
parentAdd schema update to fix existing DBs affected by #9193 (#9195) (diff)
downloadsynapse-28f255d5f316d45b5e8b72e6c3da73a5a393eee2.tar.xz
Bump psycopg2 version (#9204)
As we use `execute_values` with the `fetch` parameter.
-rw-r--r--changelog.d/9204.misc1
-rw-r--r--synapse/python_dependencies.py4
-rw-r--r--tox.ini2
3 files changed, 4 insertions, 3 deletions
diff --git a/changelog.d/9204.misc b/changelog.d/9204.misc
new file mode 100644
index 0000000000..fac79a902f
--- /dev/null
+++ b/changelog.d/9204.misc
@@ -0,0 +1 @@
+Bump minimum `psycopg2` version.
diff --git a/synapse/python_dependencies.py b/synapse/python_dependencies.py
index c97e0df1f5..bfd46a3730 100644
--- a/synapse/python_dependencies.py
+++ b/synapse/python_dependencies.py
@@ -86,8 +86,8 @@ REQUIREMENTS = [
 
 CONDITIONAL_REQUIREMENTS = {
     "matrix-synapse-ldap3": ["matrix-synapse-ldap3>=0.1"],
-    # we use execute_batch, which arrived in psycopg 2.7.
-    "postgres": ["psycopg2>=2.7"],
+    # we use execute_values with the fetch param, which arrived in psycopg 2.8.
+    "postgres": ["psycopg2>=2.8"],
     # ACME support is required to provision TLS certificates from authorities
     # that use the protocol, such as Let's Encrypt.
     "acme": [
diff --git a/tox.ini b/tox.ini
index 5210e7b860..801e6dea2c 100644
--- a/tox.ini
+++ b/tox.ini
@@ -117,7 +117,7 @@ commands =
     # Make all greater-thans equals so we test the oldest version of our direct
     # dependencies, but make the pyopenssl 17.0, which can work against an
     # OpenSSL 1.1 compiled cryptography (as older ones don't compile on Travis).
-    /bin/sh -c 'python -m synapse.python_dependencies | sed -e "s/>=/==/g" -e "s/psycopg2==2.6//" -e "s/pyopenssl==16.0.0/pyopenssl==17.0.0/" | xargs -d"\n" pip install'
+    /bin/sh -c 'python -m synapse.python_dependencies | sed -e "s/>=/==/g" -e "/psycopg2/d" -e "s/pyopenssl==16.0.0/pyopenssl==17.0.0/" | xargs -d"\n" pip install'
 
     # Install Synapse itself. This won't update any libraries.
     pip install -e ".[test]"