From ce1f5f997eb35fafc308179b145e079306734705 Mon Sep 17 00:00:00 2001 From: Franck Nijhof Date: Sat, 22 Jul 2023 23:03:45 +0200 Subject: [PATCH] Drop Python 3.10 support (#97007) --- .github/workflows/ci.yaml | 4 ++-- homeassistant/components/actiontec/device_tracker.py | 2 +- homeassistant/components/denon/media_player.py | 2 +- homeassistant/components/hddtemp/sensor.py | 2 +- homeassistant/components/pioneer/media_player.py | 2 +- homeassistant/components/telnet/switch.py | 2 +- homeassistant/components/thomson/device_tracker.py | 2 +- homeassistant/const.py | 4 ++-- homeassistant/package_constraints.txt | 4 ---- mypy.ini | 2 +- pyproject.toml | 5 ++--- script/gen_requirements_all.py | 4 ---- 12 files changed, 13 insertions(+), 22 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 08407e46c1c..4561e8a53e1 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -33,8 +33,8 @@ env: PIP_CACHE_VERSION: 4 MYPY_CACHE_VERSION: 4 HA_SHORT_VERSION: 2023.8 - DEFAULT_PYTHON: "3.10" - ALL_PYTHON_VERSIONS: "['3.10', '3.11']" + DEFAULT_PYTHON: "3.11" + ALL_PYTHON_VERSIONS: "['3.11']" # 10.3 is the oldest supported version # - 10.3.32 is the version currently shipped with Synology (as of 17 Feb 2022) # 10.6 is the current long-term-support diff --git a/homeassistant/components/actiontec/device_tracker.py b/homeassistant/components/actiontec/device_tracker.py index 5397fed5e1d..40ff869c43b 100644 --- a/homeassistant/components/actiontec/device_tracker.py +++ b/homeassistant/components/actiontec/device_tracker.py @@ -2,7 +2,7 @@ from __future__ import annotations import logging -import telnetlib +import telnetlib # pylint: disable=deprecated-module from typing import Final import voluptuous as vol diff --git a/homeassistant/components/denon/media_player.py b/homeassistant/components/denon/media_player.py index 60da3df393e..b3b9e1a98ef 100644 --- a/homeassistant/components/denon/media_player.py +++ b/homeassistant/components/denon/media_player.py @@ -2,7 +2,7 @@ from __future__ import annotations import logging -import telnetlib +import telnetlib # pylint: disable=deprecated-module import voluptuous as vol diff --git a/homeassistant/components/hddtemp/sensor.py b/homeassistant/components/hddtemp/sensor.py index 117de2116a4..77c2a28190b 100644 --- a/homeassistant/components/hddtemp/sensor.py +++ b/homeassistant/components/hddtemp/sensor.py @@ -4,7 +4,7 @@ from __future__ import annotations from datetime import timedelta import logging import socket -from telnetlib import Telnet +from telnetlib import Telnet # pylint: disable=deprecated-module import voluptuous as vol diff --git a/homeassistant/components/pioneer/media_player.py b/homeassistant/components/pioneer/media_player.py index a124362251a..741d2b580e4 100644 --- a/homeassistant/components/pioneer/media_player.py +++ b/homeassistant/components/pioneer/media_player.py @@ -2,7 +2,7 @@ from __future__ import annotations import logging -import telnetlib +import telnetlib # pylint: disable=deprecated-module from typing import Final import voluptuous as vol diff --git a/homeassistant/components/telnet/switch.py b/homeassistant/components/telnet/switch.py index f919834139b..14e8900f000 100644 --- a/homeassistant/components/telnet/switch.py +++ b/homeassistant/components/telnet/switch.py @@ -3,7 +3,7 @@ from __future__ import annotations from datetime import timedelta import logging -import telnetlib +import telnetlib # pylint: disable=deprecated-module from typing import Any import voluptuous as vol diff --git a/homeassistant/components/thomson/device_tracker.py b/homeassistant/components/thomson/device_tracker.py index e42ee4478e0..0ad2942fb04 100644 --- a/homeassistant/components/thomson/device_tracker.py +++ b/homeassistant/components/thomson/device_tracker.py @@ -3,7 +3,7 @@ from __future__ import annotations import logging import re -import telnetlib +import telnetlib # pylint: disable=deprecated-module import voluptuous as vol diff --git a/homeassistant/const.py b/homeassistant/const.py index 94fa194fa09..85f0f4eee15 100644 --- a/homeassistant/const.py +++ b/homeassistant/const.py @@ -11,10 +11,10 @@ MINOR_VERSION: Final = 8 PATCH_VERSION: Final = "0.dev0" __short_version__: Final = f"{MAJOR_VERSION}.{MINOR_VERSION}" __version__: Final = f"{__short_version__}.{PATCH_VERSION}" -REQUIRED_PYTHON_VER: Final[tuple[int, int, int]] = (3, 10, 0) +REQUIRED_PYTHON_VER: Final[tuple[int, int, int]] = (3, 11, 0) REQUIRED_NEXT_PYTHON_VER: Final[tuple[int, int, int]] = (3, 11, 0) # Truthy date string triggers showing related deprecation warning messages. -REQUIRED_NEXT_PYTHON_HA_RELEASE: Final = "2023.8" +REQUIRED_NEXT_PYTHON_HA_RELEASE: Final = "" # Format for platform files PLATFORM_FORMAT: Final = "{platform}.{domain}" diff --git a/homeassistant/package_constraints.txt b/homeassistant/package_constraints.txt index c8f4bc835ce..aa0aceb7365 100644 --- a/homeassistant/package_constraints.txt +++ b/homeassistant/package_constraints.txt @@ -139,10 +139,6 @@ pubnub!=6.4.0 # https://github.com/dahlia/iso4217/issues/16 iso4217!=1.10.20220401 -# Pandas 1.4.4 has issues with wheels om armhf + Py3.10 -# Limit this to Python 3.10, to be able to install Python 3.11 wheels for now -pandas==1.4.3;python_version<'3.11' - # Matplotlib 3.6.2 has issues building wheels on armhf/armv7 # We need at least >=2.1.0 (tensorflow integration -> pycocotools) matplotlib==3.6.1 diff --git a/mypy.ini b/mypy.ini index 4c2d803a549..66568cf5400 100644 --- a/mypy.ini +++ b/mypy.ini @@ -3,7 +3,7 @@ # To update, run python3 -m script.hassfest -p mypy_config [mypy] -python_version = 3.10 +python_version = 3.11 plugins = pydantic.mypy show_error_codes = true follow_imports = silent diff --git a/pyproject.toml b/pyproject.toml index 6575d2f8fb3..1df65353855 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -18,11 +18,10 @@ classifiers = [ "Intended Audience :: Developers", "License :: OSI Approved :: Apache Software License", "Operating System :: OS Independent", - "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Topic :: Home Automation", ] -requires-python = ">=3.10.0" +requires-python = ">=3.11.0" dependencies = [ "aiohttp==3.8.5", "astral==2.2", @@ -80,7 +79,7 @@ include = ["homeassistant*"] extend-exclude = "/generated/" [tool.pylint.MAIN] -py-version = "3.10" +py-version = "3.11" ignore = [ "tests", ] diff --git a/script/gen_requirements_all.py b/script/gen_requirements_all.py index f3d0defac4d..8258543df1d 100755 --- a/script/gen_requirements_all.py +++ b/script/gen_requirements_all.py @@ -144,10 +144,6 @@ pubnub!=6.4.0 # https://github.com/dahlia/iso4217/issues/16 iso4217!=1.10.20220401 -# Pandas 1.4.4 has issues with wheels om armhf + Py3.10 -# Limit this to Python 3.10, to be able to install Python 3.11 wheels for now -pandas==1.4.3;python_version<'3.11' - # Matplotlib 3.6.2 has issues building wheels on armhf/armv7 # We need at least >=2.1.0 (tensorflow integration -> pycocotools) matplotlib==3.6.1