summary refs log tree commit diff
path: root/.ci/patch_for_twisted_trunk.sh
diff options
context:
space:
mode:
Diffstat (limited to '.ci/patch_for_twisted_trunk.sh')
-rwxr-xr-x.ci/patch_for_twisted_trunk.sh14
1 files changed, 11 insertions, 3 deletions
diff --git a/.ci/patch_for_twisted_trunk.sh b/.ci/patch_for_twisted_trunk.sh
index f524581986..d1c50f69f7 100755
--- a/.ci/patch_for_twisted_trunk.sh
+++ b/.ci/patch_for_twisted_trunk.sh
@@ -1,8 +1,16 @@
 #!/bin/sh
 
-# replaces the dependency on Twisted in `python_dependencies` with trunk.
+# replaces the dependency on Twisted with Twisted's trunk.
+# We make full use of the poetry machinery (rather than just `pip install ...`)
+# so that we'll catch dependency resolver problems that could arise from twisted
+# bumping its dependencies.
 
-set -e
+set -xe
 cd "$(dirname "$0")"/..
 
-sed -i -e 's#"Twisted.*"#"Twisted @ git+https://github.com/twisted/twisted"#' synapse/python_dependencies.py
+sed -ibackup -e 's!^Twisted = .*!Twisted = { git = "https://github.com/twisted/twisted.git", rev = "trunk" }!' pyproject.toml
+
+poetry lock --no-update
+poetry install --no-interaction --extras "all test"
+# Confirm the version of twisted in use
+poetry run pip show twisted