From dc23236f0a9c9ad4a0be35a4d03af92801839404 Mon Sep 17 00:00:00 2001 From: Gilles Peskine Date: Fri, 16 Jun 2023 17:05:22 +0200 Subject: [PATCH 1/2] Revert "Install cryptography only on linux platform" This reverts commit eb2c39ed2bc6a126ae7bdb6eab0457ebd6a32cfc. We temporarily turned off the cryptography requirement on Windows due to a CI instance that had an old, incompatible verison of pip. That CI instance has been upgraded so we no longer need the workaround. Signed-off-by: Gilles Peskine --- scripts/ci.requirements.txt | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/scripts/ci.requirements.txt b/scripts/ci.requirements.txt index 3ddc417051..ac9c25acf4 100644 --- a/scripts/ci.requirements.txt +++ b/scripts/ci.requirements.txt @@ -14,5 +14,4 @@ mypy >= 0.780 # Install cryptography to avoid import-error reported by pylint. # What we really need is cryptography >= 35.0.0, which is only # available for Python >= 3.6. -cryptography >= 35.0.0; sys_platform == 'linux' and python_version >= '3.6' -cryptography; sys_platform == 'linux' and python_version < '3.6' +cryptography # >= 35.0.0 From 7990a3296df24a1f7bb8875005d78495c7e0076c Mon Sep 17 00:00:00 2001 From: Gilles Peskine Date: Tue, 22 Aug 2023 17:27:00 +0200 Subject: [PATCH 2/2] Explain the story about cryptography version requirements Signed-off-by: Gilles Peskine --- scripts/ci.requirements.txt | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/scripts/ci.requirements.txt b/scripts/ci.requirements.txt index ac9c25acf4..7dbcfe8e05 100644 --- a/scripts/ci.requirements.txt +++ b/scripts/ci.requirements.txt @@ -11,7 +11,10 @@ pylint == 2.4.4 # See https://github.com/Mbed-TLS/mbedtls/pull/3953 . mypy >= 0.780 -# Install cryptography to avoid import-error reported by pylint. -# What we really need is cryptography >= 35.0.0, which is only -# available for Python >= 3.6. +# At the time of writing, only needed for tests/scripts/audit-validity-dates.py. +# It needs >=35.0.0 for correct operation, and that requires Python >=3.6, +# but our CI has Python 3.5. So let pip install the newest version that's +# compatible with the running Python: this way we get something good enough +# for mypy and pylint under Python 3.5, and we also get something good enough +# to run audit-validity-dates.py on Python >=3.6. cryptography # >= 35.0.0