From 6e98f72f8b4b9156e731ed13515f0a7fc1571133 Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Fri, 29 Dec 2023 10:19:06 -1000 Subject: [PATCH] Bump SQLAlchemy to 2.0.24 (#106672) --- homeassistant/components/recorder/manifest.json | 2 +- homeassistant/components/recorder/statistics.py | 4 ++-- homeassistant/components/sql/manifest.json | 2 +- homeassistant/package_constraints.txt | 2 +- requirements_all.txt | 2 +- requirements_test_all.txt | 2 +- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/homeassistant/components/recorder/manifest.json b/homeassistant/components/recorder/manifest.json index b630a71daff..6f3371681e5 100644 --- a/homeassistant/components/recorder/manifest.json +++ b/homeassistant/components/recorder/manifest.json @@ -7,7 +7,7 @@ "iot_class": "local_push", "quality_scale": "internal", "requirements": [ - "SQLAlchemy==2.0.23", + "SQLAlchemy==2.0.24", "fnv-hash-fast==0.5.0", "psutil-home-assistant==0.0.1" ] diff --git a/homeassistant/components/recorder/statistics.py b/homeassistant/components/recorder/statistics.py index ad6cdd31e2c..8f932ecf499 100644 --- a/homeassistant/components/recorder/statistics.py +++ b/homeassistant/components/recorder/statistics.py @@ -101,7 +101,7 @@ QUERY_STATISTICS_SHORT_TERM = ( StatisticsShortTerm.sum, ) -QUERY_STATISTICS_SUMMARY_MEAN = ( +QUERY_STATISTICS_SUMMARY_MEAN = ( # type: ignore[var-annotated] StatisticsShortTerm.metadata_id, func.avg(StatisticsShortTerm.mean), func.min(StatisticsShortTerm.min), @@ -115,7 +115,7 @@ QUERY_STATISTICS_SUMMARY_SUM = ( StatisticsShortTerm.state, StatisticsShortTerm.sum, func.row_number() - .over( # type: ignore[no-untyped-call] + .over( partition_by=StatisticsShortTerm.metadata_id, order_by=StatisticsShortTerm.start_ts.desc(), ) diff --git a/homeassistant/components/sql/manifest.json b/homeassistant/components/sql/manifest.json index 5ebd79b09a5..0409f2cdf6f 100644 --- a/homeassistant/components/sql/manifest.json +++ b/homeassistant/components/sql/manifest.json @@ -5,5 +5,5 @@ "config_flow": true, "documentation": "https://www.home-assistant.io/integrations/sql", "iot_class": "local_polling", - "requirements": ["SQLAlchemy==2.0.23", "sqlparse==0.4.4"] + "requirements": ["SQLAlchemy==2.0.24", "sqlparse==0.4.4"] } diff --git a/homeassistant/package_constraints.txt b/homeassistant/package_constraints.txt index a6c59c98dc0..ec821523c17 100644 --- a/homeassistant/package_constraints.txt +++ b/homeassistant/package_constraints.txt @@ -52,7 +52,7 @@ pyudev==0.23.2 PyYAML==6.0.1 requests==2.31.0 scapy==2.5.0 -SQLAlchemy==2.0.23 +SQLAlchemy==2.0.24 typing-extensions>=4.9.0,<5.0 ulid-transform==0.9.0 voluptuous-serialize==2.6.0 diff --git a/requirements_all.txt b/requirements_all.txt index f9b312e391f..44e75b0cf74 100644 --- a/requirements_all.txt +++ b/requirements_all.txt @@ -128,7 +128,7 @@ RtmAPI==0.7.2 # homeassistant.components.recorder # homeassistant.components.sql -SQLAlchemy==2.0.23 +SQLAlchemy==2.0.24 # homeassistant.components.tami4 Tami4EdgeAPI==2.1 diff --git a/requirements_test_all.txt b/requirements_test_all.txt index 289732c846f..5d6bc299ceb 100644 --- a/requirements_test_all.txt +++ b/requirements_test_all.txt @@ -113,7 +113,7 @@ RtmAPI==0.7.2 # homeassistant.components.recorder # homeassistant.components.sql -SQLAlchemy==2.0.23 +SQLAlchemy==2.0.24 # homeassistant.components.tami4 Tami4EdgeAPI==2.1