1
0
mirror of https://github.com/esphome/esphome.git synced 2025-03-01 00:08:15 +00:00

Replace references to Python 3.9 with Python 3.11

This commit is contained in:
Katherine Whitlock 2025-01-17 18:46:17 -05:00
parent 9e40d4cf45
commit 6b55b7e1b6
6 changed files with 15 additions and 15 deletions

View File

@ -44,7 +44,7 @@ jobs:
- name: Set up Python - name: Set up Python
uses: actions/setup-python@v5.3.0 uses: actions/setup-python@v5.3.0
with: with:
python-version: "3.9" python-version: "3.11"
- name: Set up Docker Buildx - name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3.8.0 uses: docker/setup-buildx-action@v3.8.0
- name: Set up QEMU - name: Set up QEMU

View File

@ -20,8 +20,8 @@ permissions:
contents: read contents: read
env: env:
DEFAULT_PYTHON: "3.9" DEFAULT_PYTHON: "3.11"
PYUPGRADE_TARGET: "--py39-plus" PYUPGRADE_TARGET: "--py311-plus"
concurrency: concurrency:
# yamllint disable-line rule:line-length # yamllint disable-line rule:line-length
@ -172,10 +172,10 @@ jobs:
fail-fast: false fail-fast: false
matrix: matrix:
python-version: python-version:
- "3.9"
- "3.10" - "3.10"
- "3.11" - "3.11"
- "3.12" - "3.12"
- "3.13"
os: os:
- ubuntu-latest - ubuntu-latest
- macOS-latest - macOS-latest
@ -184,18 +184,18 @@ jobs:
# Minimize CI resource usage # Minimize CI resource usage
# by only running the Python version # by only running the Python version
# version used for docker images on Windows and macOS # version used for docker images on Windows and macOS
- python-version: "3.13"
os: windows-latest
- python-version: "3.12" - python-version: "3.12"
os: windows-latest os: windows-latest
- python-version: "3.10" - python-version: "3.10"
os: windows-latest os: windows-latest
- python-version: "3.9" - python-version: "3.13"
os: windows-latest os: macOS-latest
- python-version: "3.12" - python-version: "3.12"
os: macOS-latest os: macOS-latest
- python-version: "3.10" - python-version: "3.10"
os: macOS-latest os: macOS-latest
- python-version: "3.9"
os: macOS-latest
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
needs: needs:
- common - common

View File

@ -87,7 +87,7 @@ jobs:
- name: Set up Python - name: Set up Python
uses: actions/setup-python@v5.3.0 uses: actions/setup-python@v5.3.0
with: with:
python-version: "3.9" python-version: "3.11"
- name: Set up Docker Buildx - name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3.8.0 uses: docker/setup-buildx-action@v3.8.0

View File

@ -31,7 +31,7 @@ repos:
rev: v3.15.2 rev: v3.15.2
hooks: hooks:
- id: pyupgrade - id: pyupgrade
args: [--py39-plus] args: [--py311-plus]
- repo: https://github.com/adrienverge/yamllint.git - repo: https://github.com/adrienverge/yamllint.git
rev: v1.35.1 rev: v1.35.1
hooks: hooks:

View File

@ -20,7 +20,7 @@ classifiers = [
"Programming Language :: Python :: 3", "Programming Language :: Python :: 3",
"Topic :: Home Automation", "Topic :: Home Automation",
] ]
requires-python = ">=3.9.0" requires-python = ">=3.11.0"
dynamic = ["dependencies", "optional-dependencies", "version"] dynamic = ["dependencies", "optional-dependencies", "version"]
@ -52,7 +52,7 @@ version = {attr = "esphome.const.__version__"}
include = ["esphome*"] include = ["esphome*"]
[tool.black] [tool.black]
target-version = ["py39", "py310"] target-version = ["py311", "py312"]
exclude = 'generated' exclude = 'generated'
[tool.pytest.ini_options] [tool.pytest.ini_options]
@ -65,7 +65,7 @@ addopts = [
] ]
[tool.pylint.MAIN] [tool.pylint.MAIN]
py-version = "3.9" py-version = "3.11"
ignore = [ ignore = [
"api_pb2.py", "api_pb2.py",
] ]

View File

@ -19,7 +19,7 @@ curfile = None
def print_error(file, lineno, msg): def print_error(file, lineno, msg):
global curfile global curfile # noqa PLW0603
if curfile != file: if curfile != file:
print_error_for_file(file, None) print_error_for_file(file, None)
@ -110,7 +110,7 @@ def main():
print_error(file_, linno, msg) print_error(file_, linno, msg)
errors += 1 errors += 1
PYUPGRADE_TARGET = "--py39-plus" PYUPGRADE_TARGET = "--py311-plus"
cmd = ["pyupgrade", PYUPGRADE_TARGET] + files cmd = ["pyupgrade", PYUPGRADE_TARGET] + files
print() print()
print("Running pyupgrade...") print("Running pyupgrade...")