From 99362a481ac8518b26fec2cf01b3e1ed95862c26 Mon Sep 17 00:00:00 2001 From: Valerii Koval Date: Mon, 19 Jun 2023 21:25:38 +0300 Subject: [PATCH] Lock precise versions of Python dependencies for IDF 5 Using loose constraints proved to be unsafe (e.g. latest pyparsing update v3.1.0) --- builder/frameworks/espidf.py | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/builder/frameworks/espidf.py b/builder/frameworks/espidf.py index 577b868..b93f085 100644 --- a/builder/frameworks/espidf.py +++ b/builder/frameworks/espidf.py @@ -1097,17 +1097,13 @@ def install_python_deps(): # https://github.com/platformio/platformio-core/issues/4614 "urllib3": "<2", # https://github.com/platformio/platform-espressif32/issues/635 - "cryptography": ">=2.1.4,<35.0.0", - "future": ">=0.15.2", - "pyparsing": ">=2.0.3,<2.4.0", - "kconfiglib": "==13.7.1", - "idf-component-manager": "~=1.0", + "cryptography": "~=41.0.1" if IDF5 else ">=2.1.4,<35.0.0", + "future": ">=0.18.3", + "pyparsing": "~=3.0.9" if IDF5 else ">=2.0.3,<2.4.0", + "kconfiglib": "~=14.1.0" if IDF5 else "~=13.7.1", + "idf-component-manager": "~=1.2.3" if IDF5 else "~=1.0", } - if IDF5: - # Remove specific versions for IDF5 as not required - deps = {dep: "" for dep in deps} - python_exe_path = get_python_exe() installed_packages = _get_installed_pip_packages(python_exe_path) packages_to_install = []