Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't allow Python3.11 as it's not currently supported due to aiohttp dependency #87858

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions homeassistant/const.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
__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)
DISALLOWED_PYTHON_VER: Final[tuple[int, int]] = (3, 11)
REQUIRED_NEXT_PYTHON_VER: Final[tuple[int, int, int]] = (3, 10, 0)
# Truthy date string triggers showing related deprecation warning messages.
REQUIRED_NEXT_PYTHON_HA_RELEASE: Final = ""
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ classifiers = [
"Programming Language :: Python :: 3.10",
"Topic :: Home Automation",
]
requires-python = ">=3.10.0"
requires-python = ">=3.10.0,<3.11"
dependencies = [
"aiohttp==3.8.1",
"astral==2.2",
Expand Down
4 changes: 3 additions & 1 deletion script/hassfest/metadata.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"""Package metadata validation."""
import sys

from homeassistant.const import REQUIRED_PYTHON_VER, __version__
from homeassistant.const import DISALLOWED_PYTHON_VER, REQUIRED_PYTHON_VER, __version__

from .model import Config, Integration

Expand All @@ -26,6 +26,8 @@ def validate(integrations: dict[str, Integration], config: Config) -> None:
config.add_error("metadata", "No 'metadata.version' key found!")

required_py_version = f">={'.'.join(map(str, REQUIRED_PYTHON_VER))}"
if DISALLOWED_PYTHON_VER:
required_py_version += f",<{'.'.join(map(str,DISALLOWED_PYTHON_VER))}"
try:
if data["project"]["requires-python"] != required_py_version:
config.add_error(
Expand Down