remove: Deprecate Python versions 3.7, 3.8 and 3.9

BREAKING CHANGE
This commit is contained in:
Peter Dragun
2025-02-14 17:45:00 +01:00
parent c3d28ee9e0
commit 19f1beeb24
7 changed files with 20 additions and 24 deletions

View File

@@ -23,7 +23,7 @@ body:
attributes:
label: Python Version
description: Which Python version are you using? Run `python -V` to check this.
placeholder: ex. Python 3.9.6
placeholder: ex. Python 3.10.6
validations:
required: true
- type: input

View File

@@ -30,7 +30,7 @@ body:
attributes:
label: Python Version
description: Which Python version are you using? Run `python -V` to check this.
placeholder: ex. Python 3.9.6
placeholder: ex. Python 3.10.6
validations:
required: true
- type: input

View File

@@ -4,11 +4,11 @@ on: [push, pull_request]
jobs:
test_esptool:
runs-on: ubuntu-22.04 # 22.04 is the last version with Python 3.7
runs-on: ubuntu-22.04
strategy:
matrix:
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11', '3.12', '3.13']
python-version: ['3.10', '3.11', '3.12', '3.13']
steps:
- name: Checkout ref commit
@@ -63,15 +63,15 @@ jobs:
git diff --exit-code
lint_esptool:
runs-on: ubuntu-22.04 # 22.04 is the last version with Python 3.7
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@master
- name: Set up Python 3.7
- name: Set up Python 3.10
uses: actions/setup-python@master
with:
python-version: 3.7
python-version: 3.10
- name: Run pre-commit hooks
run: |

View File

@@ -38,7 +38,7 @@ cache:
.test_template: &test_template
stage: test
image: python:3.7-bullseye
image: python:3.10-bullseye
tags:
- host_test
dependencies: []
@@ -137,7 +137,7 @@ host_tests_latest_python:
- pytest ${CI_PROJECT_DIR}/test/test_espefuse.py --chip esp32
# A new job "host_test_hsm" is created for the test "test_espsecure_hsm.py" which runs an ubuntu image,
# because python-pkcs11 (v0.7.0) package is compiled using GLIBC_2.34 but docker image python:3.7-bullseye
# because python-pkcs11 (v0.7.0) package is compiled using GLIBC_2.34 but docker image python:3.10-bullseye
# support versions only upto GLIBC_2.31.
host_tests_hsm:
<<: *host_tests_template
@@ -157,7 +157,7 @@ host_tests_hsm:
run_pre_commit_hooks:
stage: test
image: python:3.7-bullseye
image: python:3.10-bullseye
rules:
- if: $CI_PIPELINE_SOURCE != "schedule"
tags:
@@ -189,7 +189,6 @@ check_install_coverage:
- ".coverage*"
expire_in: 1 week
script:
- coverage run --parallel-mode setup.py install
- coverage run --parallel-mode esptool.py --help
- coverage run --parallel-mode espefuse.py --help
- coverage run --parallel-mode espsecure.py --help
@@ -250,7 +249,7 @@ check_stub_build:
.target_esptool_test:
stage: test
image: python:3.7-bullseye
image: python:3.10-bullseye
variables:
PYTHONPATH: "$PYTHONPATH:${CI_PROJECT_DIR}/test"
COVERAGE_PROCESS_START: "${CI_PROJECT_DIR}/test/.covconf"
@@ -479,7 +478,7 @@ target_tests_windows:
combine_reports:
stage: report
image: python:3.7-bullseye
image: python:3.10-bullseye
tags:
- host_test
artifacts:
@@ -509,7 +508,7 @@ combine_reports:
build_docs:
stage: build_docs
image: python:3.7-bullseye
image: python:3.12-bookworm # 3.12 is the last version with imghdr
tags:
- build_docs
rules:
@@ -532,7 +531,7 @@ build_docs:
.deploy_docs_template:
stage: deploy_docs
image: python:3.7-bullseye
image: python:3.12-bookworm # 3.12 is the last version with imghdr
tags:
- deploy
needs:

View File

@@ -12,7 +12,7 @@ repos:
name: Lint RST files in docs folder using Sphinx Lint
files: ^((docs/en)/.*\.(rst|inc))|CONTRIBUTING.rst$
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.4.1 # the last version running on py3.7
rev: v1.4.1
hooks:
- id: mypy
additional_dependencies: ['types-PyYAML<=6.0.12.12']

View File

@@ -9,8 +9,8 @@ How to Install
Global Installation
^^^^^^^^^^^^^^^^^^^
You will need `Python 3.7 or newer <https://www.python.org/downloads/>`_ installed on your system to use the latest version of ``esptool.py``.
If your use case requires Python 2.7, 3.4, 3.5, or 3.6, please use ``esptool.py`` v3.3.* instead.
You will need `Python 3.10 or newer <https://www.python.org/downloads/>`_ installed on your system to use the latest version of ``esptool.py``.
If your use case requires Python 3.7, 3.8, or 3.9, please use ``esptool.py`` v4.x. For Python 2.7, 3.4, 3.5, or 3.6, please use ``esptool.py`` v3.3.* instead.
The latest stable esptool release can be installed from `PyPI <https://pypi.org/project/esptool/>`_ via pip:

View File

@@ -22,15 +22,12 @@
"Topic :: Software Development :: Embedded Systems",
"Environment :: Console",
"License :: OSI Approved :: GNU General Public License v2 or later (GPLv2+)",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
]
requires-python = ">=3.7"
requires-python = ">=3.10"
dynamic = ["version", "scripts"]
dependencies = [
@@ -109,7 +106,7 @@
disallow_incomplete_defs = false # Disallows defining functions with incomplete type annotations
disallow_untyped_defs = false # Disallows defining functions without type annotations or with incomplete type annotations
ignore_missing_imports = true # Suppress error messages about imports that cannot be resolved
python_version = "3.7" # Specifies the Python version used to parse and check the target program
python_version = "3.10" # Specifies the Python version used to parse and check the target program
warn_no_return = true # Shows errors for missing return statements on some execution paths
warn_return_any = true # Shows a warning when returning a value with type Any from a function declared with a non- Any return type
@@ -127,7 +124,7 @@
select = ['E', 'F', 'W']
ignore = ["E203"]
target-version = "py37"
target-version = "py310"
[tool.ruff.lint]
# Enable Pyflakes (`F`) and a subset of the pycodestyle (`E`) codes by default.