From 58e88fbfe9b1dd657922ec37baea33a1620d6a63 Mon Sep 17 00:00:00 2001 From: Patrick Cloke Date: Mon, 31 Aug 2020 10:54:17 -0400 Subject: [PATCH 1/6] Do not install setuptools 50.0, which breaks on Python 3.5. --- changelog.d/8212.bugfix | 1 + synapse/python_dependencies.py | 3 +++ 2 files changed, 4 insertions(+) create mode 100644 changelog.d/8212.bugfix diff --git a/changelog.d/8212.bugfix b/changelog.d/8212.bugfix new file mode 100644 index 000000000000..e951dea08dfd --- /dev/null +++ b/changelog.d/8212.bugfix @@ -0,0 +1 @@ +Do not install setuptools 50.0 on Python 3.5, which leads to a broken configuration. diff --git a/synapse/python_dependencies.py b/synapse/python_dependencies.py index 2d995ec456a5..f7fba3510f39 100644 --- a/synapse/python_dependencies.py +++ b/synapse/python_dependencies.py @@ -74,6 +74,9 @@ "Jinja2>=2.9", "bleach>=1.4.3", "typing-extensions>=3.7.4", + # setuptools is required by a variety of dependencies, unfortunately version + # 50.0 is incompatible with Python 3.5, see https://github.com/pypa/setuptools/issues/2352 + 'setuptools!=50.0;python_version<"3.6"', ] CONDITIONAL_REQUIREMENTS = { From d48915c73529fad442bcca6646e15b4c62f828d3 Mon Sep 17 00:00:00 2001 From: Patrick Cloke Date: Tue, 1 Sep 2020 07:40:55 -0400 Subject: [PATCH 2/6] Update the install directions. --- INSTALL.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/INSTALL.md b/INSTALL.md index 22f7b7c0293c..6c702d9d81a9 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -73,7 +73,7 @@ mkdir -p ~/synapse virtualenv -p python3 ~/synapse/env source ~/synapse/env/bin/activate pip install --upgrade pip -pip install --upgrade setuptools +pip install --upgrade setuptools!=50.0 pip install matrix-synapse ``` From 9b187786fa44c6051fe5ff9d4e3a84dd83482bdf Mon Sep 17 00:00:00 2001 From: Patrick Cloke Date: Tue, 1 Sep 2020 07:46:33 -0400 Subject: [PATCH 3/6] Block setuptools==50.0 for all Python versions. --- synapse/python_dependencies.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/synapse/python_dependencies.py b/synapse/python_dependencies.py index f7fba3510f39..6ad0e977c7f1 100644 --- a/synapse/python_dependencies.py +++ b/synapse/python_dependencies.py @@ -75,8 +75,9 @@ "bleach>=1.4.3", "typing-extensions>=3.7.4", # setuptools is required by a variety of dependencies, unfortunately version - # 50.0 is incompatible with Python 3.5, see https://github.com/pypa/setuptools/issues/2352 - 'setuptools!=50.0;python_version<"3.6"', + # 50.0 is incompatible with older Python versions, see + # https://github.com/pypa/setuptools/issues/2352 + 'setuptools!=50.0', ] CONDITIONAL_REQUIREMENTS = { From ac564a5d093c2c050fcbd8b0e84d1456371e0a61 Mon Sep 17 00:00:00 2001 From: Patrick Cloke Date: Tue, 1 Sep 2020 07:47:19 -0400 Subject: [PATCH 4/6] Update INSTALL.md Co-authored-by: Andrew Morgan <1342360+anoadragon453@users.noreply.github.com> --- INSTALL.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/INSTALL.md b/INSTALL.md index 6c702d9d81a9..bdb7769fe929 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -73,7 +73,7 @@ mkdir -p ~/synapse virtualenv -p python3 ~/synapse/env source ~/synapse/env/bin/activate pip install --upgrade pip -pip install --upgrade setuptools!=50.0 +pip install --upgrade setuptools!=50.0 # setuptools==50.0 fails on some older Python versions pip install matrix-synapse ``` From 5937e86ea7083f88c515e887c6d8dfc85a45db4f Mon Sep 17 00:00:00 2001 From: Patrick Cloke Date: Tue, 1 Sep 2020 07:55:17 -0400 Subject: [PATCH 5/6] Update newsfragment. Co-authored-by: Andrew Morgan <1342360+anoadragon453@users.noreply.github.com> --- changelog.d/8212.bugfix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/changelog.d/8212.bugfix b/changelog.d/8212.bugfix index e951dea08dfd..0f8c0aed9204 100644 --- a/changelog.d/8212.bugfix +++ b/changelog.d/8212.bugfix @@ -1 +1 @@ -Do not install setuptools 50.0 on Python 3.5, which leads to a broken configuration. +Do not install setuptools 50.0. It can lead to a broken configuration on some older Python versions. From c7878b79cd11abfe131628ddbb77d351ea138ecd Mon Sep 17 00:00:00 2001 From: Patrick Cloke Date: Tue, 1 Sep 2020 07:55:32 -0400 Subject: [PATCH 6/6] Lint --- 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 6ad0e977c7f1..d666f2267442 100644 --- a/synapse/python_dependencies.py +++ b/synapse/python_dependencies.py @@ -77,7 +77,7 @@ # setuptools is required by a variety of dependencies, unfortunately version # 50.0 is incompatible with older Python versions, see # https://github.com/pypa/setuptools/issues/2352 - 'setuptools!=50.0', + "setuptools!=50.0", ] CONDITIONAL_REQUIREMENTS = {