diff --git a/homeassistant/components/amazon_polly/manifest.json b/homeassistant/components/amazon_polly/manifest.json index ffc07341b86e..3e763bf8a6e6 100644 --- a/homeassistant/components/amazon_polly/manifest.json +++ b/homeassistant/components/amazon_polly/manifest.json @@ -7,5 +7,5 @@ "iot_class": "cloud_push", "loggers": ["boto3", "botocore", "s3transfer"], "quality_scale": "legacy", - "requirements": ["boto3==1.42.97"] + "requirements": ["boto3==1.43.117"] } diff --git a/homeassistant/components/aws/manifest.json b/homeassistant/components/aws/manifest.json index 21c0e1b7987c..03f6522c85d9 100644 --- a/homeassistant/components/aws/manifest.json +++ b/homeassistant/components/aws/manifest.json @@ -10,5 +10,5 @@ "iot_class": "cloud_push", "loggers": ["aiobotocore", "botocore"], "quality_scale": "legacy", - "requirements": ["aiobotocore==3.7.0"] + "requirements": ["aiobotocore==3.10.0"] } diff --git a/homeassistant/components/aws_s3/manifest.json b/homeassistant/components/aws_s3/manifest.json index 11545424a3b3..ba624b7e1171 100644 --- a/homeassistant/components/aws_s3/manifest.json +++ b/homeassistant/components/aws_s3/manifest.json @@ -10,5 +10,5 @@ "iot_class": "cloud_polling", "loggers": ["aiobotocore"], "quality_scale": "bronze", - "requirements": ["aiobotocore==3.7.0"] + "requirements": ["aiobotocore==3.10.0"] } diff --git a/homeassistant/components/cloudflare_r2/manifest.json b/homeassistant/components/cloudflare_r2/manifest.json index bb099e4300f9..25352f083302 100644 --- a/homeassistant/components/cloudflare_r2/manifest.json +++ b/homeassistant/components/cloudflare_r2/manifest.json @@ -9,5 +9,5 @@ "iot_class": "cloud_push", "loggers": ["aiobotocore"], "quality_scale": "bronze", - "requirements": ["aiobotocore==3.7.0"] + "requirements": ["aiobotocore==3.10.0"] } diff --git a/homeassistant/components/idrive_e2/manifest.json b/homeassistant/components/idrive_e2/manifest.json index 19993406194e..19232bf8f7f0 100644 --- a/homeassistant/components/idrive_e2/manifest.json +++ b/homeassistant/components/idrive_e2/manifest.json @@ -9,5 +9,5 @@ "iot_class": "cloud_push", "loggers": ["aiobotocore"], "quality_scale": "bronze", - "requirements": ["aiobotocore==3.7.0", "idrive-e2-client==0.1.1"] + "requirements": ["aiobotocore==3.10.0", "idrive-e2-client==0.1.1"] } diff --git a/homeassistant/components/route53/manifest.json b/homeassistant/components/route53/manifest.json index fa545177baa1..e60590223fa4 100644 --- a/homeassistant/components/route53/manifest.json +++ b/homeassistant/components/route53/manifest.json @@ -7,5 +7,5 @@ "iot_class": "cloud_push", "loggers": ["boto3", "botocore", "s3transfer"], "quality_scale": "legacy", - "requirements": ["boto3==1.42.97"] + "requirements": ["boto3==1.43.117"] } diff --git a/homeassistant/package_constraints.txt b/homeassistant/package_constraints.txt index 37777b670947..9e3588a7b18d 100644 --- a/homeassistant/package_constraints.txt +++ b/homeassistant/package_constraints.txt @@ -100,8 +100,8 @@ grpcio-reflection==1.83.1 # runtime requirement install cannot pull in a botocore version that is # incompatible with aiobotocore. # see https://github.com/home-assistant/core/issues/167399 -boto3==1.42.97 -botocore==1.42.97 +boto3==1.43.117 +botocore==1.43.117 # This is a old unmaintained library and is replaced with pycryptodome pycrypto==1000000000.0.0 diff --git a/requirements_all.txt b/requirements_all.txt index 7db0e8105ab8..8fb4a92992f8 100644 --- a/requirements_all.txt +++ b/requirements_all.txt @@ -233,7 +233,7 @@ aiobafi6==0.9.0 # homeassistant.components.aws_s3 # homeassistant.components.cloudflare_r2 # homeassistant.components.idrive_e2 -aiobotocore==3.7.0 +aiobotocore==3.10.0 # homeassistant.components.centriconnect aiocentriconnect==0.2.3 @@ -765,7 +765,7 @@ boschshcpy==0.6.25 # homeassistant.components.amazon_polly # homeassistant.components.route53 -boto3==1.42.97 +boto3==1.43.117 # homeassistant.components.bring bring-api==1.1.2 diff --git a/script/gen_requirements_all.py b/script/gen_requirements_all.py index 03aa8bffc217..a763a7a01d22 100755 --- a/script/gen_requirements_all.py +++ b/script/gen_requirements_all.py @@ -74,8 +74,8 @@ grpcio-reflection==1.83.1 # runtime requirement install cannot pull in a botocore version that is # incompatible with aiobotocore. # see https://github.com/home-assistant/core/issues/167399 -boto3==1.42.97 -botocore==1.42.97 +boto3==1.43.117 +botocore==1.43.117 # This is a old unmaintained library and is replaced with pycryptodome pycrypto==1000000000.0.0 diff --git a/tests/components/aws_s3/test_backup.py b/tests/components/aws_s3/test_backup.py index f4f0a53df45f..fe4b5a528861 100644 --- a/tests/components/aws_s3/test_backup.py +++ b/tests/components/aws_s3/test_backup.py @@ -771,7 +771,9 @@ async def test_agent_download_backup_parametrized( @pytest.fixture -def downloaded_bodies(mock_client: MagicMock) -> list[StreamingBody]: +def downloaded_bodies( + mock_client: MagicMock, monkeypatch: pytest.MonkeyPatch +) -> list[StreamingBody]: """Return the bodies of downloaded backup archives.""" bodies: list[StreamingBody] = [] get_object = mock_client.get_object.side_effect @@ -779,7 +781,10 @@ def downloaded_bodies(mock_client: MagicMock) -> list[StreamingBody]: def get_object_and_track(**kwargs: Any) -> dict[str, Any]: response = get_object(**kwargs) if kwargs["Key"].endswith(".tar"): - bodies.append(response["Body"]) + body = response["Body"] + # Spy on the real close so tests can assert the body was closed + monkeypatch.setattr(body, "close", Mock(wraps=body.close)) + bodies.append(body) return response mock_client.get_object.side_effect = get_object_and_track diff --git a/tests/components/cloudflare_r2/test_backup.py b/tests/components/cloudflare_r2/test_backup.py index e44d2ae8276d..c7aa8361052e 100644 --- a/tests/components/cloudflare_r2/test_backup.py +++ b/tests/components/cloudflare_r2/test_backup.py @@ -675,7 +675,9 @@ async def test_agent_list_backups_parametrized( @pytest.fixture -def downloaded_bodies(mock_client: MagicMock) -> list[StreamingBody]: +def downloaded_bodies( + mock_client: MagicMock, monkeypatch: pytest.MonkeyPatch +) -> list[StreamingBody]: """Return the bodies of downloaded backup archives.""" bodies: list[StreamingBody] = [] get_object = mock_client.get_object.side_effect @@ -683,7 +685,10 @@ def downloaded_bodies(mock_client: MagicMock) -> list[StreamingBody]: def get_object_and_track(**kwargs: Any) -> dict[str, Any]: response = get_object(**kwargs) if kwargs["Key"].endswith(".tar"): - bodies.append(response["Body"]) + body = response["Body"] + # Spy on the real close so tests can assert the body was closed + monkeypatch.setattr(body, "close", Mock(wraps=body.close)) + bodies.append(body) return response mock_client.get_object.side_effect = get_object_and_track diff --git a/tests/components/idrive_e2/test_backup.py b/tests/components/idrive_e2/test_backup.py index fff00a01ab4b..258877e84b09 100644 --- a/tests/components/idrive_e2/test_backup.py +++ b/tests/components/idrive_e2/test_backup.py @@ -599,7 +599,9 @@ async def test_list_backups_with_pagination( @pytest.fixture -def downloaded_bodies(mock_client: MagicMock) -> list[StreamingBody]: +def downloaded_bodies( + mock_client: MagicMock, monkeypatch: pytest.MonkeyPatch +) -> list[StreamingBody]: """Return the bodies of downloaded backup archives.""" bodies: list[StreamingBody] = [] get_object = mock_client.get_object.side_effect @@ -607,7 +609,10 @@ def downloaded_bodies(mock_client: MagicMock) -> list[StreamingBody]: def get_object_and_track(**kwargs: Any) -> dict[str, Any]: response = get_object(**kwargs) if kwargs["Key"].endswith(".tar"): - bodies.append(response["Body"]) + body = response["Body"] + # Spy on the real close so tests can assert the body was closed + monkeypatch.setattr(body, "close", Mock(wraps=body.close)) + bodies.append(body) return response mock_client.get_object.side_effect = get_object_and_track