summary refs log tree commit diff
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2021-01-22 10:31:34 +0000
committerErik Johnston <erik@matrix.org>2021-01-22 10:48:56 +0000
commitaa2fe082aeadbfb29f2e5180d1074dcd24ce88d7 (patch)
tree13728ce75f8b12f18f2f96c053ff91cd4e4d0de6
parentReturn a 404 if no valid thumbnail is found. (#9163) (diff)
downloadsynapse-aa2fe082aeadbfb29f2e5180d1074dcd24ce88d7.tar.xz
-rwxr-xr-x.buildkite/scripts/setup_old_deps.sh (renamed from .buildkite/scripts/test_old_deps.sh)2
-rw-r--r--tox.ini10
2 files changed, 8 insertions, 4 deletions
diff --git a/.buildkite/scripts/test_old_deps.sh b/.buildkite/scripts/setup_old_deps.sh
index 9905c4bc4f..0f0836587b 100755
--- a/.buildkite/scripts/test_old_deps.sh
+++ b/.buildkite/scripts/setup_old_deps.sh
@@ -9,5 +9,3 @@ apt-get update
 apt-get install -y python3.5 python3.5-dev python3-pip libxml2-dev libxslt-dev xmlsec1 zlib1g-dev tox
 
 export LANG="C.UTF-8"
-
-exec tox -e py35-old,combine
diff --git a/tox.ini b/tox.ini
index 1a3489344f..1bcd8b627f 100644
--- a/tox.ini
+++ b/tox.ini
@@ -101,7 +101,7 @@ usedevelop=true
 
 # A test suite for the oldest supported versions of Python libraries, to catch
 # any uses of APIs not available in them.
-[testenv:py35-old]
+[testenv:py35-{old,old-postgres}]
 skip_install=True
 deps =
     # Ensure a version of setuptools that supports Python 3.5 is installed.
@@ -114,11 +114,17 @@ deps =
     coverage
     coverage-enable-subprocess==1.0
 
+setenv =
+    postgres: SYNAPSE_POSTGRES = 1
+
 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'
+    #
+    # Also strip out psycopg2 unless we need it.
+    /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'
+    postgres: /bin/sh -c 'python -m synapse.python_dependencies | sed -e "s/>=/==/g" | grep -F "psycopg2" | xargs -d"\n" pip install'
 
     # Install Synapse itself. This won't update any libraries.
     pip install -e ".[test]"