diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 68c572241f..bd8884f62d 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -56,18 +56,17 @@ variables:
BATCH_BUILD: "1"
V: "0"
CHECKOUT_REF_SCRIPT: "$CI_PROJECT_DIR/tools/ci/checkout_project_ref.py"
- PYTHON_VER: 3.7.10
+ PYTHON_VER: 3.8.17
CLANG_TIDY_RUNNER_PROJ: 2107 # idf/clang-tidy-runner
# Docker images
BOT_DOCKER_IMAGE_TAG: ":latest"
- ESP_ENV_IMAGE: "$CI_DOCKER_REGISTRY/esp-env-v5.2:1"
- CLANG_STATIC_ANALYSIS_IMAGE: "${CI_DOCKER_REGISTRY}/clang-static-analysis-v5.2:1-1"
- ESP_IDF_DOC_ENV_IMAGE: "$CI_DOCKER_REGISTRY/esp-idf-doc-env-v5.2:1-1"
- QEMU_IMAGE: "${CI_DOCKER_REGISTRY}/qemu-v5.2:1-20230522"
- TARGET_TEST_ENV_IMAGE: "$CI_DOCKER_REGISTRY/target-test-env-v5.2:1"
+ ESP_ENV_IMAGE: "$CI_DOCKER_REGISTRY/esp-env-v5.2:2"
+ ESP_IDF_DOC_ENV_IMAGE: "$CI_DOCKER_REGISTRY/esp-idf-doc-env-v5.2:2-1"
+ QEMU_IMAGE: "${CI_DOCKER_REGISTRY}/qemu-v5.2:2-20230522"
+ TARGET_TEST_ENV_IMAGE: "$CI_DOCKER_REGISTRY/target-test-env-v5.2:2"
SONARQUBE_SCANNER_IMAGE: "${CI_DOCKER_REGISTRY}/sonarqube-scanner:3"
diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index 431920425c..1c9a67166c 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -34,7 +34,7 @@ repos:
- id: flake8
args: ['--config=.flake8', '--tee', '--benchmark']
- repo: https://github.com/pycqa/isort
- rev: 5.11.5 # python 3.7 compatible
+ rev: 5.12.0 # python 3.8 compatible
hooks:
- id: isort
name: isort (python)
diff --git a/docs/en/api-guides/build-system.rst b/docs/en/api-guides/build-system.rst
index 8dfed4361a..8bb523bdbe 100644
--- a/docs/en/api-guides/build-system.rst
+++ b/docs/en/api-guides/build-system.rst
@@ -119,7 +119,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.7+.
+ESP-IDF works well with Python version 3.8+.
``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 1b7cf9b6ba..4413553836 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 @@ ESP-IDF Docker image (``espressif/idf``) is intended for building applications a
The image contains:
- Common utilities such as ``git``, ``wget``, ``curl``, and ``zip``.
-- Python 3.7 or newer.
+- Python 3.8 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/contribute/install-pre-commit-hook.rst b/docs/en/contribute/install-pre-commit-hook.rst
index 234641de41..8bcc96213c 100644
--- a/docs/en/contribute/install-pre-commit-hook.rst
+++ b/docs/en/contribute/install-pre-commit-hook.rst
@@ -6,7 +6,7 @@ Install pre-commit Hook for ESP-IDF Project
Required Dependency
-------------------
-Python 3.7.* or above. This is our recommended Python version for IDF developers.
+Python 3.8.* or above. This is our recommended Python version for IDF developers.
If you still have Python versions not compatible, update your Python versions before installing the pre-commit hook.
diff --git a/docs/en/get-started/start-project.rst b/docs/en/get-started/start-project.rst
index 9aeb9e7c67..e987be67de 100644
--- a/docs/en/get-started/start-project.rst
+++ b/docs/en/get-started/start-project.rst
@@ -455,7 +455,7 @@ With some Linux distributions, you may get the ``Failed to open port /dev/ttyUSB
Python compatibility
~~~~~~~~~~~~~~~~~~~~
-ESP-IDF supports Python 3.7 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.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 `_.
.. 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 2d4ba1f027..9a1b397265 100644
--- a/docs/zh_CN/api-guides/build-system.rst
+++ b/docs/zh_CN/api-guides/build-system.rst
@@ -119,7 +119,7 @@ idf.py
设置 Python 解释器
------------------
-ESP-IDF 适用于 Python 3.7 以上版本。
+ESP-IDF 适用于 Python 3.8 以上版本。
``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 275f216645..57a77621ce 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 @@ ESP-IDF Docker 镜像 (``espressif/idf``) 为使用特定版本的 ESP-IDF 自
该镜像包含以下内容:
- 常见的实用工具,如 ``git``、``wget``、``curl`` 和 ``zip``。
-- Python 3.7 或更高版本。
+- Python 3.8 或更高版本。
- 特定版本 ESP-IDF 的副本。有关版本信息,请参阅下文。该副本中设置了 ``IDF_PATH`` 环境变量,并指向容器中 ESP-IDF 的位置。
- 构建特定版本 ESP-IDF 所需工具:CMake、Ninja、交叉编译器工具链等。
- ESP-IDF 需要的所有 Python 软件包。这些软件包均已安装在虚拟环境中。
diff --git a/docs/zh_CN/contribute/install-pre-commit-hook.rst b/docs/zh_CN/contribute/install-pre-commit-hook.rst
index 5ebfc652ec..c5f8083270 100644
--- a/docs/zh_CN/contribute/install-pre-commit-hook.rst
+++ b/docs/zh_CN/contribute/install-pre-commit-hook.rst
@@ -6,7 +6,7 @@
环境依赖
---------------
-我们向 IDF 开发人员推荐 Python 3.7.* 及以上版本。
+我们向 IDF 开发人员推荐 Python 3.8.* 及以上版本。
如果你已安装了不兼容的 Python 版本,应在安装 pre-commit 工具前进行更新。
diff --git a/docs/zh_CN/get-started/start-project.rst b/docs/zh_CN/get-started/start-project.rst
index 7db97c4ef9..b21daeb56b 100644
--- a/docs/zh_CN/get-started/start-project.rst
+++ b/docs/zh_CN/get-started/start-project.rst
@@ -455,7 +455,7 @@
兼容的 Python 版本
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-ESP-IDF 支持 Python 3.7 及以上版本,建议升级操作系统到最新版本从而更新 Python。也可选择从 `sources `_ 安装最新版 Python,或使用 Python 管理系统如 `pyenv `_ 对版本进行升级管理。
+ESP-IDF 支持 Python 3.8 及以上版本,建议升级操作系统到最新版本从而更新 Python。也可选择从 `sources `_ 安装最新版 Python,或使用 Python 管理系统如 `pyenv `_ 对版本进行升级管理。
.. only:: esp32 or esp32s2 or esp32s3
diff --git a/tools/detect_python.fish b/tools/detect_python.fish
index bb72445c1d..e8988e3922 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 7
+set OLDEST_PYTHON_SUPPORTED_MINOR 8
set -x ESP_PYTHON python
-for p_cmd in python3 python python3.7 python3.8 python3.9 python3.10 python3.11 python3.12;
+for p_cmd in python3 python python3.8 python3.9 python3.10 python3.11 python3.12;
$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 ffedd6065d..bc3e65c59a 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=7
+OLDEST_PYTHON_SUPPORTED_MINOR=8
ESP_PYTHON=python
-for p_cmd in python3 python python3.7 python3.8 python3.9 python3.10 python3.11 python3.12; do
+for p_cmd in python3 python python3.8 python3.9 python3.10 python3.11 python3.12; 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 48a13a90dc..0ae6d8e7d4 100755
--- a/tools/python_version_checker.py
+++ b/tools/python_version_checker.py
@@ -1,6 +1,6 @@
#!/usr/bin/env python
#
-# SPDX-FileCopyrightText: 2021-2022 Espressif Systems (Shanghai) CO LTD
+# SPDX-FileCopyrightText: 2021-2023 Espressif Systems (Shanghai) CO LTD
#
# SPDX-License-Identifier: Apache-2.0
#
@@ -8,7 +8,7 @@
#
# 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.7, python3.8, ...) cannot be hardcoded there and at the end, the user is responsible to set-up a system
+# (python3.8, python3.9, ...) 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
@@ -20,7 +20,7 @@ try:
except ImportError:
pass
-OLDEST_PYTHON_SUPPORTED = (3, 7) # keep it as tuple for comparison with sys.version_info
+OLDEST_PYTHON_SUPPORTED = (3, 8) # keep it as tuple for comparison with sys.version_info
def _ver_to_str(it): # type: (Iterable) -> str