From a2aba3c8646ea0738ff454588773164e5917798f Mon Sep 17 00:00:00 2001 From: Caleigh Runge-Hottman Date: Mon, 1 Feb 2021 10:28:32 -0500 Subject: [PATCH] pyrsistent install fails on py2.7 The python2.7 installation of pyresistent (a jsonschema dependency) fails with the following error message: "pyrsistent requires Python '>=3.5' but the running Python is 2.7.15" Pyrsistent reportedly dropped python2.7 support [1]. Py2.7 installs of jsonschema must pin the latest pyresistent version with python2.7 support (pyrsistent-0.16.1) to avoid an installation error. This commit also introduces the constraints-legacy.txt file, which contains dependencies specific to python2.7. [1] https://github.com/tobgu/pyrsistent/issues/208 --- constraints-legacy.txt | 3 +++ tox.ini | 5 +++++ 2 files changed, 8 insertions(+) create mode 100644 constraints-legacy.txt diff --git a/constraints-legacy.txt b/constraints-legacy.txt new file mode 100644 index 0000000..ee888bc --- /dev/null +++ b/constraints-legacy.txt @@ -0,0 +1,3 @@ +# Oldest supported versions of major libraries can be added to this +# file. They'll be tested with Python 2.7. +pyrsistent==0.16.1 diff --git a/tox.ini b/tox.ini index a08a8be..3008848 100644 --- a/tox.ini +++ b/tox.ini @@ -6,6 +6,11 @@ deps=-rtest-requirements.txt commands=pytest -v {posargs} whitelist_externals=sh +[testenv:py27] +deps= + -cconstraints-legacy.txt + -rtest-requirements.txt + [testenv:static] deps= -rtest-requirements.txt