summary refs log tree commit diff
path: root/synapse/util
diff options
context:
space:
mode:
authorreivilibre <oliverw@matrix.org>2022-03-08 10:47:28 +0000
committerGitHub <noreply@github.com>2022-03-08 10:47:28 +0000
commit2eef234ae367657d4fe5cb0bef6bda67e97b7e4d (patch)
treea0c55e9fec70b0e259a93765e806dbcde6a47917 /synapse/util
parentRelax version guard for packaging (#12166) (diff)
downloadsynapse-2eef234ae367657d4fe5cb0bef6bda67e97b7e4d.tar.xz
Fix a bug introduced in 1.54.0rc1 which meant that Synapse would refuse to start if pre-release versions of dependencies were installed. (#12177)
* Add failing test to characterise the regression #12176

* Permit pre-release versions of specified packages

* Newsfile (bugfix)

Signed-off-by: Olivier Wilkinson (reivilibre) <oliverw@matrix.org>
Diffstat (limited to 'synapse/util')
-rw-r--r--synapse/util/check_dependencies.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/synapse/util/check_dependencies.py b/synapse/util/check_dependencies.py
index 39b0a91db3..12cd804939 100644
--- a/synapse/util/check_dependencies.py
+++ b/synapse/util/check_dependencies.py
@@ -163,7 +163,8 @@ def check_requirements(extra: Optional[str] = None) -> None:
                 deps_unfulfilled.append(requirement.name)
                 errors.append(_not_installed(requirement, extra))
         else:
-            if not requirement.specifier.contains(dist.version):
+            # We specify prereleases=True to allow prereleases such as RCs.
+            if not requirement.specifier.contains(dist.version, prereleases=True):
                 deps_unfulfilled.append(requirement.name)
                 errors.append(_incorrect_version(requirement, dist.version, extra))