diff --git a/.gitlab/ci/build.yml b/.gitlab/ci/build.yml index f3d0f7df4d..ae3045175e 100644 --- a/.gitlab/ci/build.yml +++ b/.gitlab/ci/build.yml @@ -234,7 +234,7 @@ pytest_build_system_macos: - macos_shell parallel: 3 variables: - PYENV_VERSION: "3.8" + PYENV_VERSION: "3.9" # CCACHE_DIR: "/cache/idf_ccache". On macOS, you cannot write to this folder due to insufficient permissions. CCACHE_DIR: "" # ccache will use "$HOME/Library/Caches/ccache". CCACHE_MAXSIZE: "5G" # To preserve the limited Macbook storage. CCACHE automatically prunes old caches to fit the set limit. diff --git a/.gitlab/ci/common.yml b/.gitlab/ci/common.yml index 7ff97a4916..bfd4a700dc 100644 --- a/.gitlab/ci/common.yml +++ b/.gitlab/ci/common.yml @@ -55,8 +55,8 @@ variables: CHECKOUT_REF_SCRIPT: "$CI_PROJECT_DIR/tools/ci/checkout_project_ref.py" # Docker images - ESP_ENV_IMAGE: "${CI_DOCKER_REGISTRY}/esp-env-v5.5:1" - ESP_IDF_DOC_ENV_IMAGE: "${CI_DOCKER_REGISTRY}/esp-idf-doc-env-v5.5:1-1" + ESP_ENV_IMAGE: "${CI_DOCKER_REGISTRY}/esp-env-v5.5:2" + ESP_IDF_DOC_ENV_IMAGE: "${CI_DOCKER_REGISTRY}/esp-idf-doc-env-v5.5:2-1" TARGET_TEST_ENV_IMAGE: "${CI_DOCKER_REGISTRY}/target-test-env-v5.5:2" SONARQUBE_SCANNER_IMAGE: "${CI_DOCKER_REGISTRY}/sonarqube-scanner:5" PRE_COMMIT_IMAGE: "${CI_DOCKER_REGISTRY}/esp-idf-pre-commit:1" diff --git a/.gitlab/ci/host-test.yml b/.gitlab/ci/host-test.yml index 965cc18760..e1dc5f59a4 100644 --- a/.gitlab/ci/host-test.yml +++ b/.gitlab/ci/host-test.yml @@ -347,6 +347,7 @@ test_pytest_macos: reports: junit: XUNIT_RESULT.xml variables: + PYENV_VERSION: "3.9" PYTEST_IGNORE_COLLECT_IMPORT_ERROR: "1" script: - run_cmd python tools/ci/ci_build_apps.py components examples tools/test_apps -v diff --git a/docs/en/api-guides/build-system.rst b/docs/en/api-guides/build-system.rst index f81f3b12c3..0532114108 100644 --- a/docs/en/api-guides/build-system.rst +++ b/docs/en/api-guides/build-system.rst @@ -131,7 +131,7 @@ For more detailed information about integrating ESP-IDF with CMake into an IDE, Setting up the Python Interpreter --------------------------------- -ESP-IDF works well with Python version 3.8+. +ESP-IDF works well with Python version 3.9+. ``idf.py`` and other Python scripts will run with the default Python interpreter, i.e., ``python``. You can switch to a different one like ``python3 $IDF_PATH/tools/idf.py ...``, or you can set up a shell alias or another script to simplify the command. diff --git a/docs/en/api-guides/tools/idf-docker-image.rst b/docs/en/api-guides/tools/idf-docker-image.rst index 9d1ca753da..2633a04195 100644 --- a/docs/en/api-guides/tools/idf-docker-image.rst +++ b/docs/en/api-guides/tools/idf-docker-image.rst @@ -14,7 +14,7 @@ IDF Docker image (``espressif/idf``) is intended for building applications and l The image contains: - Common utilities such as ``git``, ``wget``, ``curl``, and ``zip``. -- Python 3.8 or newer. +- Python 3.9 or newer. - A copy of a specific version of ESP-IDF. See below for information about versions. ``IDF_PATH`` environment variable is set and points to the ESP-IDF location in the container. - All the build tools required for the specific version of ESP-IDF: CMake, Ninja, cross-compiler toolchains, etc. - All Python packages required by ESP-IDF are installed in a virtual environment. diff --git a/docs/en/get-started/start-project.rst b/docs/en/get-started/start-project.rst index 3ec97059de..7b5148ea6a 100644 --- a/docs/en/get-started/start-project.rst +++ b/docs/en/get-started/start-project.rst @@ -160,7 +160,7 @@ With some Linux distributions, you may get the error message similar to ``Could Python Compatibility ~~~~~~~~~~~~~~~~~~~~ -ESP-IDF supports Python 3.8 or newer. It is recommended to upgrade your operating system to a recent version satisfying this requirement. Other options include the installation of Python from `sources `_ or the use of a Python version management system such as `pyenv `_. +ESP-IDF supports Python 3.9 or newer. It is recommended to upgrade your operating system to a recent version satisfying this requirement. Other options include the installation of Python from `sources `_ or the use of a Python version management system such as `pyenv `_. .. only:: esp32 or esp32s2 or esp32s3 diff --git a/docs/zh_CN/api-guides/build-system.rst b/docs/zh_CN/api-guides/build-system.rst index 0fb4750f6a..88adf5e5a8 100644 --- a/docs/zh_CN/api-guides/build-system.rst +++ b/docs/zh_CN/api-guides/build-system.rst @@ -131,7 +131,7 @@ idf.py 设置 Python 解释器 ------------------ -ESP-IDF 适用于 Python 3.8 以上版本。 +ESP-IDF 适用于 Python 3.9 以上版本。 ``idf.py`` 和其他的 Python 脚本会使用默认的 Python 解释器运行,如 ``python``。你可以通过 ``python3 $IDF_PATH/tools/idf.py ...`` 命令切换到别的 Python 解释器,或者通过设置 shell 别名或其他脚本来简化该命令。 diff --git a/docs/zh_CN/api-guides/tools/idf-docker-image.rst b/docs/zh_CN/api-guides/tools/idf-docker-image.rst index d771d0253f..3641297621 100644 --- a/docs/zh_CN/api-guides/tools/idf-docker-image.rst +++ b/docs/zh_CN/api-guides/tools/idf-docker-image.rst @@ -14,7 +14,7 @@ IDF Docker 镜像 (``espressif/idf``) 为使用特定版本的 ESP-IDF 自动化 该镜像包含以下内容: - 常见的实用工具,如 ``git``、``wget``、``curl`` 和 ``zip``。 -- Python 3.8 或更高版本。 +- Python 3.9 或更高版本。 - 特定版本 ESP-IDF 的副本。有关版本信息,请参阅下文。该副本中设置了 ``IDF_PATH`` 环境变量,并指向容器中 ESP-IDF 的位置。 - 构建特定版本 ESP-IDF 所需工具:CMake、Ninja、交叉编译器工具链等。 - ESP-IDF 需要的所有 Python 软件包。这些软件包均已安装在虚拟环境中。 diff --git a/docs/zh_CN/get-started/start-project.rst b/docs/zh_CN/get-started/start-project.rst index ee65b569d6..ea02c24d35 100644 --- a/docs/zh_CN/get-started/start-project.rst +++ b/docs/zh_CN/get-started/start-project.rst @@ -160,7 +160,7 @@ 兼容的 Python 版本 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -ESP-IDF 支持 Python 3.8 及以上版本,建议升级操作系统到最新版本从而更新 Python。也可选择从 `sources `_ 安装最新版 Python,或使用 Python 管理系统如 `pyenv `_ 对版本进行升级管理。 +ESP-IDF 支持 Python 3.9 及以上版本,建议升级操作系统到最新版本从而更新 Python。也可选择从 `sources `_ 安装最新版 Python,或使用 Python 管理系统如 `pyenv `_ 对版本进行升级管理。 .. only:: esp32 or esp32s2 or esp32s3 diff --git a/tools/detect_python.fish b/tools/detect_python.fish index e8988e3922..5b53fb9ab5 100644 --- a/tools/detect_python.fish +++ b/tools/detect_python.fish @@ -3,11 +3,11 @@ # This is a port of detect_python.sh. More information are provided there. set OLDEST_PYTHON_SUPPORTED_MAJOR 3 -set OLDEST_PYTHON_SUPPORTED_MINOR 8 +set OLDEST_PYTHON_SUPPORTED_MINOR 9 set -x ESP_PYTHON python -for p_cmd in python3 python python3.8 python3.9 python3.10 python3.11 python3.12; +for p_cmd in python3 python python3.9 python3.10 python3.11 python3.12 python3.13; $p_cmd --version >/dev/null 2>&1; or continue echo "Checking \"$p_cmd\" ..." diff --git a/tools/detect_python.sh b/tools/detect_python.sh index bc3e65c59a..eb3b759f92 100644 --- a/tools/detect_python.sh +++ b/tools/detect_python.sh @@ -8,11 +8,11 @@ # 3. If required version of python is not found, script will fail OLDEST_PYTHON_SUPPORTED_MAJOR=3 -OLDEST_PYTHON_SUPPORTED_MINOR=8 +OLDEST_PYTHON_SUPPORTED_MINOR=9 ESP_PYTHON=python -for p_cmd in python3 python python3.8 python3.9 python3.10 python3.11 python3.12; do +for p_cmd in python3 python python3.9 python3.10 python3.11 python3.12 python3.13; do $p_cmd --version >/dev/null 2>&1 || continue echo "Checking \"$p_cmd\" ..." diff --git a/tools/python_version_checker.py b/tools/python_version_checker.py index 0ae6d8e7d4..aadaa29df4 100755 --- a/tools/python_version_checker.py +++ b/tools/python_version_checker.py @@ -1,6 +1,6 @@ #!/usr/bin/env python # -# SPDX-FileCopyrightText: 2021-2023 Espressif Systems (Shanghai) CO LTD +# SPDX-FileCopyrightText: 2021-2024 Espressif Systems (Shanghai) CO LTD # # SPDX-License-Identifier: Apache-2.0 # @@ -8,9 +8,8 @@ # # There are related tools/detect_python.{sh,fish} scripts which are called earlier when the paths are not properly # set-up and they only intend to prefer the use of Python 3 over Python 2. Why not more? All possible executables -# (python3.8, python3.9, ...) cannot be hardcoded there and at the end, the user is responsible to set-up a system +# (python3.9, python3.10, ...) cannot be hardcoded there and at the end, the user is responsible to set-up a system # where "python" or "python3" of compatible version is available. - import sys try: @@ -20,7 +19,7 @@ try: except ImportError: pass -OLDEST_PYTHON_SUPPORTED = (3, 8) # keep it as tuple for comparison with sys.version_info +OLDEST_PYTHON_SUPPORTED = (3, 9) # keep it as tuple for comparison with sys.version_info def _ver_to_str(it): # type: (Iterable) -> str