From 6dbe67e90988e791e321448627bb2dc722267987 Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Wed, 12 Apr 2023 20:11:59 -1000 Subject: [PATCH] Bump httpx to 0.24.0 and httpcore to 0.17.0 (#91308) --- homeassistant/package_constraints.txt | 4 ++-- pyproject.toml | 2 +- requirements.txt | 2 +- script/gen_requirements_all.py | 2 +- tests/components/generic/test_config_flow.py | 6 +++++- 5 files changed, 10 insertions(+), 6 deletions(-) diff --git a/homeassistant/package_constraints.txt b/homeassistant/package_constraints.txt index f784beb6401d..c8f628e9b3b7 100644 --- a/homeassistant/package_constraints.txt +++ b/homeassistant/package_constraints.txt @@ -27,7 +27,7 @@ hassil==1.0.6 home-assistant-bluetooth==1.9.3 home-assistant-frontend==20230411.0 home-assistant-intents==2023.3.29 -httpx==0.23.3 +httpx==0.24.0 ifaddr==0.1.7 janus==1.0.0 jinja2==3.1.2 @@ -100,7 +100,7 @@ regex==2021.8.28 # requirements so we can directly link HA versions to these library versions. anyio==3.6.2 h11==0.14.0 -httpcore==0.16.3 +httpcore==0.17.0 # Ensure we have a hyperframe version that works in Python 3.10 # 5.2.0 fixed a collections abc deprecation diff --git a/pyproject.toml b/pyproject.toml index a2b86fd28776..685883f35d14 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -34,7 +34,7 @@ dependencies = [ "ciso8601==2.3.0", # When bumping httpx, please check the version pins of # httpcore, anyio, and h11 in gen_requirements_all - "httpx==0.23.3", + "httpx==0.24.0", "home-assistant-bluetooth==1.9.3", "ifaddr==0.1.7", "jinja2==3.1.2", diff --git a/requirements.txt b/requirements.txt index 0c1fd32801d5..1662e2e072fb 100644 --- a/requirements.txt +++ b/requirements.txt @@ -10,7 +10,7 @@ awesomeversion==22.9.0 bcrypt==4.0.1 certifi>=2021.5.30 ciso8601==2.3.0 -httpx==0.23.3 +httpx==0.24.0 home-assistant-bluetooth==1.9.3 ifaddr==0.1.7 jinja2==3.1.2 diff --git a/script/gen_requirements_all.py b/script/gen_requirements_all.py index 585acc944dc8..ecdedf0bbddd 100755 --- a/script/gen_requirements_all.py +++ b/script/gen_requirements_all.py @@ -105,7 +105,7 @@ regex==2021.8.28 # requirements so we can directly link HA versions to these library versions. anyio==3.6.2 h11==0.14.0 -httpcore==0.16.3 +httpcore==0.17.0 # Ensure we have a hyperframe version that works in Python 3.10 # 5.2.0 fixed a collections abc deprecation diff --git a/tests/components/generic/test_config_flow.py b/tests/components/generic/test_config_flow.py index 881734997523..e7668bdc3ffe 100644 --- a/tests/components/generic/test_config_flow.py +++ b/tests/components/generic/test_config_flow.py @@ -1,4 +1,5 @@ """Test The generic (IP Camera) config flow.""" +import contextlib import errno from http import HTTPStatus import os.path @@ -330,7 +331,10 @@ async def test_still_template( expected_errors, ) -> None: """Test we can handle various templates.""" - respx.get(url).respond(stream=fakeimgbytes_png) + with contextlib.suppress(httpx.InvalidURL): + # There is no need to mock the request if its an + # invalid url because we will never make the request + respx.get(url).respond(stream=fakeimgbytes_png) data = TESTDATA.copy() data.pop(CONF_STREAM_SOURCE) data[CONF_STILL_IMAGE_URL] = template