From 2aaae70372a584548a4f5b184dbacce84a50011c Mon Sep 17 00:00:00 2001 From: "patchback[bot]" <45432694+patchback[bot]@users.noreply.github.com> Date: Sun, 30 Jan 2022 15:23:29 +0100 Subject: [PATCH] [PR #387/5abfe8fc backport][stable-1] PyOpenSSL 22.0.0 no longer supports Python 2.7 (#389) * PyOpenSSL 22.0.0 no longer supports Python 2.7. (#387) (cherry picked from commit 5abfe8fca932d74e5821dd594d5908150f6cf543) * Do not install PyOpenSSL from PyPi if cryptography cannot be updated - at least on FreeBSD 13.0, latest PyOpenSSL requires a cryptography upgrade, which breaks CI. * Revert "Do not install PyOpenSSL from PyPi if cryptography cannot be updated - at least on FreeBSD 13.0, latest PyOpenSSL requires a cryptography upgrade, which breaks CI." This reverts commit 16f914565360028b06734a326d3c41a43cee8198. * Try another approach. Co-authored-by: Felix Fontein --- tests/utils/constraints.txt | 1 + tests/utils/shippable/remote.sh | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/tests/utils/constraints.txt b/tests/utils/constraints.txt index d532bf33..1471d8f4 100644 --- a/tests/utils/constraints.txt +++ b/tests/utils/constraints.txt @@ -7,5 +7,6 @@ idna < 2.6, >= 2.5 # linode requires idna < 2.9, >= 2.5, requests requires idna requests < 2.20.0 ; python_version < '2.7' # requests 2.20.0 drops support for python 2.6 virtualenv < 16.0.0 ; python_version < '2.7' # virtualenv 16.0.0 and later require python 2.7 or later pyopenssl < 18.0.0 ; python_version < '2.7' # pyOpenSSL 18.0.0 and later require python 2.7 or later +pyopenssl < 22.0.0 ; python_version < '3.6' # pyOpenSSL 22.0.0 and later require python 3.6 or later setuptools < 45 ; python_version <= '2.7' # setuptools 45 and later require python 3.5 or later cffi >= 1.14.2, != 1.14.3 # Yanked version which older versions of pip will still install: diff --git a/tests/utils/shippable/remote.sh b/tests/utils/shippable/remote.sh index cd3014cc..547990ee 100755 --- a/tests/utils/shippable/remote.sh +++ b/tests/utils/shippable/remote.sh @@ -17,6 +17,12 @@ fi stage="${S:-prod}" provider="${P:-default}" +if [ "${platform}/${version}" == "freebsd/13.0" ]; then + # On FreeBSD 13.0, installing PyOpenSSL 22.0.0 tries to upgrade cryptography, which + # will fail due to missing Rust compiler. + echo "pyopenssl < 22.0.0 ; python_version >= '3.8'" >> tests/utils/constraints.txt +fi + # shellcheck disable=SC2086 ansible-test integration --color -v --retry-on-error "${target}" ${COVERAGE:+"$COVERAGE"} ${CHANGED:+"$CHANGED"} ${UNSTABLE:+"$UNSTABLE"} \ --remote "${platform}/${version}" --remote-terminate always --remote-stage "${stage}" --remote-provider "${provider}"