Merge branch 'update/drop_python36' into 'master'

Drop Python 3.6

See merge request espressif/esp-idf!16676
This commit is contained in:
Roland Dobai 2022-02-10 13:09:42 +00:00
commit 51bfd280f8
13 changed files with 32 additions and 29 deletions

View File

@ -13,7 +13,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.6, 3.7, 3.8]
python-version: ["3.7", "3.8", "3.9", "3.10"]
steps:
- name: Checkout

View File

@ -56,12 +56,14 @@ variables:
# Docker images
BOT_DOCKER_IMAGE_TAG: ":latest"
ESP_ENV_IMAGE: "${CI_DOCKER_REGISTRY}/esp-env-v5.0:1"
AFL_FUZZER_TEST_IMAGE: "${CI_DOCKER_REGISTRY}/afl-fuzzer-test-v5.0:1-1"
CLANG_STATIC_ANALYSIS_IMAGE: "${CI_DOCKER_REGISTRY}/clang-static-analysis-v5.0:1-1"
ESP_IDF_DOC_ENV_IMAGE: "${CI_DOCKER_REGISTRY}/esp-idf-doc-env-v5.0:1-2"
ESP_IDF_DOC_ENV_IMAGE: "$CI_DOCKER_REGISTRY/esp-idf-doc-env-v5.0:2-2"
ESP_ENV_IMAGE: "$CI_DOCKER_REGISTRY/esp-env-v5.0:2"
AFL_FUZZER_TEST_IMAGE: "$CI_DOCKER_REGISTRY/afl-fuzzer-test-v5.0:2-1"
CLANG_STATIC_ANALYSIS_IMAGE: "${CI_DOCKER_REGISTRY}/clang-static-analysis-v5.0:2-1"
SONARQUBE_SCANNER_IMAGE: "${CI_DOCKER_REGISTRY}/sonarqube-scanner:3"
LINUX_SHELL_IMAGE: "${CI_DOCKER_REGISTRY}/linux-shells:2"
LINUX_SHELL_IMAGE: "${CI_DOCKER_REGISTRY}/linux-shells-v5.0:2"
# target test config file, used by assign test job
CI_TARGET_TEST_CONFIG_FILE: "$CI_PROJECT_DIR/.gitlab/ci/target-test.yml"

View File

@ -21,7 +21,7 @@
- job: fast_template_app
artifacts: false
variables:
PYTHON_VER: 3.6.13
PYTHON_VER: 3.7.10
artifacts:
paths:
- "**/build*/size.json"
@ -203,7 +203,7 @@ build_ssc_esp32s3:
OUTPUT_PATH: ${CI_PROJECT_DIR}/tools/unit-test-app/output
BUILD_SYSTEM: "cmake"
TEST_TYPE: "unit_test"
PYTHON_VER: 3.6.13
PYTHON_VER: 3.7.10
LDGEN_CHECK_MAPPING: 1
script:
- ${IDF_PATH}/tools/ci/find_apps_build_apps.sh
@ -261,7 +261,7 @@ build_esp_idf_tests_cmake_esp32c2:
TEST_TYPE: example_test
LOG_PATH: ${CI_PROJECT_DIR}/log_${TEST_PREFIX}
BUILD_PATH: ${CI_PROJECT_DIR}/build_${TEST_PREFIX}
PYTHON_VER: 3.6.13
PYTHON_VER: 3.7.10
LDGEN_CHECK_MAPPING: 1
script:
# it's not possible to build 100% out-of-tree and have the "artifacts"

View File

@ -58,7 +58,7 @@ check_docs_lang_sync:
.build_docs_template:
image: $ESP_IDF_DOC_ENV_IMAGE
variables:
PYTHON_VER: 3.6.13
PYTHON_VER: 3.7.10
tags:
- build_docs
dependencies: []
@ -74,7 +74,7 @@ check_docs_lang_sync:
check_docs_gh_links:
image: $ESP_IDF_DOC_ENV_IMAGE
variables:
PYTHON_VER: 3.6.13
PYTHON_VER: 3.7.10
extends:
- .pre_check_job_template
- .doc-rules:build:docs
@ -151,7 +151,7 @@ build_docs_pdf:
- .before_script_no_sync_submodule
image: $ESP_IDF_DOC_ENV_IMAGE
variables:
PYTHON_VER: 3.6.13
PYTHON_VER: 3.7.10
DOCS_BUILD_DIR: "${IDF_PATH}/docs/_build/"
PYTHONUNBUFFERED: 1
stage: test_deploy

View File

@ -3,7 +3,7 @@
stage: host_test
image: $ESP_ENV_IMAGE
variables:
PYTHON_VER: 3.6.13
PYTHON_VER: 3.7.10
tags:
- host_test
dependencies: []

View File

@ -52,7 +52,7 @@ check_python_style:
- .pre_check_base_template
- .rules:patterns:python-files
variables:
PYTHON_VER: 3.6.13
PYTHON_VER: 3.7.10
artifacts:
when: on_failure
paths:
@ -64,7 +64,7 @@ check_python_style:
test_check_kconfigs:
extends: .pre_check_job_template
variables:
PYTHON_VER: 3.6.13
PYTHON_VER: 3.7.10
artifacts:
when: on_failure
paths:

View File

@ -80,8 +80,6 @@ For commands that are not known to ``idf.py`` an attempt to execute them as a bu
The command ``idf.py`` supports `shell autocompletion <https://click.palletsprojects.com/shell-completion/>`_ for bash, zsh and fish shells.
In order to make `shell autocompletion <https://click.palletsprojects.com/shell-completion/>`_ supported, please make sure you have at least Python 3.5 and `click <https://click.palletsprojects.com/>`_ 7.1 or newer (:ref:`see also <get-started-get-prerequisites>`).
To enable autocompletion for ``idf.py`` use the ``export`` command (:ref:`see this <get-started-export>`). Autocompletion is initiated by pressing the TAB key. Type "idf.py -" and press the TAB key to autocomplete options.
The autocomplete support for PowerShell is planned in the future.
@ -192,7 +190,7 @@ For more detailed information about integrating ESP-IDF with CMake into an IDE,
Setting up the Python Interpreter
---------------------------------
ESP-IDF works well with all supported Python versions. It should work out-of-box even if you have a legacy system where the default ``python`` interpreter is still Python 2.7, however, it is advised to switch to Python 3 if possible.
ESP-IDF works well with Python version 3.7+.
``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.

View File

@ -9,7 +9,7 @@ IDF Docker image (``espressif/idf``) is intended for building applications and l
The image contains:
- Common utilities such as git, wget, curl, zip.
- Python 3.6 or newer.
- Python 3.7 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 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.

View File

@ -4,7 +4,7 @@ Install pre-commit Hook for ESP-IDF Project
Required Dependency
-------------------
Python 3.6.1 or above. This is our recommended python version for IDF developers.
Python 3.7.* 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.

View File

@ -38,7 +38,7 @@ With some Linux distributions you may get the ``Failed to open port /dev/ttyUSB0
Python compatibility
====================
ESP-IDF supports Python 3.6 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 <https://www.python.org/downloads/>`_ or the use of a Python version management system such as `pyenv <https://github.com/pyenv/pyenv>`_.
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 <https://www.python.org/downloads/>`_ or the use of a Python version management system such as `pyenv <https://github.com/pyenv/pyenv>`_.
Next Steps
==========

View File

@ -38,7 +38,7 @@ Linux 平台工具链的标准设置
兼容的 Python 版本
=================================
ESP-IDF 支持 Python 3.6 及以上版本,建议升级操作系统到最新版本从而更新 Python。也可选择从 `sources <https://www.python.org/downloads/>`_ 安装最新版 Python或使用 Python 管理系统如 `pyenv <https://github.com/pyenv/pyenv>`_ 对版本进行升级管理。
ESP-IDF 支持 Python 3.7 及以上版本,建议升级操作系统到最新版本从而更新 Python。也可选择从 `sources <https://www.python.org/downloads/>`_ 安装最新版 Python或使用 Python 管理系统如 `pyenv <https://github.com/pyenv/pyenv>`_ 对版本进行升级管理。
后续步骤
==========

View File

@ -4,7 +4,7 @@ if [ -z ${PYTHON_VER+x} ]; then
# Use this version of the Python interpreter if it was not defined before.
# 3.6.13 is the default python3 interpreter in esp32-ci-env
# Jobs which doesn't support this version should define PYTHON_VER themselves
PYTHON_VER=3.6.13
PYTHON_VER=3.7.10
fi
if [ -f /opt/pyenv/activate ];

View File

@ -1,4 +1,4 @@
# SPDX-FileCopyrightText: 2021 Espressif Systems (Shanghai) CO LTD
# SPDX-FileCopyrightText: 2021-2022 Espressif Systems (Shanghai) CO LTD
#
# SPDX-License-Identifier: Apache-2.0
#
@ -6,7 +6,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.6, python3.7, ...) cannot be hardcoded there and at the end, the user is responsible to set-up a system
# (python3.7, python3.8, ...) 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
@ -18,7 +18,7 @@ try:
except ImportError:
pass
OLDEST_PYTHON_SUPPORTED = (3, 6) # keep it as tuple for comparison with sys.version_info
OLDEST_PYTHON_SUPPORTED = (3, 7) # keep it as tuple for comparison with sys.version_info
def _ver_to_str(it): # type: (Iterable) -> str
@ -31,6 +31,9 @@ def is_supported(): # type: () -> bool
def check(): # type: () -> None
if not is_supported():
raise RuntimeError('ESP-IDF supports Python {} or newer but you are using Python {}. Please upgrade your '
'installation as described in the documentation.'.format(_ver_to_str(OLDEST_PYTHON_SUPPORTED),
_ver_to_str(sys.version_info[:3])))
raise RuntimeError(
'ESP-IDF supports Python {} or newer but you are using Python {}. Please upgrade your '
'installation as described in the documentation.'.format(
_ver_to_str(OLDEST_PYTHON_SUPPORTED), _ver_to_str(sys.version_info[:3])
)
)