From 50290790abbc2b1092bd14f06aff3e3d3fec485b Mon Sep 17 00:00:00 2001 From: David Robertson Date: Wed, 6 Apr 2022 17:06:09 +0100 Subject: Narrow the `importlib_metadata` dependency `pyproject.toml` already has the version guard. I struggled to work out how to reproduce this guard under setuptools in #12384. But I really should have persisted there; without this, poetry and setuptools generate different sets of requirements. That means a poetry-installed Synapse on a 3.8+ interpreter will fail the runtime dependency checks. --- synapse/python_dependencies.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/synapse/python_dependencies.py b/synapse/python_dependencies.py index cd68aa362e..8bd91d5f72 100644 --- a/synapse/python_dependencies.py +++ b/synapse/python_dependencies.py @@ -91,7 +91,7 @@ REQUIREMENTS = [ "packaging>=16.1", # At the time of writing, we only use functions from the version `importlib.metadata` # which shipped in Python 3.8. This corresponds to version 1.4 of the backport. - "importlib_metadata>=1.4", + "importlib_metadata>=1.4 ; python_version < '3.8'", ] CONDITIONAL_REQUIREMENTS = { -- cgit 1.5.1